Uploaded image for project: 'OpenVZ'
  1. OpenVZ
  2. OVZ-4124

[UPSTREAM] Sharing Unix Domain Sockets between VEs is impossible

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: Major
    • Resolution: Unresolved
    • Fix Version/s: OpenVZ-legacy
    • Component/s: Containers::Kernel
    • Security Level: Public
    • Environment:
      Operating System: All
      Platform: All

      Description

      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 users@openvz.org at http://openvz.org/pipermail/users/2008-August/002178.html

        Activity

        Hide
        lexpublic@gmail.com Alexey Lapitsky added a comment -

        +1, 2.6.26 - same problem

        Show
        lexpublic@gmail.com Alexey Lapitsky added a comment - +1, 2.6.26 - same problem
        Hide
        xemul Pavel Emelyanov added a comment -

        Den

        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".

        Show
        xemul Pavel Emelyanov added a comment - Den 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".
        Hide
        joshland@gmail.com Joshua Schmidlkofer added a comment -

        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.

        Show
        joshland@gmail.com Joshua Schmidlkofer added a comment - 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.
        Hide
        xemul Pavel Emelyanov added a comment -

        > Is there a patch?

        not
        yet

        Show
        xemul Pavel Emelyanov added a comment - > Is there a patch? not yet
        Hide
        den@openvz.org Den Lunev added a comment -

        Attachment 0001-netns.patch has been added with description: 0001-netns.patch

        Show
        den@openvz.org Den Lunev added a comment - Attachment 0001-netns.patch has been added with description: 0001-netns.patch
        Hide
        den@openvz.org Den Lunev added a comment -

        the bug should remain opened until we'll decide how to handle the problem in the mainstream

        Show
        den@openvz.org Den Lunev added a comment - the bug should remain opened until we'll decide how to handle the problem in the mainstream
        Show
        xemul Pavel Emelyanov added a comment - http://git.openvz.org/?p=linux-2.6.26-openvz;a=commit;h=89451f9b7cf93d3c71cdb201c624244eb49f1223 http://git.openvz.org/?p=linux-2.6.24-openvz;a=commit;h=8caa941fe7be3a18d8b88b8f38ac9497e5fb2fb2 Still need to think how to push this upstream.
        Hide
        xemul Pavel Emelyanov added a comment -

        To mainstream

        Show
        xemul Pavel Emelyanov added a comment - To mainstream

          People

          • Assignee:
            xemul Pavel Emelyanov
            Reporter:
            contact+openvz@sdas.de Stefan Siegel
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated: