-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not accept hostname from DHCP, use static one #2270
Do not accept hostname from DHCP, use static one #2270
Conversation
I am not sure about this one. Don't we want to test how the hostname is set by DHCP or does it not make sense to test this and why? |
My sense is that we avoid looking at hostname, if we feel it may came from DHCP, where possible - be it in needle matching in YaST, or on virtual console prompt -, because there's new name for every new VM. Couldn't find a test where we actually test hostname sent from DHCP. I don't know why setting static hostname, then restarting Other approaches:
(Though I prefer my original approach.) |
I was thinking why is this not Xen/svirt specific, I had no good arguments to not set static hostname, so I didn't comment, but with this behavior we will avoid default settings. |
e.g. with this all PUBLISH_HDD_1 will have static hostname, "custom setup". |
yes, does not sound like a good idea |
This
should avoid that "custom setup" issue as new SUT boot or later |
0e8fe04
to
048d8f8
Compare
exactly yast_lan is not running when disk image is created e.g. https://openqa.suse.de/tests/692578 |
I see you added that "yes" part, but now it is not "Do not accept hostname from DHCP, use static one" anymore :) |
POO#15740 On Xen under svirt backend we don't have user-mode networking we have for KVM and Qemu. If networking.service is restarted (explicitly or by system restart) on Xen, the system accepts hostname different from the former static one. This change prevents system to set as a hostname whatever comes from DHCP during `consoletest` base and sticks with static hostname. Otherwise yast2_lan test fails: https://openqa.suse.de/tests/692200. After yast2_lan test is run, hostname is re-set to whatever comes from DHCP. Now `hostname --fqdn` fails on all systems, but that's expected as domain name is not set. Verification runs: * Xen: http://assam.suse.cz/tests/4578 * KVM: http://assam.suse.cz/tests/4575 * Qemu: http://assam.suse.cz/tests/4577
048d8f8
to
3187751
Compare
This is somewhat messy approach. I should rather come up with different solution. |
POO#15740
On Xen under svirt backend we don't have user-mode networking we have
for KVM and Qemu. If networking.service is restarted (explicitly or by
system restart) on Xen the system accepts new hostname different from
the static one.
This change prevents system to set as a hostname whatever comes from
DHCP and sticks with static hostname. Otherwise yast2_lan test fails:
https://openqa.suse.de/tests/692200.
Now
hostname --fqdn
fails on all systems but that's expected as domainname is not set.
Verification runs:
Xen: http://assam.suse.cz/tests/4578
KVM: http://assam.suse.cz/tests/4575
Qemu: http://assam.suse.cz/tests/4577