The recent change I added to report progress while copying LXD images is working, but it is leaving the machine in status: allocated:
machines:
"0":
juju-status:
current: started
since: 16 Mar 2016 16:36:52+04:00
version: 2.0-beta3.1
dns-name: 54.78.131.112
instance-id: i-34ad00be
machine-status:
current: running
message: running
since: 16 Mar 2016 16:36:52+04:00
series: trusty
containers:
0/lxd/0:
juju-status:
current: started
since: 16 Mar 2016 16:40:52+04:00
version: 2.0-beta3.1
dns-name: 10.0.3.184
instance-id: juju-machine-0-lxd-0
machine-status:
current: allocating
message: 'copying image for ubuntu-trusty from https://cloud-images.ubuntu.com/releases:
100%'
since: 16 Mar 2016 16:39:59+04:00
series: trusty
Notice that the "juju-status" is started, but the "machine-status" is still allocating.
So I worked out *why* this is happening, but I'm not sure how to fix it yet.
Specifically, CopyImage starts a copy operation and uses another goroutine listening on a websocket for events from LXD indicating operation progress.
However, we are still getting those events even after CopyImage has returned. Which doesn't make a lot of sense. But I see this in the log files: