Unverified Commit 1f054c59 authored by boklm's avatar boklm
Browse files

Bug 23039: fix detection of runc version

In the previous patch, we wrongly assumed that all runc 0.1.1 versions
exited with 0 when given an unknown command, and used that to detect the
version. It seems it is not true on all systems.

We are now using the 'runc --version' command to find the version of
runc.

We don't support versions older than 0.1.1.
parent 209818fc
......@@ -375,11 +375,10 @@ ENV:
(
var_p => {
# runc100 is true if we are using runc >= 1.0.0
# we assume that any version that is not 0.1.1 is >= 1.0.0
runc100 => sub {
# runc >= 1.0.0 exits with an error when trying to use an unknown
# command while older versions exit with 0
my (undef, undef, $success) = capture_exec('sudo', 'runc', 'xyzxyzxyz');
return !$success;
my ($out) = capture_exec('sudo', 'runc', '--version');
return !($out =~ m/^runc version 0.1.1/);
},
},
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment