[lxc-users] "failed to create lock" error inside a tox virtual env
Benoit Barthelet
benoit.barthelet at gmail.com
Tue Apr 25 09:40:35 UTC 2017
I'm trying to run python tests in virtualenv with tox and got this error:
failed to create lock
RuntimeError: Container_init:lxc.c:542: error during init for container
'47a1e552-299a-11e7-a6f1-f832e4beeab7'.
however my tests run fine with "pytest tests -s -v"
I'm not sure that is the root of my issue, but the difference i see between
the working setup and the failing automatized one using tox, is that
lxc_global_config_value
is not set to the correct value when I use tox.
If I add this little print debug in the __init__ line 31 (
https://github.com/lxc/lxc/blob/master/src/python-lxc/lxc/__init__.py#L31)
default_config_path = _lxc.get_global_config_item("lxc.lxcpath")
print('LXCPATH: {}'.format(default_config_path))
then I got when I run pytest tests/ -s -v
LXCPATH: /home/lotso/.local/share/lxc
but when I run tox I have
LXCPATH: //.local/share/lxc
I dont know if it's because of a failed installation of lxc within tox or
if that means the get_global_config_item function has an issue.
I'm no tox pro, but if anyone would have an idea or pointers at where to
look at I'd be interested.
--
benoit barthelet
http://pgp.mit.edu/pks/lookup?op=get&search=0xF150E01A72F6D2EE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170425/83961f01/attachment.html>
More information about the lxc-users
mailing list