mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
[25230] Change LXC version to come from lxc-info
Fix for: https://github.com/saltstack/salt/issues/25230 Seems lxc-ls isn't reliable to get a version, it 'may' return a version if there is already a container created, but from a blank state there's nothing coming back.
This commit is contained in:
parent
49b249e9b6
commit
6dbaab32f9
@ -117,7 +117,7 @@ def version():
|
|||||||
'''
|
'''
|
||||||
k = 'lxc.version'
|
k = 'lxc.version'
|
||||||
if not __context__.get(k, None):
|
if not __context__.get(k, None):
|
||||||
cversion = __salt__['cmd.run_all']('lxc-ls --version')
|
cversion = __salt__['cmd.run_all']('lxc-info --version')
|
||||||
if not cversion['retcode']:
|
if not cversion['retcode']:
|
||||||
ver = distutils.version.LooseVersion(cversion['stdout'])
|
ver = distutils.version.LooseVersion(cversion['stdout'])
|
||||||
if ver < distutils.version.LooseVersion('1.0'):
|
if ver < distutils.version.LooseVersion('1.0'):
|
||||||
|
Loading…
Reference in New Issue
Block a user