Project

General

Profile

Actions

action #67537

closed

[tools] Not possible to change hostname on Xen tests.

Added by syrianidou_sofia almost 4 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Support
Target version:
-
Start date:
2020-06-01
Due date:
2020-06-20
% Done:

0%

Estimated time:

Description

When running module yast2_lan on Xen hvm, there is a step for changing the server's hostname via Yast ncurses. After that, running "hostname | grep $hostname" fails. These steps work on other architectures for any hostname given.

For $hostname = 'notsusetest'

Xen hvm: https://openqa.suse.de/tests/4301636
x86: http://falafel.suse.cz/tests/832

From autoinst.log:

[2020-06-01T14:48:15.253 CEST] [debug] <<< testapi::type_string(string="notsusetest", max_interval=250, wait_screen_changes=0, wait_still_screen=0, timeout=30, similarity_level=47)
[2020-06-01T14:48:15.628 CEST] [debug] tests/console/yast2_lan.pm:79 called y2lan_restart_common::close_yast2_lan -> lib/y2lan_restart_common.pm:394 called testapi::send_key
[2020-06-01T14:48:15.628 CEST] [debug] <<< testapi::send_key(key="alt-o", wait_screen_change=0, do_wait=0)
[  125.773551] systemd-udevd[444]: Network interface NamePolicy= disabled by default.
[2020-06-01T14:48:15.963 CEST] [debug] tests/console/yast2_lan.pm:79 called y2lan_restart_common::close_yast2_lan -> lib/y2lan_restart_common.pm:395 called testapi::wait_serial
[2020-06-01T14:48:15.963 CEST] [debug] <<< testapi::wait_serial(timeout=180, quiet=undef, buffer_size=undef, expect_not_found=0, regexp="yast2-lan-status-0", no_regex=0, record_output=undef)
[  125.824397] systemd-udevd[2826]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[  125.850886] systemd-udevd[2825]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[  125.897175] systemd[1]: Starting Generate issue file for login session...
[  125.942205] systemd[1]: Started Generate issue file for login session.
[  127.756837] systemd[1]: Reloading wicked managed network interfaces.
[  127.810697] wickedd-dhcp4[1027]: eth0: Request to release DHCPv4 lease with UUID 9ef8d45e-e14e-0c00-0904-000004000000: releasing...
[  127.822276] wickedd-dhcp6[1028]: eth0: Request to release DHCPv6 lease using UUID 9ef8d45e-e14e-0c00-0904-000005000000: releasing...



Welcome to SUSE Linux Enterprise Server 15 SP2 RC3 (x86_64) - Kernel 5.3.18-20-default (ttyS0).

eth0:  fe80::216:3eff:fe55:57af


notsusetest login: [  133.404351] firewalld[943]: ERROR: UNKNOWN_INTERFACE: 'eth0' is not in any zone
[  133.765808] wickedd-dhcp4[1027]: eth0: Request to acquire DHCPv4 lease with UUID 9ef8d45e-e14e-0c00-0904-000008000000
[  133.776497] wickedd-dhcp6[1028]: eth0: Request to acquire DHCPv6 lease with UUID 9ef8d45e-e14e-0c00-0904-000009000000 in mode auto
[  134.589778] wickedd-dhcp4[1027]: eth0: Committed DHCPv4 lease with address 10.162.31.224 (lease time 86400 sec, renew in 43200 sec, rebind in 75600 sec)
[  135.256270] systemd[1]: Reloading System Logging Service.
[  135.274887] rsyslogd[974]:  [origin software="rsyslogd" swVersion="8.39.0" x-pid="974" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
[  135.308382] systemd[1]: Reloaded System Logging Service.



Welcome to SUSE Linux Enterprise Server 15 SP2 RC3 (x86_64) - Kernel 5.3.18-20-default (ttyS0).

eth0: 10.162.31.224 fe80::216:3eff:fe55:57af


1c224 login: [  138.129352] wickedd-dhcp6[1028]: eth0: link confirmation in reply with status All addresses still on link.
[  138.140672] wickedd-dhcp6[1028]: eth0: Committing DHCPv6 lease with:
[  138.148900] wickedd-dhcp6[1028]: eth0    +ia-na.address 2620:113:80c0:80a0:10:162:30:f88f/0, pref-lft 1619880, valid-lft 2591880



Welcome to SUSE Linux Enterprise Server 15 SP2 RC3 (x86_64) - Kernel 5.3.18-20-default (ttyS0).

eth0: 10.162.31.224 2620:113:80c0:80a0:10:162:30:f88f


1c224 login: [  141.637845] wicked[3004]: eth0            device-ready
[  141.648879] wicked[3004]: eth0            up
[  141.673913] systemd[1]: Reloaded wicked managed network interfaces.
yast2-lan-status-0
[2020-06-01T14:48:34.044 CEST] [debug] >>> testapi::wait_serial: yast2-lan-status-0: ok
[2020-06-01T14:48:34.045 CEST] [debug] tests/console/yast2_lan.pm:80 called testapi::wait_still_screen
[2020-06-01T14:48:34.045 CEST] [debug] <<< testapi::wait_still_screen(similarity_level=47, stilltime=7, timeout=30)
[2020-06-01T14:48:41.091 CEST] [debug] >>> testapi::wait_still_screen: detected same image for 7 seconds, last detected similarity is 50.3353530196853
[2020-06-01T14:48:41.091 CEST] [debug] tests/console/yast2_lan.pm:85 called opensusebasetest::clear_and_verify_console -> lib/opensusebasetest.pm:51 called utils::clear_console -> lib/utils.pm:336 called testapi::type_string
[2020-06-01T14:48:41.092 CEST] [debug] <<< testapi::type_string(string="clear\n", max_interval=250, wait_screen_changes=0, wait_still_screen=0, timeout=30, similarity_level=47)
[2020-06-01T14:48:41.295 CEST] [debug] tests/console/yast2_lan.pm:85 called opensusebasetest::clear_and_verify_console -> lib/opensusebasetest.pm:52 called testapi::assert_screen
[2020-06-01T14:48:41.295 CEST] [debug] <<< testapi::assert_screen(mustmatch="cleared-console", timeout=30)
[2020-06-01T14:48:41.399 CEST] [debug] no match: 89.9s, best candidate: cleared-console-root-wsl-20200525 (0.81)
[2020-06-01T14:48:42.402 CEST] [debug] >>> testapi::_handle_found_needle: found cleared-console-root-20190314, similarity 1.00 @ 65/3
[2020-06-01T14:48:42.402 CEST] [debug] tests/console/yast2_lan.pm:86 called testapi::assert_script_run
[2020-06-01T14:48:42.402 CEST] [debug] <<< testapi::assert_script_run(cmd="hostname|grep notsusetest", fail_message="", timeout=90, quiet=undef)
[2020-06-01T14:48:42.402 CEST] [debug] tests/console/yast2_lan.pm:86 called testapi::assert_script_run
[2020-06-01T14:48:42.402 CEST] [debug] <<< testapi::type_string(string="hostname|grep notsusetest", max_interval=250, wait_screen_changes=0, wait_still_screen=0, timeout=30, similarity_level=47)
[2020-06-01T14:48:43.271 CEST] [debug] tests/console/yast2_lan.pm:86 called testapi::assert_script_run
[2020-06-01T14:48:43.271 CEST] [debug] <<< testapi::type_string(string="; echo Zc7oL-\$?- > /dev/ttyS0\n", max_interval=250, wait_screen_changes=0, wait_still_screen=0, timeout=30, similarity_level=47)
Zc7oL-1-
[2020-06-01T14:48:44.391 CEST] [debug] tests/console/yast2_lan.pm:86 called testapi::assert_script_run
[2020-06-01T14:48:44.391 CEST] [debug] <<< testapi::wait_serial(regexp=qr/Zc7oL-\d+-/, record_output=undef, no_regex=0, buffer_size=undef, quiet=undef, timeout=90, expect_not_found=0)
[2020-06-01T14:48:45.461 CEST] [debug] >>> testapi::wait_serial: (?^:Zc7oL-\d+-): ok
[2020-06-01T14:48:45.529 CEST] [info] ::: basetest::runtest: # Test died: command 'hostname|grep notsusetest' failed at /var/lib/openqa/pool/12/os-autoinst-distri-opensuse/tests/console/yast2_lan.pm line 86.

[2020-06-01T14:48:45.530 CEST] [debug] ||| finished yast2_lan console at 2020-06-01 12:48:45 (93 s)

Digging old tickets, I found : https://progress.opensuse.org/issues/15740
but not sure if it could be related.

Actions #1

Updated by syrianidou_sofia almost 4 years ago

  • Project changed from openQA Tests to openQA Infrastructure
Actions #2

Updated by riafarov almost 4 years ago

  • Project changed from openQA Infrastructure to openQA Project
Actions #3

Updated by okurz almost 4 years ago

  • Due date set to 2020-06-20
  • Category set to Support
  • Status changed from New to Feedback
  • Assignee set to okurz

Not sure why you changed to "openQA Project". Certainly #15740 is related and describes the situation correctly: How the tests use the Xen backend has an effect on the hostname. As Xen tests apparently according to #15740 use a bridged network the hostname can also depend on how the external DHCP server behaves. As you can see in the log files after bootup first the hostname appears correctly as "notsusetest":

Welcome to SUSE Linux Enterprise Server 15 SP2 RC3 (x86_64) - Kernel 5.3.18-20-default (ttyS0).

eth0:  fe80::216:3eff:fe55:57af

notsusetest login: …

but after receiving the DHCP ACK the hostname is updated to the external hostname reference:

[  133.765808] wickedd-dhcp4[1027]: eth0: Request to acquire DHCPv4 lease with UUID 9ef8d45e-e14e-0c00-0904-000008000000
…
[  134.589778] wickedd-dhcp4[1027]: eth0: Committed DHCPv4 lease with address 10.162.31.224 (lease time 86400 sec, renew in 43200 sec, rebind in 75600 sec)
…
eth0: 10.162.31.224 fe80::216:3eff:fe55:57af

1c224 login: …

so changing the hostname actually works but the external DHCP server supplies a different hostname that is then used internally within the SUT.

So I see the following options:

  1. Skip the test in this scenario (I see the benefit of added coverage for this scenario low vs. high effort to fix the difference in network setup)
  2. Report a product issue if you think that the hostname should stay at the configured one, not the one that is delivered from DHCP server
  3. Change your test setup to not rely on any external network but create a multi-machine test setup including a DHCP server that behaves as you prefer
Actions #4

Updated by syrianidou_sofia almost 4 years ago

Ok, thank you Oliver for the analysis. You mentioned "after bootup" but there is no reboot happening in the test module. What did you mean?

Actions #5

Updated by okurz almost 4 years ago

Right. To correct myself: One can see that after confirming the new hostname within "yast2 lan" first the hostname is correctly set but shortly afterwards it is overwritten after the DHCP ACK is received. However this does not change the options I see how to continue.

Actions #6

Updated by syrianidou_sofia almost 4 years ago

Ok, thank you. Let's close this ticket.

Actions #7

Updated by okurz almost 4 years ago

  • Status changed from Feedback to Resolved

Ok. As you only referenced a "custom git refspec job" failing I assume there are no production tests failing so I agree that we can close this. Happy to help :)

Actions

Also available in: Atom PDF