Bugzilla – Bug 985
[UPSTREAM] Sharing Unix Domain Sockets between VEs is impossible
Last modified: 2009-01-08 10:51:23 EST
Creating a listening unix domain socket in a VE, hardlinking or bind-mounting it to another VE and connecting to it from within the other VE is impossible in the current devel version, tested with linux-image-2.6.24-openvz-24-004.1d1-686_004.1d1_i386.deb from download.openvz.org, and with linux-image-2.6.26-1-openvz-686_2.6.26-3_i386.deb from ftp.debian.org (Debian Sid).
The "Shared webhosting" article in the OpenVZ Wiki suggests to hardlink a MySQL socket from a MySQL VE other VEs which then can connect to MySQL using the shared socket. This is impossible in the current devel OpenVZ.
The problem is probably caused by the network namespaces change. Unix domain sockets are now part of the network namespace, so communication using unix domain sockets is only possible when both communicating processes are part of the same network namespace. While one may argue this is consistent, it is (at least for me) very surprising, and it is not backward compatible. There is no obvious way to work around this limitation (besides switching to network communication).
See also the related mail on email@example.com at http://openvz.org/pipermail/users/2008-August/002178.html
+1, 2.6.26 - same problem
Also think whether we can fix this in the mainline, because a kludge you'll put... remove (!) from our kernel will not be acceptable "there".
I use this as well, and it's preventing one of my more serious servers from moving. We brought this up in the testenv and found that communications failed. Is there a patch? I am using 2.6.24-ovz5 from git, checked out today.
> Is there a patch?
Created attachment 771 [details]
the bug should remain opened until we'll decide how to handle the problem in the mainstream
Still need to think how to push this upstream.