Commit Graph

1157 Commits

Author SHA1 Message Date
James Page 6603a7f323 Retire master branch of nova-lxd
Drop content and replace with retirement notice.

Change-Id: I2de2eff7694d60597a6413a0a64124fbbede69bb
2019-07-23 13:56:57 +01:00
Zuul 09ea20c600 Merge "readme: remove exercices details" 2019-04-24 13:12:39 +00:00
OpenDev Sysadmins 6ef3e4dd9e OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:51:34 +00:00
Sahid Orentino Ferdjaoui e8c1157c37 readme: remove exercices details
The excercices in devstack have been removed:
  e484f3b1c8086567ce5dc1e55ee503def8e5b429

Change-Id: I1ccdd629343519b97bad4e1dd94ae9608e0a7cfe
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
2019-04-12 15:24:41 +00:00
Sahid Orentino Ferdjaoui d0faf787d9 driver: add missing use_cache parameter for get_info()
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>
2019-04-12 12:16:13 +00:00
Sahid Orentino Ferdjaoui 2a5c726aa4 readme: devstack comes with cirros for lxd
Change-Id: I48344cb896cbe561ef6414c335e6aed56f87b6c0
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
2019-04-04 09:26:57 +00:00
Sahid Orentino Ferdjaoui 93bf60fed5 readme: udpate readme to refer bionic instead of xenial
Change-Id: Id90a4e5aefae4eaaa45971831abb59f9180d1cdd
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
2019-04-04 09:26:55 +00:00
Sahid Orentino Ferdjaoui b31fa918eb devstack: remove HOST_IP and FLAT_INTERFACE from local.conf.sample
We should let chance for automatic detection

Change-Id: I50d1e12baf5fe00edb241da633ec797b4647df60
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
2019-04-04 09:21:54 +00:00
Sahid Orentino Ferdjaoui 23d1416932 devstack: remove bionic condition when init lxd storage
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>
2019-04-04 09:21:52 +00:00
Sahid Orentino Ferdjaoui 13229ff977 devstack: replace LXD_POOL_ZNAME with LXD_POOL_NAME
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>
2019-04-04 09:20:05 +00:00
Sahid Orentino Ferdjaoui 3d5832dafd devstack: remove bionic condition for configure nova.conf
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>
2019-04-04 09:19:24 +00:00
Sahid Orentino Ferdjaoui 9ce4f847e5 devstack: use package install one-line pattern
Change-Id: I5ebcd8c497e2978a4349e217eb55fb4518cd4aea
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
2019-04-04 09:19:23 +00:00
Sahid Orentino Ferdjaoui 053f02fb27 devstack: remove bionic condition to install appamor related pkgs
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>
2019-04-04 09:19:03 +00:00
Alex Kavanagh e2aab580bd Add snapped version of LXD support to nova-lxd
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
2019-04-03 10:02:56 +00:00
Sahid Orentino Ferdjaoui 067e4bd1bf driver: catch any cleanup exceptions during spawning process
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>
2019-04-02 16:34:31 +00:00
Alex Kavanagh aee3ef71d9 On Bionic ensure that a default storage backend is configured
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
2019-04-02 12:45:03 +01:00
Zuul 3c01bfcb7e Merge "Update json module to jsonutils" 2019-03-01 10:15:49 +00:00
Zuul 83c772dc7e Merge "Improve description about installing with devstack" 2019-02-28 17:32:20 +00:00
Zuul e4829a7c60 Merge "Move calling pylxd.client after Tempest tests initialized" 2019-02-28 17:32:19 +00:00
jacky06 9bc72163ae Update json module to jsonutils
oslo project provide jsonutils, and lxd use it in many place[1],
this PS to update the remained json module to oslo jsonutils for
consistency.

[1]: https://github.com/openstack/nova-lxd/search?utf8=%E2%9C%93&q=jsonutils&type=

Change-Id: I7bfbb523f2427d8c798868964eecec955078d0fe
2019-03-01 00:41:06 +08:00
Masayuki Igawa 046f58dc1f
Move calling pylxd.client after Tempest tests initialized
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
2019-02-21 13:30:59 +09:00
Michael Johnson 15cdfc071b Fix 'filter' object is not subscriptable
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
2019-02-10 10:25:31 -08:00
Rikimaru Honjo 6693f08db6 Improve description about installing with devstack
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
2019-02-09 08:20:25 +00:00
Sahid Orentino Ferdjaoui 0ea07af2a2 [devstack] lxd/pool needs to be configured when using ZFS
Change-Id: Ibf00d8af1c97540726625452ed7bbc1457fc1c05
Related-to: #1782329
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
2019-01-27 12:51:03 +00:00
Zuul 9daffc1279 Merge "[devstack] properly clean ZFS backend" 2019-01-25 23:56:30 +00:00
Zuul d4fb1a3ed4 Merge "Change openstack-dev to openstack-discuss" 2019-01-24 11:11:56 +00:00
Sahid Orentino Ferdjaoui cbb3d64b5f [devstack] properly clean ZFS backend
Change-Id: Iedf157a2f156565ca7798cfd62954f4807922eae
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
2019-01-24 09:46:19 +00:00
Zuul 58974a6a6b Merge "[devstack] don't try to configure ZFS backend if already present" 2019-01-24 00:57:05 +00:00
Vieri 80b99add8a Change openstack-dev to openstack-discuss
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
2019-01-23 18:38:15 +00:00
Andreas Jaeger a040e6ed35 Use template for lower-constraints
Use openstack-lower-constraints-jobs template, remove individual
jobs.

Change-Id: I67e21d983f99d6284fd834cc397221beaf2bf688
Needed-By: https://review.openstack.org/623229
2019-01-23 16:28:10 +00:00
Sahid Orentino Ferdjaoui 13bb85bf96 [devstack] don't try to configure ZFS backend if already present
Change-Id: I4b7476f4b8be3592ddef7d6a01c74dfb1a6d0db4
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
2019-01-23 15:32:33 +00:00
Sahid Orentino Ferdjaoui d63ff87304 [devstack] fix wrong package name to install for zfs
Change-Id: I63f89cbac72439f285ac506089a3954b519f450c
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
2019-01-23 12:54:55 +00:00
Sahid Orentino Ferdjaoui 7e39428691 add mutex to protect container instances
(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>
2019-01-21 15:18:26 +00:00
Sahid Orentino Ferdjaoui bf3e123e1f fix error on delete interface when destroying instance
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>
2018-12-17 10:14:20 -05:00
Sahid Orentino Ferdjaoui 01c81314b8 fix object has no attribute 'create_ovs_vif_port'
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>
2018-12-17 10:14:20 -05:00
Zuul 270b55759d Merge "Fix sizing and quotas nova to lxd on unsupported backends" 2018-11-14 12:17:03 +00:00
Alex Kavanagh cd95839e4e Fix sizing and quotas nova to lxd on unsupported backends
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
2018-11-13 18:36:12 +00:00
Zuul bbdd85d5ce Merge "Add a feature support matrix" 2018-10-31 20:10:22 +00:00
Alex Kavanagh b49d78d033 Fix i18n import issue when using _ in storage.py
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
2018-10-24 16:14:09 +01:00
Rikimaru Honjo 6bc7407193 Fix a tox environment name from func_lxd to lxd
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
2018-10-11 06:50:43 +00:00
Rikimaru Honjo 2f9646bcd5 Add a feature support matrix
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
2018-10-09 08:29:52 +00:00
Alex Kavanagh c4c16bcf49 Fix bug in scenario/manager and cover it with pep8
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
2018-09-05 20:16:02 +00:00
Zuul bc8d540c95 Merge "Switch to using stestr" 2018-07-26 14:23:19 +00:00
Chuck Short 8f65d1af8f Switch to using stestr
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>
2018-07-24 20:12:07 -04:00
Zuul 292c4fae2e Merge "fix tox python3 overrides" 2018-07-24 15:47:22 +00:00
Alex Kavanagh f1bbc03b65 Fix problem with 'storage.zfs_pool_name' being removed from lxd 3
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
2018-07-23 09:36:22 +01:00
Zuul a02fce0d31 Merge "Add back in instance to logging entries" 2018-06-15 11:32:13 +00:00
Zuul fb0326a381 Merge "Remove volume v1 API service client usage" 2018-06-12 13:22:02 +00:00
Alex Kavanagh dbe0846b60 Add back in instance to logging entries
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
2018-06-12 10:00:44 +00:00
Zuul 33a55bc978 Merge "'create_ovs_vif_port' function moved to os-vif" 2018-06-12 08:57:32 +00:00