containerless only works for my user, not the service user

Bug #1888870 reported by Nick Moffitt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mojo: Continuous Delivery for Juju
Triaged
Low
Unassigned

Bug Description

(mojo-prod-jenkaas-ols)prod-jenkaas-ols@wekufe:/srv/mojo/mojo-prod-jenkaas-ols/focal$ mojo project-new --series focal -c containerless mojo-prod-jenkaas-ols
2020-07-24 16:05:38 [INFO] Using pre-existing container class lxc
2020-07-24 16:05:38 [ERROR] Unknown error
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/mojo/cli.py", line 684, in run_with_args
    args.func(args)
  File "/usr/lib/python3/dist-packages/mojo/utils.py", line 386, in wrapped
    return method(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/mojo/cli.py", line 229, in call_project_new
    create_project(args)
  File "/usr/lib/python3/dist-packages/mojo/cli.py", line 194, in create_project
    project.create()
  File "/usr/lib/python3/dist-packages/mojo/project.py", line 192, in create
    raise ProjectCreationError("Could not create lxc without running as a privileged user")
mojo.project.ProjectCreationError: Could not create lxc without running as a privileged user

but

[sourcing in the .mojorc variables from the other user's environment]

nick@wekufe:~$ mojo project-new --series focal mojo-prod-jenkaas-ols -c containerless
2020-07-24 16:07:14 [INFO] Checking mojo-prod-jenkaas-ols project path at /home/nick/.local/share/mojo/mojo-prod-jenkaas-ols ...
2020-07-24 16:07:14 [INFO] Containerless project has no container config
2020-07-24 16:07:14 [INFO] Checking mojo-prod-jenkaas-ols project container at /home/nick/.local/share/mojo/mojo-prod-jenkaas-ols/focal ...
2020-07-24 16:07:14 [INFO] Checking mojo-prod-jenkaas-ols project container is setup ...

Related branches

Revision history for this message
Paul Collins (pjdc) wrote :

> 2020-07-24 16:05:38 [INFO] Using pre-existing container class lxc

This is saying there's a pre-existing container with class "lxc", so it's ignoring your "-c containerless"; not that there's a pre-existing container class "lxc", as I've always read it. (I've created an MP to make this message less ambiguous.)

This is most likely because srv-mojo created the project with a container.

mojo should handle this itself somehow, if only by emitting a diagnostic and halting, but deleting the project first should work around the problem.

Another option might be to hack /srv/mojo/$MOJO_PROJECT/$MOJO_SERIES/.project (no, there's no reason for this file to be so hard to find!) but delete and recreate seems simpler.

Junien F (axino)
Changed in mojo:
status: New → Triaged
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.