severity 594003 important forwarded 594003 http://bugzilla.openvz.org/show_bug.cgi?id=1618 thanks
Hej Stefan Thanks a lot for the report. Bug forwarded to upstream as bug http://bugzilla.openvz.org/show_bug.cgi?id=1618 including the extra information about the patch used. I do not really see the point in rewriting the 127.0.0.1 line as that almost always contain only the following 127.0.0.1 localhost.localdomain localhost My opinion is that it should be kept as it usually is. But I'll check with upstream about their opinion. There may be special reasons for this. Best regards, // Ola On Mon, Aug 23, 2010 at 01:30:53AM +0200, Stefan Alfredsson wrote: > Package: vzctl > Version: 3.0.24-1 > Severity: minor > > > vzctl makes adjustments to /etc/hosts via scripts to account > for the IP-adress and hostname that has been set in the VE configuration. > > However, it also adjusts the entry for localhost. > > This is problematic if, for example, you have an alias for localhost: > > 127.0.0.1 localhost localhost.localdomain mysql > > When the vserver is restarted, the "mysql" alias is gone which causes > problems for the application. > > The responsible code is in /etc/vz/dists/scripts/functions : > > 313 $1 == "127.0.0.1" { ate_localhost = 1; next; } > 314 {print} > 315 END { > 316 if (ip == "") { ip ="127.0.0.1" } > 317 if (ate_localhost && ip != "127.0.0.1") { > 318 print "127.0.0.1 > localhost.localdomain localhost"; > 319 } > 320 print comm; > 321 if ((i=index(host, ".")) > 1) { > 322 alias= " " substr(host, 1, i - > 1); > 323 if (! (alias in EXTRANAMES)) { > 324 EXTRANAMES[alias] = 1; > 325 } > 326 } > > > So - first is the 127.0.0.1 entry regenerated, then is the "comm" > information ("# Autogenerated hostname ...") appended, and then the > hostname. > > I do not see a reason for 127.0.0.1 to be regenerated. Usually it points at > localhost, in which case the code provides no benefit. If the admin has added > an alias to localhost, it will be overwritten, which can be quite annoying. > > I suggest contacting upstream if there is a reason for this manipulation, > and if not, leave 127.0.0.1 alone by commenting line #313, perhaps with > a reference to this bug report. > > Best regards, > Stefan > > -- System Information: > Debian Release: lenny/sid > APT prefers testing > APT policy: (500, 'testing') > Architecture: i386 (i686) > > Kernel: Linux 2.6.32-trunk-686 (SMP w/1 CPU core) > Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) (ignored: LC_ALL set > to sv_SE) > Shell: /bin/sh linked to /bin/bash > > Versions of packages vzctl depends on: > ii iproute 20080417-1 networking and traffic control > too > ii libc6 2.10.2-2 GNU C Library: Shared libraries > ii vzquota 3.0.12-3 server virtualization solution - > q > > Versions of packages vzctl recommends: > ii rsync 3.0.7-1 fast remote file copy program > (lik > > -- no debconf information > > > -- --------------------- Ola Lundqvist --------------------------- / o...@debian.org Annebergsslingan 37 \ | o...@inguza.com 654 65 KARLSTAD | | http://inguza.com/ +46 (0)70-332 1551 | \ gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9 / --------------------------------------------------------------- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org