Bug 907 - vzctl start errors out with "Unable to set capability: Invalid argument"
vzctl start errors out with "Unable to set capability: Invalid argument"
Product: OpenVZ
Classification: Unclassified
Component: vzctl
Other Other
: P2 normal
Assigned To: Igor Sukhih
Depends on:
  Show dependency treegraph
Reported: 2008-06-07 08:56 EDT by Kir Kolyshkin
Modified: 2015-04-01 14:42 EDT (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Kir Kolyshkin 2008-06-07 08:56:16 EDT
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

* http://bugs.debian.org/482974
* http://forum.openvz.org/index.php?t=tree&th=6099
* http://alexkuklin.livejournal.com/628240.html
Comment 1 Kir Kolyshkin 2008-06-07 10:14:15 EDT
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.
Comment 2 Kir Kolyshkin 2008-06-07 10:22:04 EDT
The fix (found in libcap-2 sources) is to call capget which will fill in header.version.

Fixed in git:

Will appear in vzctl >= 3.0.23
Comment 3 Sergey Bronnikov 2015-04-01 14:42:58 EDT
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.