Roderick A. Anderson wrote:
> Daniel Hokka Zakrisson wrote:
>> Roderick A. Anderson wrote:
>>> OK, I'm sorry to open this can of worms again but I can't get my head
>>> wrapped around the localhost (127.0.0.1) in guests thing.
>>>
>>> I have guests running PostgreSQL and postfix. Both _would_ like a (or
>>> rather pitch a bitch if there is no) localhost entry when they are
>>> installed or an attempt is made to start them.
>>>
>>> I've hacked my way through this but I think from watching this list
>>> there must be an easier way to get around the messages/errors.
>>>
>>> So in "user-dummy{1}" terms can anyone offer a solution to making
>>> localhost auto-magically work?
>>>
>>> I see that all the 127.0.0. IPs ping from inside a guest but I don't
>>> want to do anything that will cause the host or other guests to die or,
>>> for that matter, the universe to end if I just put a "localhost" entry
>>> in /etc/hosts.
>>
>> It's really very simple. For Linux-VServer versions <2.3, 127.0.0.1 is
>> rewritten on connect/bind to the guest's first IP address. If
>> CONFIG_VSERVER_REMAP_SADDR is set, the source address will be rewritten
>> as
>> well (for connect). Only applications that have hardcoded checks using
>> getsockname/getpeername against 127.0.0.1 will ever notice it happened.
>>
>> For Linux-VServer versions >=2.3, there is a separate lback address. If
>> CONFIG_VSERVER_AUTO_LBACK is enabled, the assignment is handled
>> automatically. The lback address is used, just like in the older
>> versions,
>> when binding or connecting to 127.0.0.1. It's remapped for both source
>> and
>> destination addresses, and, this is the big difference vs. <2.2, it's
>> remapped back to 127.0.0.1 whenever userspace asks. This is supposed to
>> be
>> completely invisible to userspace.
>
> OK I have "cat /proc/vserverion":
>
> Linux version 2.6.22.10-vs2.3.0.29.1 (mockbuild@x86.builders.hozac.com)
> (gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)) #1 SMP Wed Oct 31
> 10:48:21 EDT 2007
You might want to upgrade to 2.6.22.18-vs2.3.0.32.1 ;-)
> Sounds better all the time. Is this set (or how do I check) in the
> kernels you're building?
grep CONFIG_VSERVER /boot/config-`uname -r`
> And so I'm thinking the errors I'm seeing are in reaction to no entry in
> /etc/hosts for localhost or /etc/hosts does not exist.
If that's the case, sure. It could also be due to a strange configuration
in my kernels before 2.6.22.14-vs2.3.0.29.1, where AUTO_SINGLE would break
AUTO_LBACK.
> Rod
-- Daniel Hokka ZakrissonReceived on Tue Feb 12 20:30:27 2008