** Changed in: juju (Ubuntu) Assignee: Martin Packman (gz) => Stephanie (districtmellow-1904)
-- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to lxc in Ubuntu. https://bugs.launchpad.net/bugs/1130809 Title: lxc scripts break when user has PYTHONPATH set Status in pyjuju: Fix Committed Status in juju package in Ubuntu: Fix Released Status in lxc package in Ubuntu: Invalid Bug description: The various lxc scripts installed in /usr/bin are Python 3 only. If the user has PYTHONPATH or other similar environment variables set, these scripts can incorrectly inherit details from the user's Python 2 setup when run. This can result in either a crash as per the initial report, or a traceback over syntax differences such as the following in juju: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/juju/agents/machine.py", line 97, in watch_service_units yield self.unit_deployer.start_service_unit(unit_name) File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1069, in _inlineCallbacks result = result.throwExceptionIntoGenerator(g) File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator return g.throw(self.type, self.value, self.tb) File "/usr/lib/python2.7/dist-packages/juju/unit/deploy.py", line 91, in start_service_unit running = yield deployment.is_running() File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1069, in _inlineCallbacks result = result.throwExceptionIntoGenerator(g) File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator return g.throw(self.type, self.value, self.tb) File "/usr/lib/python2.7/dist-packages/juju/machine/unit.py", line 301, in is_running prefix=self.container.container_name) File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1069, in _inlineCallbacks result = result.throwExceptionIntoGenerator(g) File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator return g.throw(self.type, self.value, self.tb) File "/usr/lib/python2.7/dist-packages/juju/lib/lxc/__init__.py", line 147, in get_containers _, output = yield deferToThread(_cmd, ["lxc-ls"]) File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 172, in _worker result = context.call(ctx, function, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext return func(*args,**kw) File "/usr/lib/python2.7/dist-packages/juju/lib/lxc/__init__.py", line 48, in _cmd raise LXCError(stdout_data) LXCError: Fatal Python error: Py_Initialize: Unable to get the locale encoding File "/usr/lib/python2.7/encodings/__init__.py", line 123 raise CodecRegistryError,\ ^ SyntaxError: invalid syntax WORKAROUND: Add "-Es" to /usr/bin/lxc-ls (after /usr/bin/python3 ) so that those environment variables are ignored. To manage notifications about this bug go to: https://bugs.launchpad.net/juju/+bug/1130809/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp