[Bug 667265] New: LiveCD installs fail to set hostname
https://bugzilla.novell.com/show_bug.cgi?id=667265 https://bugzilla.novell.com/show_bug.cgi?id=667265#c0 Summary: LiveCD installs fail to set hostname Classification: openSUSE Product: openSUSE 11.4 Version: Factory Platform: All OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: bwiedemann@novell.com QAContact: qa@suse.de Found By: Development Blocker: --- Created an attachment (id=410469) --> (http://bugzilla.novell.com/attachment.cgi?id=410469) bash -x ifup eth0 LiveCD installs fail to set hostname Steps To Reproduce: install LiveCD Build1025 or later echo susetest.zq1.de > /etc/HOSTNAME hostname susetest alternatively use yast2 lan to set hostname. have "Change Hostname via DHCP" enabled. ifdown eth0 ifup eth0 hostname Actual Results: prints "linux" Expected Results should print "susetest" Reproducible: Always see also http://openqa.opensuse.org/results/openSUSE-GNOME-LiveCD-x86_64-Build1033 last known working in Build1022 from 2011-01-18 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c
wei wang
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c1
Marcus Schaefer
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c2
Stephan Kulow
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c3
Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c4
Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c5
--- Comment #5 from Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c6
Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c7
--- Comment #7 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c8
Peter Varkoly
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c9
Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c10
Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c11
Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c12
--- Comment #12 from Jeff Mahoney
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c13
Marius Tomaschewski
If it was NetworkManager, this might have been the causing commit: http://lists.suse.com/archive/opensuse-commit/2011-01/msg00551.html
AFAS it isn't the above commit. I guess, the NM on 11.4 makes this sort of modifications. But as long as NM is running and updates the /etc/hosts correctly on all IP changes, it basically works. I guess, it is a workaround against broken dns server or something like this. Enabling something like this is _very_ questionable, because it breaks correctly configured networks. e.g. in my case, it breaks my IPv6 setup. I didn't tested it, just guess: when you switch from NM to ifup or also when kiwi copies /etc/hosts from live-cd to the running system, the file contains these modifications, because NM does not cleanup them properly. (In reply to comment #2)
the opensuse live cd uses network manager and the bug is that _if_ he enables the option manually, it doesn't work.
This is not really correct. The Live-CD / installation system may use NM, but the installed system when booting from the ISO and choosing "Installation" (in grub) AFAIS makes use of ifup by default. I've installed using yast2 defaults and Bernhard too. See his video in comment 0. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c
Li Bin
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c14
--- Comment #14 from Li Bin
Created an attachment (id=410469) --> (http://bugzilla.novell.com/attachment.cgi?id=410469) [details] bash -x ifup eth0
LiveCD installs fail to set hostname
Steps To Reproduce: install LiveCD Build1025 or later echo susetest.zq1.de > /etc/HOSTNAME hostname susetest alternatively use yast2 lan to set hostname. have "Change Hostname via DHCP" enabled.
ifdown eth0 ifup eth0 hostname
Actual Results: prints "linux"
Expected Results should print "susetest"
Reproducible: Always
see also http://openqa.opensuse.org/results/openSUSE-GNOME-LiveCD-x86_64-Build1033
last known working in Build1022 from 2011-01-18
I've tested this issue in the RC1, after reboot the hostname show the correct name. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c15
Li Bin
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c16
--- Comment #16 from Li Bin
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c17
--- Comment #17 from Marius Tomaschewski
147.2.207.126 Azi # Added by NetworkManager 127.0.0.1 localhost.localdomain localhost linux-fnxj ::1 Azi localhost6.localdomain6 localhost6 linux-fnxj Azi.bj.novell.com linux.site linux [...] It works fine for me, the hostname is 'Azi', and my original hostname is 'linux-fnxj'.
When you add the hostnames to /etc/hosts [even worser when you override all the localhost entries and add the broken *.localdomain, *.site], the resolver does not use dns any more but returns the answers from /etc/hosts only. It "works", as long as it is "in sync" with dns. But when the hostname changes in dns, e.g. because the dhcp client requested it to change, the additions break the resolving process, because the resolver still returns the obsolete data from /etc/hosts instead from dns. OK, as long as NM is running, you can still update /etc/hosts to bring it in sync. But you have to revert all the /etc/hosts changes at exit of NM, because it breaks everything else later -- ifup in this case.
And in Comment 9, if the NM don't change the hostname in hosts, so who will in charge of it? Or which one don't need changed by NM?
You can change the hostname at runtime using e.g. "hostname $newone" [after verifying that at least the PTR record contains it], but don't define it in /etc/hosts. DNS server will provide the correct name for your host / reverse of IP. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c18
Marius Tomaschewski
commit 39eed50e470d6f41222e40ce0276b898e8c84dc4 I view the soucecode in the upstream, and found no touching the /etc/hosts now.
Good.
And I build a package in my repo, you can get the rpms for testing. http://download.opensuse.org/repositories/home:/BinLi:/branches:/GNOME:/Fact... If it's okay, I'll put it into the RC2.
When it does not touch /etc/hosts any more, please submit for RC2. Thanks! BTW: nss-myhostname sounds interessting. I think, we have to take closer look at it. Perhaps it solves some of the problems in this area... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c19
--- Comment #19 from Marius Tomaschewski
BTW: nss-myhostname sounds interessting. I think, we have to take closer look at it. Perhaps it solves some of the problems in this area...
Ahm... no. AFAIS it does not make anything differently than to fake the 127.0.0.2 entry -- just without the entry in /etc/hosts. I think 127.0.0.2 entry in /etc/hosts is better than this, because it is at least visible to the user... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=667265
https://bugzilla.novell.com/show_bug.cgi?id=667265#c20
Li Bin
participants (1)
-
bugzilla_noreply@novell.com