Re: VPS users interfere with HN ones [message #9499 is a reply to message #9498] |
Sun, 07 January 2007 17:47   |
rickb
Messages: 368 Registered: October 2006
|
Senior Member |
|
|
I think many people will wonder about this, so I will explain in detail.
The HN's /proc has directories for each PID in the system, even those which are created in the VE context. So, when you run programs like ps, lsof on the HN, "ps" thinks that all the pids belong to the HN. The normal userspace tools which read /proc know nothing about openvz or virtualization. Many tools which read the uid will reference /etc/passwd to find the username because its easier for the user to see the username rather then the UID. In your case, the UIDs happen to clash. This is pure chance. If you run only lsof for example, you will see many of these:
lsof: no pwd entry for UID XXX
This means XXX is not present in /etc/passwd, but it is present in a VE's /etc/passwd. In conclusion, there is nothing "wrong" or "bugged" here, its just that the normal userspace tools like ps, lsof, etc do not have a concept of virtualization. In the future, when PID contexts get finalized in the linux kernel, the userspace tools will recognize that the PID does not belong to the HN and take a more intelligent action in displaying the username.
Rick Blundell
-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions
UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
|
|
|