project-create fails due to an IndexError
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mojo: Continuous Delivery for Juju |
Confirmed
|
Medium
|
Unassigned |
Bug Description
I'm on bionic and using mojo 0.5.1 installed from a snap on the edge channel.
The stacktrace below happens the first time I try to create a project. It successfully creates a container, and a subsequent call to project-new succeeds due to that.
I played around with pylxd to get the uid the same way that mojo does, and it returns an empty list instead of the config info when I tried it on a stopped container (the one that was created from mojo).
>>> client = pylxd.Client()
>>> container = client.
>>> container.name
u'c3upgrade-bionic'
>>> vsm = container.
>>> vsm
u'[]'
>>>
» mojo project-new $MOJO_PROJECT -s $MOJO_SERIES --container lxd
2019-10-23 10:02:42 [INFO] Checking c3upgrade project path at /home/codersqui
2019-10-23 10:02:42 [INFO] Checking c3upgrade project container at /home/codersqui
2019-10-23 10:02:42 [INFO] Not found, creating container
2019-10-23 10:02:42 [INFO] Using mojo container image mojo-ubuntu-
2019-10-23 10:02:42 [INFO] Launching container 'c3upgrade-bionic'
/snap/mojo/
.format(key, self.__
/snap/mojo/
key, self.__
2019-10-23 10:02:42 [INFO] Adding device mojo-project-
Traceback (most recent call last):
File "/snap/
load_
File "/snap/
cli.
File "/snap/
project.
File "/snap/
self.
File "/snap/
self.
File "/snap/
uid_
File "/snap/
return ast.literal_
IndexError: list index out of range
2019-10-23 10:02:42 [ERROR] Error calling external process
Traceback (most recent call last):
File "/snap/
args.func(args)
File "/snap/
return method(*args, **kwargs)
File "/snap/
subprocess.
File "/snap/
raise CalledProcessEr
CalledProcessError: Command '('mojo-
I could reproduce the issue in a fresh VM using both the stable and the edge snaps.
https:/ /pastebin. canonical. com/p/9QPWts9m3 7/