openstack-ansible-nova-lxd test fails due to lxd storage pool not set up on bionic host
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack-Ansible |
Fix Released
|
Low
|
Jonathan Rosser |
Bug Description
nova-lxd has a non-voting test which is failing: openstack-
It is failing because (I'm guessing) recently the test moved to (Ubuntu) bionic, and the LXD storage pool is not being set up, nor configured, as part of the test.
The "emit-job-header" task indicates bionic:
[
{
"changed": false,
"failed": false,
"item": "ubuntu-bionic",
"msg": "# Node Information\
}
]
The test that fails is due to the storage pool not being set up:
2018-10-30 14:51:57.133 8165 ERROR nova.compute.
(the "pool" property has to reference the storage pool for the root device on LXD 3.0.x)
This is because LXD changed from 2.0 to 3.0, and there is no longer a "default" storage pool when creating an instance. The pool has to be created (even if it is a 'dir' type) and then referenced in the instance create in LXD. nova-lxd has the option to do it (lxd_storage_pool config param) in the openstack/
However, what's not clear to me is *how* to run the lxd create storage pool command from the ansible (I'm not familiar with ansible).
I'm guessing it's the "less templates/
So the command to run would be:
# create a default dir storage pool for bionic
lxc storage create default dir
The defaults/main.yml would need the pool "default" set as:
lxd_storage_pool: default
And, then things would hopefully work.
description: | updated |
description: | updated |
Changed in openstack-ansible: | |
status: | New → Confirmed |
importance: | Undecided → Low |
Changed in openstack-ansible: | |
assignee: | nobody → Jonathan Rosser (jrosser) |
Changed in openstack-ansible: | |
status: | Confirmed → In Progress |
Reviewed: https:/ /review. openstack. org/616302 /git.openstack. org/cgit/ openstack/ openstack- ansible- os_nova/ commit/ ?id=14572c31538 70b4fbe61022018 346f234b6fcdcd
Committed: https:/
Submitter: Zuul
Branch: master
commit 14572c3153870b4 fbe61022018346f 234b6fcdcd
Author: Jonathan Rosser <email address hidden>
Date: Wed Nov 7 20:36:50 2018 +0000
Fix nova-lxd tests for bionic.
This patch adjusts the nova-lxd deployment so that it works correctly
with LXD3 and bionic.
* Update the zuul job and project config to switch from xenial to bionic.
* Change the variable lxd_storage_pool to always have a defined value
in the role defaults. This variable represents the name of the LXD
storage pool which is distinct from any names associated with underlying
storage. LXD storage pools created with 'lxd init' are always called 'default'.
* Switch the role test storage backend from dir to ZFS. nova-lxd is
currently not working for the dir backend as it expects the storage
subsystem to support quotas.
* Due to limitiations in nova-lxd it is necessary to ensure that the
LXD storage pool name and ZFS pool names are both set to 'default'.
Closes-Bug: #1800837 3f20435da19907b 5adb7c1ef1f
Change-Id: If1e48bb2e789e1