openstack-ansible-nova-lxd test fails due to lxd storage pool not set up on bionic host

Bug #1800837 reported by Alex Kavanagh
6
This bug affects 1 person
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-ansible-nova-lxd.

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:

[
    {
        "_ansible_ignore_errors": true,
        "_ansible_item_label": "ubuntu-bionic",
        "_ansible_item_result": true,
        "_ansible_no_log": false,
        "_ansible_verbose_always": true,
        "changed": false,
        "failed": false,
        "item": "ubuntu-bionic",
        "msg": "# Node Information\nHostname: ubuntu-bionic-ovh-bhs1-0000173413\nProvider: ovh-bhs1\nLabel: ubuntu-bionic\nInterface IP: 158.69.67.189\n"
    }
]

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.manager [instance: ac07766f-4b0c-4cbe-ab6c-f43967c7f0e8] LXDAPIException: The container's root device is missing the pool property.

(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/openstack-ansible-os_nova project, file: defaults/main.yml

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/lxd-init.sh.j2" file.

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
Mohammed Naser (mnaser)
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_nova (master)

Reviewed: https://review.openstack.org/616302
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_nova/commit/?id=14572c3153870b4fbe61022018346f234b6fcdcd
Submitter: Zuul
Branch: master

commit 14572c3153870b4fbe61022018346f234b6fcdcd
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
    Change-Id: If1e48bb2e789e13f20435da19907b5adb7c1ef1f

Changed in openstack-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_nova stein-eol

This issue was fixed in the openstack/openstack-ansible-os_nova stein-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_nova train-eol

This issue was fixed in the openstack/openstack-ansible-os_nova train-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_nova ussuri-eol

This issue was fixed in the openstack/openstack-ansible-os_nova ussuri-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_nova yoga-eom

This issue was fixed in the openstack/openstack-ansible-os_nova yoga-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_nova victoria-eom

This issue was fixed in the openstack/openstack-ansible-os_nova victoria-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_nova wallaby-eom

This issue was fixed in the openstack/openstack-ansible-os_nova wallaby-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_nova xena-eom

This issue was fixed in the openstack/openstack-ansible-os_nova xena-eom release.

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.