Cannot deploy with any channel release of the snap, install from a PPA or source
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mojo: Continuous Delivery for Juju |
Expired
|
Undecided
|
Unassigned |
Bug Description
If I use the stable snap on bionic, mojo workspace-new and run fail with an error in codetree:
+ mojo project-new -c lxd --series bionic ua-event-bus
2020-04-02 21:48:00 [INFO] Checking ua-event-bus project path at /home/ubuntu/
2020-04-02 21:48:00 [INFO] Checking ua-event-bus project container at /home/ubuntu/
2020-04-02 21:48:00 [INFO] Not found, creating container
2020-04-02 21:48:00 [INFO] Using mojo container image mojo-ubuntu-
2020-04-02 21:48:00 [INFO] Launching container 'ua-event-
2020-04-02 21:48:07 [INFO] Adding device mojo-project-
2020-04-02 21:48:07 [INFO] Setting acls inside container: setfacl -Rdmu:100000:rwX /home/ubuntu/
2020-04-02 21:48:07 [INFO] Checking ua-event-bus project container is setup ...
+ mojo workspace-new --project ua-event-bus --series bionic --stage cdo/ua-
2020-04-02 21:48:09 [INFO] Using pre-existing container class lxd
2020-04-02 21:48:09 [INFO] Rsyncing /home/ubuntu/
2020-04-02 21:48:11 [ERROR] Unknown error
Traceback (most recent call last):
File "/snap/
args.func(args)
File "/snap/
return method(*args, **kwargs)
File "/snap/
project.
File "/snap/
ws.prepare()
File "/snap/
self.spec # Initializes spec
File "/snap/
self._spec = Spec(self.spec_dir, self.spec_url, stage=self.stage, manifest_
File "/snap/
self.
File "/snap/
self.ct.run()
File "/snap/
f.write(
TypeError: write() argument 1 must be unicode, not str
If I use edge, it gets further but errors when trying to log a message during the bundle phase:
2020-04-02 21:59:05 [INFO] Running bundle phase
2020-04-02 21:59:05 [INFO] Pulling secrets from /home/ubuntu/
2020-04-02 21:59:05 [ERROR] Unknown error
Traceback (most recent call last):
File "/snap/
args.func(args)
File "/snap/
return method(*args, **kwargs)
File "/snap/
manifest.
File "/snap/
phase_
File "/snap/
logging.
TypeError: sequence item 0: expected str instance, list found
ubuntu@
Any ideas for a workaround?
I tried installing from a PPA, but that depends on a juju-deployer package not in the archives. It also appears to be the same version as the stable snap -- but I was thinking I could at least edit the python files installed as root to debug or fix it if I installed a deb.
ubuntu@
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mojo : Depends: juju-deployer (>= 0.6.4) but it is not going to be installed
Depends: python-
E: Unable to correct problems, you have held broken packages.
ubuntu@
mojo | 0.5.2-2 | http://
I tried installing from source into a python2 virtualenv, thinking I could at least nop out the problems or contribute a patch, but that fails with:
(env) ubuntu@
running develop
running egg_info
writing requirements to mojo.egg-
writing mojo.egg-
writing top-level names to mojo.egg-
writing dependency_links to mojo.egg-
writing entry points to mojo.egg-
reading manifest file 'mojo.egg-
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.txt' under directory 'mojo'
warning: no files found matching '*.py' under directory 'tests'
warning: no files found matching '*.txt' under directory 'tests'
warning: no files found matching '*.yaml' under directory 'tests'
no previously-included directories found matching 'debian'
no previously-included directories found matching '.bzr'
writing manifest file 'mojo.egg-
running build_ext
Creating /home/ubuntu/
Adding mojo 0.6.0 to easy-install.pth file
Installing juju-parse-status script to /home/ubuntu/
Installing mojo-project-
Installing mojo-project-new script to /home/ubuntu/
Installing juju-check script to /home/ubuntu/
Installing mojo-vol script to /home/ubuntu/
Installing mojo-admin script to /home/ubuntu/
Installing mojo-info script to /home/ubuntu/
Installing mojo script to /home/ubuntu/
Installed /home/ubuntu/
Processing dependencies for mojo==0.6.0
Searching for jinja2
Reading https:/
Downloading https:/
Best match: Jinja2 3.0.0a1
Processing Jinja2-
Writing /tmp/easy_
Running Jinja2-
Traceback (most recent call last):
File "setup.py", line 75, in <module>
include_
File "/home/
return distutils.
File "/usr/lib/
dist.
File "/usr/lib/
dist.
File "/usr/lib/
self.
File "/usr/lib/
cmd_obj.run()
File "/home/
self.
File "/home/
self.
File "/home/
[requirement], self.local_index, self.easy_install
File "/home/
replace_
File "/home/
return self.obtain(req, installer)
File "/home/
return installer(
File "/home/
return self.install_
File "/home/
dists = self.install_
File "/home/
return self.build_
File "/home/
self.
File "/home/
run_
File "/home/
raise
File "/usr/lib/
self.
File "/home/
yield
File "/usr/lib/
self.
File "/home/
saved_
File "/home/
six.
File "/home/
yield saved
File "/home/
yield
File "/home/
_execfile(
File "/home/
exec(code, globals, locals)
File "/tmp/easy_
File "/home/
return _open(path, mode, *args, **kw)
TypeError: 'encoding' is an invalid keyword argument for this function
Hi,
I couldn't reproduce in a fresh bionic machine:
ubuntu@ juju-14d617- default- 27:~$ mojo project-new -c lxd --series bionic test-lp1870439 .local/ share/mojo/ test-lp1870439 ... .local/ share/mojo/ test-lp1870439/ bionic ... -bionic' series- root to LXC container test-lp1870439- bionic .local/ share/mojo/ test-lp1870439/ bionic juju-14d617- default- 27:~$
2020-04-14 13:22:42 [INFO] Checking test-lp1870439 project path at /home/ubuntu/
2020-04-14 13:22:42 [INFO] Checking test-lp1870439 project container at /home/ubuntu/
2020-04-14 13:22:42 [INFO] Not found, creating container
2020-04-14 13:22:42 [INFO] Retrieving image from ubuntu:bionic.
2020-04-14 13:22:45 [INFO] Launching container 'test-lp1870439
2020-04-14 13:22:48 [INFO] Adding device mojo-project-
2020-04-14 13:22:48 [INFO] Setting acls inside container: setfacl -Rdmu:100000:rwX /home/ubuntu/
2020-04-14 13:22:48 [INFO] Checking test-lp1870439 project container is setup ...
ubuntu@
From your logs, I think that you have MOJO_* variables set, can you share them ?