juju-2.1-beta3 cannot add LXD container after host machine has rebooted

Bug #1652161 reported by Andrew McDermott
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Critical
Nate Finch

Bug Description

TL;DR

The root cause, I believe, is:

  https://github.com/juju/juju/pull/6684

# Reproducible steps:

$ juju version
2.1-beta3-xenial-amd64

$ juju bootstrap maas ...

$ juju status
Model Controller Cloud/Region Version
controller maas21-daily maas21-daily 2.1-beta3.1

Machine State DNS Inst id Series AZ
0 started 172.16.101.81 gtr46e xenial default

$ juju add-machine lxd:1

$ juju ssh 0/lxd/0 uname -n
juju-81c46c-0-lxd-0

# REBOOT THE HOST MACHINE
$ juju ssh 0 sudo reboot
# Wait until machine comes up

$ juju status
Model Controller Cloud/Region Version
controller maas21-daily maas21-daily 2.1-beta3.1

Machine State DNS Inst id Series AZ
0 started 172.16.101.81 gtr46e xenial default
0/lxd/0 started 172.16.101.82 juju-81c46c-0-lxd-0 xenial

$ juju add-machine lxd:0
# Machine ends up pending state...

$ juju status
0 started 172.16.101.81 gtr46e xenial default
0/lxd/0 started 172.16.101.82 juju-81c46c-0-lxd-0 xenial
0/lxd/1 pending pending xenial

Looking in the logs we see the following repeated:

2016-12-22 21:00:16 INFO juju.worker runner.go:262 stopped "0-container-watcher", err: worker "0-container-watcher" exited: setting up container dependencies on host machine: while running lxd init --auto: LXD init cannot be used at this time.
However if all you want to do is reconfigure the network,
you can still do so by running "sudo dpkg-reconfigure -p medium lxd"

error: You have existing containers or images. lxd init requires an empty LXD.
: exit status 1
2016-12-22 21:00:16 DEBUG juju.worker runner.go:190 "0-container-watcher" done: worker "0-container-watcher" exited: setting up container dependencies on host machine: while running lxd init --auto: LXD init cannot be used at this time.
However if all you want to do is reconfigure the network,
you can still do so by running "sudo dpkg-reconfigure -p medium lxd"

error: You have existing containers or images. lxd init requires an empty LXD.
: exit status 1

The root cause, I believe is this PR:

  https://github.com/juju/juju/pull/6684

Tags: lxd network
tags: added: lxd network
Nate Finch (natefinch)
Changed in juju:
assignee: nobody → Nate Finch (natefinch)
status: New → In Progress
importance: Undecided → High
Changed in juju:
importance: High → Critical
Revision history for this message
Nate Finch (natefinch) wrote :
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
milestone: none → 2.1-beta4
Curtis Hovey (sinzui)
Changed in juju:
status: Fix Committed → Fix Released
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.