The excercices in devstack have been removed:
e484f3b1c8086567ce5dc1e55ee503def8e5b429
Change-Id: I1ccdd629343519b97bad4e1dd94ae9608e0a7cfe
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
With 19cb8280232 The driver interface has been updated. Now that the
method get_info() has an extra parameter 'use_cache'. That one is
currently not going to be used in lxd driver since we don't cache such
info.
Change-Id: Iaa1c7e9717619b087b98cc5171de2984954ccc6e
Closes-Bug: #1824300
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
We should let chance for automatic detection
Change-Id: I50d1e12baf5fe00edb241da633ec797b4647df60
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
This make devstack working on all ubuntu based version that is shipped
with LXD3. For versions that ship LXD2 this do not cause any
incidence.
Note that: When using LXD_POOL_NAME with dir backend. LXD2 does not
have the concept of pools so it can't be anything else than "default",
for LXD3 this can be updated but LXD should have been initialized and
the pool created.
Change-Id: I781fb97100937e5189994f3752d0b95b15614d85
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
In this commit we remove all references of LXD_POOL_ZNAME to use a new
generic one LXD_POOL_NAME. This we avoid to use speicifc condition
when configuring nova.conf.
Note that: now the default zfs pool name created will be "default"
Change-Id: I1dc4358457b3bfda5bd7bb8d9725ef4e8a7dfd63
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
Nova should be configured with the right pool name that in all
cases. In this commit we remove the bionic condition. Which also avoid
us to revisit this file for each ubuntu based version that ship LXD3.
In this commit we also remove the outdated comment.
Change-Id: I44b3a83ec0eb3c1c35e15b66c219c948fd57c2ac
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
In this commit we remove the unecessary condition that restricts the
install of appamor related packages to Bionic. We replace it with a
mechanism which will install them if necessary. This will avoid any
revisiting of this file for ubuntu based versions that do not provide
them.
Change-Id: Ie2766b0c742b2c4416947bb77050992a51034568
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
If LXD is installed via a snap, then the location of the console log
changes from the package version. This patchset detects whether LXD is
snapped, and if so, provides a slightly different path for the console.
Change-Id: I369a8cf63bee86b78411c72d3c1d9d8a6da6b70d
If something wrong happens during the process of spawning an
instance. The process is calling 'cleanup' to rollback, unfortunately
this process is also sensible and can fail in a way that the original
error would be hidden.
In this commit we ensure to catch any exceptions coming from cleanup
to keep the original and root error well logged.
Change-Id: I81e5d0a9532e88b11ad2ef14c995db6e6a966f2f
Related-bug: #1821878
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
Sets up the default dir backend and configures it as the default pool
for lxd. This is required on bionic (LXD 3.0.x) as there is no default
storage pool by default.
Also installs apparmor which LXD requires to operate, but that is
missing from ubuntu image that is built for devstack-gate.
Related-Bug: 1822182
Change-Id: I8cc83486d2e040e02dfbeec570d8c8b59b2c2a97
This commit moves calling pylxd.client.Client into resource_setup(). If
we have this in __init__(), the test list command `tempest run -l` is
failed without lxd client settings. It's not desirable. And this commit
also renamed variables for lxd client in the code to avoid confusion
with the other clients.
Change-Id: I5498789b2b1e4be6727b6520fc80ce3bace25cf3
nova-lxd has a python3 compatibility issue where it will fail with:
TypeError: 'filter' object is not subscriptable
This patch corrects that problem.
Change-Id: Ib2208fdc2289b6a52e5ad41ca540c75e9d1d94b4
Closes-Bug: #1815325
LXD_BACKEND_DRIVER=zfs should be specified in local.conf if LXD
version is 3.0.
In addition, LXD_BACKEND_DRIVER=zfs requires zfs 0.7.0 or higher.
This patch adds those information to README and local.conf.sammple.
Change-Id: I1692aefd2c4e8daba57629c5f99559ec9593fa5d
Closes-Bug: #1815272
Closes-Bug: #1815273
Mailinglists have been updated. Openstack-discuss replaces openstack-dev.
Update the setup.py to support twine; explicitly say that the long
description is a markdown file.
Change-Id: Ia5315b68818e86a08c0b35e8ed896f91bf851228
(SO) Without protecting it, several methods can access in same time to
the container instance and updating the state.
(AJK) Also fix py27 change where nova.network.linux_utils has moved
to/as nova.privsep.linux_net
Closes-Bug: #1809114
Change-Id: I28e68e150f5d6e3efdb243aae9e3cf15fda01a65
Co-authored-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
Co-authored-by: Alex Kavanagh <alex.kavanagh@canonical.com>
An instance may be destroyed prior nova-compute receives a
vif-delete-event. detach_interface() will so try to get the lxd
profile related to the instance which does not exist anymore, the
process will fail with a NotFound exception raised by lxclib.
In this commit we solve the issue by handling the exception and so
avoiding on updatating the lxc profile. We still continue the process
of vif_driver.un_plug() to ensure all got cleaned.
Change-Id: If7fd5dd17323ec625df3518311dfb012302b2711
Closes-Bug: #1808819
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
The module from vif_plug_ovs from os_iv does not exist anymore. In
this commit we import in our tree those two methods create_ovs_port()
and delete_ovs_port().
Change-Id: Ie9474e781922ea8edd413a3df59abe99a1a6db05
Closes-Bug: #1808388
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
The dir and lvm backends don't support sizing and quotas. This was made
more complicated with LXD3 as "storage" became the default and the dir
backend, if used, has to be set up as a storage pool. LXD3 is the
default on bionic. To resolve an openstack-ansible issue and lay the
ground work for nova-lxd and storage pools and the lxd charm, this patch
makes resolves sending sizes and quotas for a profile root device on lvm
and dir backends.
Change-Id: Idba4f5f3c6015616160d85f25a658cb7e5c43652
Closes-Bug: #1698761
Essentially, one of the error messages (which is rarely hit), uses
the underscore (_) from nova.i18n, but it wasn't imported into the
module.
Change-Id: If72f5d16943602f2479c7558324b2ce76cbeed7b
The openstack-ansible-nova-lxd test of Zuul check is failed now.
This test uses a tox environment named as "func_lxd".
The "func_lxd" was defined in the
openstack/openstack-ansible-os_nova repository.
But, the "func_lxd" was renamed to "lxd" in the following patch:
https://review.openstack.org/#/c/600838/
So this patch changes the environment name from "func_lxd" to "lxd".
Change-Id: Idbb12a07fe5dae71b603d5cb6f238bf2bee89a5f
This patch adds a feature support matrix of nova-lxd.
Items and descriptions of matrix are basically quoted from
the support matrix of nova:
https://docs.openstack.org/nova/latest/user/support-matrix.html
"Block storage over RBD(Ceph)" and "VXLAN networking" are
added newly.
The nova's matrix contains items other than operation.*.
(e.g. networking.*, storage.*, console.*...)
But, those items are not appeared in the built html.
This is a spec of sphinx_feature_classification.support_matrix:
https://docs.openstack.org/sphinx-feature-classification/latest/user/index.html
So the matrix added by this patch changed all items to operation.*.
Change-Id: Iafb072b32f0d0568e04864afef8e053ab442f41a
manager.py had a syntax error which caused the module to be not
installable. This wasn't picked up in testing. This fixes the bug
and adds pep8 coverage to the nova_lxd_tempest_plugin so that the module
always remains installable.
Also, this fixes the tempest concurrency at 1. See the related bugs.
Closes-bug: #1790956
Related-Bug: #1790943
Change-Id: Ie542b062a9f0997f6363877ff03f0f9bfc8f3d43
According to Openstack summit session [1] stestr
is maintained project to which all Openstack projects should migrate.
Let's switch it then.
[1] https://etherpad.openstack.org/p/YVR-python-pti
Change-Id: Ic4eae5a383616e93f154b99208817ca9f20548cc
Signed-off-by: Chuck Short <chucks@redhat.com>
LXD 3.x onwards removes the key 'storage.zfs_pool_name' from the config.
This means the storage_pool API needs to be used to get the name of the
pool that juju is using for ZFS. This is a temporary fix until storage
pools can be threaded into nova-lxd properly. This occurs on bionic due
to LXD 3 being shipped as standard.
Change-Id: I6527640438331b86f2140cf0a772f7d207a6fd40
Closes-Bug: #1782329
In a previous commit, I erroneously deleted the instance=instance dict
entry from some of the logging calls, not realising they were a feature
of oslo.logging. This commit puts them back, and adds them in a few
more useful places for debuggin purposes.
Change-Id: I0a1be5a46a888db9f0782db90815a74d50ead298