LXD pool already exists
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Incomplete
|
Low
|
Unassigned |
Bug Description
I'm trying to do some scale testing, creating lots of models in Juju concurrently, and trying it against the latest snap version of LXD.
After doing:
$ snap install lxd
$ export LXD_DIR=
$ juju bootstrap lxd --debug
$ for j in `seq 0 2`; do for i in `seq 0 9`; do juju add-model m$j$i --no-switch --debug & done; time wait; done
Every so often one of them fails with:
ERROR failed to create new model: failed to create new model: adding default storage pools for "lxd": creating default pool "lxd-zfs": validating storage provider config: creating LXD storage pool "juju-zfs": creating storage pool "juju-zfs": Failed to create the ZFS pool: cannot create 'juju-zfs': pool already exists
14:06:37 DEBUG cmd supercommand.go:459 error stack:
failed to create new model: failed to create new model: adding default storage pools for "lxd": creating default pool "lxd-zfs": validating storage provider config: creating LXD storage pool "juju-zfs": creating storage pool "juju-zfs": Failed to create the ZFS pool: cannot create 'juju-zfs': pool already exists
github.
github.
github.
github.
I'm guessing the issue is with storage pools and the new LXD. We seem to only sometimes handle when the pool already exists. I don't know if it is a concurrent initialization problem. Maybe when we have 10 things creating the pool at the same time, one of them will fail its retry count?
Anyway, this always used to work, so it feels like something we should at least understand what we changed.
$ juju --version
2.3.1-xenial-amd64
(this is 2.3.1 but with Tim's txn log watcher patch merged into 2.3)
Changed in juju: | |
assignee: | Simon Richardson (simonrichardson) → nobody |
If I add the models 1 at a time, none fail. It seems to have something specifically to do with adding them in parallel.