[Users] Debian CT issue - hostname added to /etc/hosts on every start

Scott Dowdle dowdle at montanalinux.org
Sun Jan 10 13:01:39 EST 2010


Steve,

----- "Steve Scaffidi" <stephen at scaffidi.net> wrote:
> Very strange issue, I'm not sure where I went wrong or how to fix it:
> 
> CT /etc/hosts:
> --------------------
> 127.0.0.1 localhost.localdomain localhost
> # Auto-generated hostname. Please do not remove this comment.
> 10.1.10.123 test-server.redweek.com  test-server test-server
> --------------------
> 
> OpenVZ seems to really want to have the hostname listed twice in the
> hosts file... every time I issue a vzctl restart that line is reset
> to
> what I pasted above.
> 
> Unfortunately this error causes NIS and NFS to fail (due to portmapper
> failing) and I can get them working by fixing the invalid line above
> and restarting those services in the right order. However, I really
> need to figure out why openvz seems to be doing this and how to fix
> it!

Look at the script being run from /etc/vz/dists/debian.conf you'll see reference to scripts in the /etc/vz/dists/scripts/ directory.

On a Fedora 12 container, I also had the hostname listed twice but it doesn't break anything and yp works fine.  I also see this behavior in some other containers as well as physical hosts without OpenVZ.

I'm not discouraging you from fixing it, but your services shouldn't be so picky.

TYL,
-- 
Scott Dowdle
704 Church Street
Belgrade, MT 59714
(406)388-0827 [home]
(406)994-3931 [work]


More information about the Users mailing list