containerless still attempts sudo lxc-ls

Bug #1648833 reported by Ryan Beisner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mojo: Continuous Delivery for Juju
Incomplete
Low
Unassigned
OpenStack Charm Test Infra
Confirmed
Medium
Unassigned

Bug Description

OSCI slaves use "containerless" mojo. Even with containerless, container-specific commands are attempted by mojo.

00:03:39.139 Traceback (most recent call last):
00:03:39.139 File "/usr/lib/python2.7/dist-packages/mojo/cli.py", line 583, in run_with_args
00:03:39.139 args.func(args)
00:03:39.139 File "/usr/lib/python2.7/dist-packages/mojo/utils.py", line 305, in wrapped
00:03:39.139 return method(*args, **kwargs)
00:03:39.139 File "/usr/lib/python2.7/dist-packages/mojo/cli.py", line 220, in create_workspace
00:03:39.139 project = mojo.project.Project(get_project_name(args), args.series, args.mojo_root)
00:03:39.139 File "/usr/lib/python2.7/dist-packages/mojo/project.py", line 90, in __init__
00:03:39.139 self.container = container_class(self.name, self.series)
00:03:39.139 File "/usr/lib/python2.7/dist-packages/mojo/contain.py", line 72, in __init__
00:03:39.139 if self.defined:
00:03:39.139 File "/usr/lib/python2.7/dist-packages/mojo/contain.py", line 398, in defined
00:03:39.139 return self.check_state()
00:03:39.139 File "/usr/lib/python2.7/dist-packages/mojo/contain.py", line 257, in check_state
00:03:39.139 containers = subprocess.check_output(cmd).split()
00:03:39.139 File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
00:03:39.139 raise CalledProcessError(retcode, cmd, output=output)
00:03:39.139 CalledProcessError: Command '('sudo', 'lxc-ls', '-1')' returned non-zero exit status 1

Tags: uosci
Ryan Beisner (1chb1n)
Changed in charm-test-infra:
status: New → Confirmed
importance: Undecided → High
description: updated
Ryan Beisner (1chb1n)
summary: - containerless still attempts sudo lxc-ls, fails with no sudo privs
+ containerless still attempts sudo lxc-ls
description: updated
Revision history for this message
Tom Haddon (mthaddon) wrote :

Can you confirm what version of Mojo you're using, and what specific command you're running that triggers this error? It looks like it's invoking code that should only be triggered for a project of LXC container type. Can you also include the contents of /srv/mojo/$MOJO_PROJECT/$MOJO_SERIES/.project ? That should confirm it's a containerless project in the containerclass variable.

Changed in mojo:
status: New → Incomplete
Revision history for this message
Ryan Beisner (1chb1n) wrote :

We've worked around it in OSCI by just giving lxc-ls sudoer privs. I'm onto other things but will try to circle back with the requested info. However, I can confirm emphatically that we do indeed use containerless exclusively in this particular charm CI. Many thanks.

Ryan Beisner (1chb1n)
Changed in charm-test-infra:
importance: High → Medium
Tom Haddon (mthaddon)
Changed in mojo:
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.