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

vzctl start errors out with "Unable to set capability: Invalid argument"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: OpenVZ-legacy
    • Component/s: Containers::Userspace
    • Security Level: Public
    • Environment:
      Operating System: Other
      Platform: Other

      Description

      There are numerous bug reports on the issue. The problem is vzctl can't start VE, saying something like:

      thorpe@oblivion ~ # vzctl start 10100
      Starting VE ...
      VE is mounted
      Unable to set capability: Invalid argument
      Unable to set capability
      VE start failed
      VE is unmounted

      References:
      * http://bugs.debian.org/482974
      * http://forum.openvz.org/index.php?t=tree&th=6099
      * http://alexkuklin.livejournal.com/628240.html

        Activity

        Hide
        kir Kir Kolyshkin added a comment -

        The problem is caused by changed value of LINUX_CAPABILITY_VERSION (defined in /usr/include/linux/capability.h).

        Apparently, vzctl tries to make a setcap syscall with LINUX_CAPABILITY_VERSION set in header (see src/lib/cap.c, function set_cap()). If vzctl is compiled with linux/capability.h from a recent kernel (>2.6.24), LINUX_CAPABILITY VERSION is newer than the one our 2.6.18 kernel understands, thus the error.

        Show
        kir Kir Kolyshkin added a comment - The problem is caused by changed value of LINUX_CAPABILITY_VERSION (defined in /usr/include/linux/capability.h). Apparently, vzctl tries to make a setcap syscall with LINUX_CAPABILITY_VERSION set in header (see src/lib/cap.c, function set_cap()). If vzctl is compiled with linux/capability.h from a recent kernel (>2.6.24), LINUX_CAPABILITY VERSION is newer than the one our 2.6.18 kernel understands, thus the error.
        Hide
        kir Kir Kolyshkin added a comment -

        The fix (found in libcap-2 sources) is to call capget which will fill in header.version.

        Fixed in git:
        http://git.openvz.org/?p=vzctl;a=commit;h=0d6bfad92c7cb6a193801ce8dac3a0dc64396ca8

        Will appear in vzctl >= 3.0.23

        Show
        kir Kir Kolyshkin added a comment - The fix (found in libcap-2 sources) is to call capget which will fill in header.version. Fixed in git: http://git.openvz.org/?p=vzctl;a=commit;h=0d6bfad92c7cb6a193801ce8dac3a0dc64396ca8 Will appear in vzctl >= 3.0.23
        Hide
        sergeyb Sergey Bronnikov added a comment -

        Bug was fixed more than one year ago and there were no complains from reporter after fix. We believe bug fix helped and mark bug as closed.

        Show
        sergeyb Sergey Bronnikov added a comment - Bug was fixed more than one year ago and there were no complains from reporter after fix. We believe bug fix helped and mark bug as closed.

          People

          • Assignee:
            igor Igor Sukhih
            Reporter:
            kir Kir Kolyshkin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: