[Bug 986904] New: yast writes hostname wrong
http://bugzilla.novell.com/show_bug.cgi?id=986904 Bug ID: 986904 Summary: yast writes hostname wrong Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.1 Hardware: Other OS: Other Status: NEW Severity: Major Priority: P5 - None Component: YaST2 Assignee: yast2-maintainers@suse.de Reporter: nettezzaumanaa@gmail.com QA Contact: jsrain@suse.com Found By: --- Blocker: --- Hello, I've never noticed this issue because I don't use yast network module but I've within some demonstration with yast (that I'd normally not do) hit the (funny - yeah, it's really funny) issue that yast just writes the hostname from network module completely wrong. I've reproduced this behaviour (haha) since 11.2 that I have to my disposal through 13.1 (evergreen) finally to 42.1 (leap) ... So what's going on: a) yast writes in fqdn form (<hostname>.<domainname>) the content of fields hostname and domain from his UI to /etc/hostname (or /etc/HOSTNAME respectively in older releases) whilst it shall split it to /etc/hostname and /etc/defaultdomain .. that's why with suse defaults you've got completely messed output from `hostname|domainname|dnsdomainname|hostname -f|...etc' This ofc interferes (as expected) moreover with etc/hosts b) yast shows in the UI what it receives by glibc calls and NOT what it reads from files it writes. HOWTO REPRODUCE: 1) grab some suse with defaults, set whatever you want with yast assuming, that you have nsswitch.conf defaults, just for safe reboot suse 2) check what return commands mentioned above. <domain> part from /etc/hostname will be **always and utterly ignored unless there's some other place like etc/hosts 3) now check `man -s5 hostname' and put to /etc/hostname just hostname (short - no dots) and to our defaultly empty /etc/defaultdomain put domain part and reboot 4) now all variations of hostname command (hostname, domainname, dnsdomaine + theirs parameters) works good 5) open yast to verify, that yast displays your domain from etc/defaultdomain, change the domain, yast will add it to etc/hostname on wrong place and after save&exit it won't even properly activate that settings .. After reboot the result is that your domain part set from yast will always be wrong .. SUMMARY: This nice and long living bug made my day ... I'm shocked that I've hit it in the part of the demonstration and I have to admit, that's not first time when I've heard this urban story about fqdn in etc/hostname in suse from various sources (not like with el etc/sysconfig/network and HOSTNAME= param) There are two ways out: a) we create a sysconfig interface for setting up hostname for yast b) we fix network module that it properly: b.1) splits fqdn to two files b.2) that shows what it reads from files and not what it gets by glibc calls regards, daniel ps. in my 13.1 evergreen workstation that I just don't care and I use it with defaults it's situation indeed extra funny .... these are suse defaults (according to what has been told above): # cat /etc/HOSTNAME caligula.adicz ## after ?by default checked attaching hostname to localhost in yast, I'm 80% sure I did not put it to etc/hosts - just short `caligula' by hand # hostname -f localhost # hostname caligula # domainname (none) # dnsdomainname <empty> ^^ this is just ridiculously broken and things start magically working once you do no more than splitting your spanning your original-and-yast-written etc/hostname over the etc/defaultdomain and reboot -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=986904
http://bugzilla.novell.com/show_bug.cgi?id=986904#c1
Daniel Pecka
participants (1)
-
bugzilla_noreply@novell.com