Commit Graph

1094 Commits

Author SHA1 Message Date
OpenDev Sysadmins a029d2af2f 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:35 +00:00
Alex Kavanagh 84a8c59be6 Fix problem with 'storage.zfs_pool_name' being removed from lxd 3
Cherry-pick from master: f1bbc03b65

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: Ic80ad942759718785b62e4fc887ded0a345bb260
Related-Bug: #1782329
2018-07-29 22:14:17 +01:00
Alexander Kharkov bdf27529a3 Fixed 'privileged' instance creation using config-drive
Exsiting config drive creation flow assume that LXD
ALWAYS return UID mapping for instance.
For privieged this is not true, as not UID mapping perfomed.
Existing code which try simply split JSON answer and
lookup in it failed as result.
Parser switched to JSON based parsing and have fallback
to zero UID if no mapping found in LXD answer.

Cherry-picked from: 5512808831

Change-Id: I263f4d4e460f798c83a4628ea85182097dc40113
Related-Bug: 1707101
2018-03-01 16:06:46 +00:00
Alex Kavanagh 64454c5ac3 Add a test for destroying an instance when in rescue mode
A previous commit added some code to delete the rescued comtainer
when the instance was in rescue mode.  This means that there are two
containers for the instance (and thus using the profile).  However, no
test was added at that stage.  This patchset adds a test to verify that
the containers do get deleted and modifies the destroy code to also
ensure that the rescue container is also stopped before deletion.

Cherry-picked from: 6b56b30e8b

Change-Id: I7f81167c098dfdc24735f2f841cd21f6ce2cb1f4
2018-03-01 16:00:00 +00:00
Alex Kavanagh 784d0e5cdd Change the .testr.conf to .stestr.conf
This is to squash the warning and bring the project up to date.

Change-Id: I63847f13d78f54aaa9335dc730d051bf4657f137
2018-03-01 15:58:06 +00:00
Alex Kavanagh 01b6a8e075 Change .gitreview for stable/queens
Change-Id: I32c50cf15c81f01c788a5b231232ce09db87df7d
2018-02-23 13:33:59 +00:00
Zuul 67cf1de3d4 Merge "Add placement api and client to devstack configuration" 2018-02-23 08:35:29 +00:00
Zuul 34e4171410 Merge "Replace the usage of some aliases in tempest" 2018-02-23 08:34:40 +00:00
Zuul c196274d85 Merge "Switch to tempest.common.utils.requires_ext" 2018-02-22 21:28:18 +00:00
Zuul c98286cc30 Merge "Add stestr to .gitignore file" 2018-02-22 20:58:51 +00:00
Zuul 7f9a259d6a Merge "Memory hog during image import from glance fixed" 2018-02-22 20:58:47 +00:00
Yurtaykin, Andrey 2d1a056566 Add placement api and client to devstack configuration
This resolves issues with use of the reference configuration
in OpenStack Ocata or later.

Closes-Bug: 1660973
Change-Id: I02bf7f730f17503afd0ad1ff7671dddb264ef46d
2018-02-22 20:08:17 +00:00
Vu Cong Tuan 640c365a52 Replace the usage of some aliases in tempest
In tempest, following aliases have been moved in version Pike
and will be removed in version Queens:
* manager > os_primary [1]
* admin_manager > os_admin [2]
* os_adm > os_admin [3]
* os > os_primary [4]
* alt_manager > os_alt [5]

[1] https://review.openstack.org/#/c/468036/
[2] https://review.openstack.org/#/c/467852/
[3] https://review.openstack.org/#/c/467605/
[4] https://review.openstack.org/#/c/466991/
[5] https://review.openstack.org/#/c/457555/

Change-Id: Icd2ba2fd8e47cf0d515e6004c3793b499eef802e
2018-02-22 20:04:02 +00:00
Nguyen Hung Phuong b47dcf5a53 Switch to tempest.common.utils.requires_ext
Tempest deprecated tempest.test.requires_ext [1]
At this moment, it is available in tempest.common.utils

[1] https://review.openstack.org/#/c/493668/

Change-Id: Ie6a104d2cf6ccc4217df62a3784b8757457f3142
2018-02-22 17:47:57 +00:00
Nguyen Hung Phuong e6b5850fd9 Add stestr to .gitignore file
Change-Id: Ifa0fe126c354d878732b7bd48556782641fe751b
2018-02-22 17:47:01 +00:00
Alexander Kharkov 3a6ea27da3 Memory hog during image import from glance fixed
In case when unified image format is used it is possible
to pass file like object to pylxd API to import image to LXD.
In that case image not read to memory and nova-compute does
not utilize abnormal amount of RAM.

requirements.txt bumped pylxd to 2.2.5 as the change requires pylxd
change "Image import - memory hog fix"
(8588c3afb316299f204ae502b1c35dd7d7e3420e)

Change-Id: I4d47ab4e40b62925c0b63e7ac740f35709df1e3d
Closes-Bug: 1714415
2018-02-22 17:46:18 +00:00
James E. Blair 9dce01eab9 Zuul: Remove project name
Zuul no longer requires the project-name for in-repo configuration.
Omitting it makes forking or renaming projects easier.

Change-Id: Id88a23a4e98bb2a12300208f054a1637563bf963
2018-02-22 17:45:30 +00:00
Alex Kavanagh cb136ab1e6 Add capabilities flag "supports_multiattach" flag
This adds the flag "supports_multiattach" as False to the
driver's capabilities dictionary to enable it to work with
nova from commit baa8278ca78f onwards.

Change-Id: I08defc8b506a8936bd206885c189a5f1a393d260
2018-02-22 14:18:30 +00:00
OpenStack Proposal Bot 16d06d149e Updated from global requirements
Change-Id: I6e2ea4b8c4d0942255777818ae095df7556154fc
2018-01-19 20:24:19 +00:00
OpenStack Proposal Bot a614dec5b1 Updated from global requirements
Change-Id: I846bf39a618fa9531eac5f41a06551aa5e4a21f2
2018-01-16 12:40:35 +00:00
Zuul 1440684e3b Merge "Fixed import error of nova-lxd-tempest-plugin" 2017-12-05 11:00:08 +00:00
Zuul c4946435cf Merge "Add non-voting nova-lxd functional test" 2017-12-05 11:00:08 +00:00
OpenStack Proposal Bot c8ab4002cb Updated from global requirements
Change-Id: I1e788fbb1dfd0d973a3d461bf6ca9a0a660aa1dc
2017-12-03 21:25:40 +00:00
Chandan Kumar 56df4ecd91 Fixed import error of nova-lxd-tempest-plugin
* While running nova lxd tempest plugin with tempest, it gives
  ERROR tempest ImportError: No module named nova_lxd_tempest_plugin.plugin.
  It can be fixed by adding nova_lxd_tempest_plugin to site packages.

Change-Id: Id08618a497b0f9205680a97d31600481b92eab08
2017-11-13 11:16:25 +05:30
OpenStack Proposal Bot e498de603b Updated from global requirements
Change-Id: I25956808057ad06da0256e3775d9eb3db37bc26c
2017-11-12 21:07:19 +00:00
OpenStack Proposal Bot 4afda828e4 Updated from global requirements
Change-Id: Ib7b1b1095089b5d3cf14006696e8afa8a3e20f52
2017-11-08 15:22:45 +00:00
Jimmy McCrory 4e4bc6d0a7 Unblock nova-lxd gate
A recent change in nova[1] added an allocations argument to the
compute driver spawn function. Include it in nova-lxd's implementation
as well.

Also allow deletion of instances that are in a rescued state.

[1] https://review.openstack.org/#/c/511879/

Change-Id: Ie99ef6c7249b0b43cf21de6aaa883d04cdfafba2
2017-11-03 12:14:21 -07:00
Jesse Pretorius 0d7caa889f Add non-voting nova-lxd functional test
This patch implements a replacement of the legacy
functional test previously implemented using
openstack-ansible. The job and pipeline is defined
in-repo to ensure that the nova-lxd team has complete
control over the voting status, pipelines it is in,
etc.

The test uses the 'func_lxd' tox environment in the
openstack/openstack-ansible-os_nova repository which
executes an integration build of nova services in a
container, using the nova-lxd compute driver, using
linuxbridge for networking and using the nodepool host
for compute.

Depends-On: If39e4bec8db0be04b13dfc005ee404b73c0b65d3
Depends-On: Ia5ab6aa43f912b3cb4adf98154cd3da12688c2e0
Depends-On: I4995fcac48889bd189cc1f25adb442b7a6637a46
Change-Id: I49075be82daf62b1ca564c77bf835ae83cd6595b
2017-10-25 10:35:03 +00:00
James Page aaa8b60215 Redux use of InstanceInfo object
Recent changes in Nova [0] remove a number of parameters from the
InstanceInfo object; re-align the nova-lxd driver to not provide
these values when constructing this object.

Also add chown & chmod to rootwrap configuration file until
nova-lxd moves to using privsep rather than rootwrap.

Include minor change to .testr.conf to deal with switch to
stestr (via os-testr).

[0] I5fe5c8121800e2b8da0860d53d818b7bd83c9e9d

Change-Id: I21caccaeb8794d1ee82956bd8c897b3f1cc366b0
2017-09-12 10:21:17 -06:00
Jenkins e045b7c928 Merge "Replace deprecated test.attr with decorators.attr" 2017-08-29 14:11:07 +00:00
Jenkins c14ed6a537 Merge "Update the documentation link for doc migration" 2017-08-29 14:11:00 +00:00
Jenkins e968708f66 Merge "Implemented resume_state_on_host_boot driver callback" 2017-08-24 10:58:12 +00:00
Alexander Kharkov d82fc3347d Implemented resume_state_on_host_boot driver callback
As result it is possible to use nova configuration option
'resume_guests_state_on_host_boot' option.
This option allow to keep instance RUNNING state across reboots
so if instance was in RUNNING state before reboot it will
started after reboot.

Change-Id: I884e0d1bf136488c1930673b25a560d0add12beb
Closes-Bug: 1708393
2017-08-14 07:12:05 +00:00
Alexander Kharkov 9307fcc208 Raise understandable by nova exception when LXD instance not found on host.
If LXD instance on host lost for some reason (corrupted, host
reinstall) but present in controller DB nova compute service
on compute node fails to start.
Nova manager asks LXD driver about instance info and got
LXD specific exception instead of responce or proper InstanceNotFound.
As result nova compute manager service became unusable - it does not
even register itself in controller and shown as 'down'.

Change-Id: I98b6b7ec0a9ccd31aa6d46ec3dedb923022cfcca
Closes-Bug: 1708589
2017-08-04 06:47:14 +00:00
Jenkins b10ec6f34e Merge "Added support for the LXD unified tarball format" 2017-08-03 12:57:40 +00:00
Alexander Kharkov b947a9afb3 Added support for the LXD unified tarball format
Attempt to detect if image imported from glance is in unified LXD format
(metadata + rootfs/) and import this image to LXD 'as is' if any -
without implicit metdata injection.

Existing behavior leads to unusable for instance creation LXD images
if they are in unified format and imported via nova LXD driver
as LXD can not instantiate rootfs properly for such images

Simple use case does not work without this fix:
1. create instance -> create snapshot -> launch instance from snapshot
image

Image format identification is straightforward - attempt to search
metadata.yaml in tarball /. If found 'unified' format assumed.

Additional issues fixed:
1. fixed issue when instance from snapshot image can not be launched
   on compute node where snapshot was created. The reason is image
   already present in LXD without glance alias after snapshot creation.
   As result nova tries to import it again from glance and got error
   from LXD - "Image with same fingerprint already exists".
   Attempt to lookup LXD image also by fingerprint during import
   and if any do not import but simply add required by nova alias.

Closes-Bug: 1651506
Change-Id: I77d3b7c8d7cf43d505fd86b294779dada204919a
2017-08-02 05:42:27 +00:00
OpenStack Proposal Bot eed20da218 Updated from global requirements
Change-Id: I7b68cd2fe81f3a8ab44dbb69236a4a51675d34da
2017-08-01 13:33:58 +00:00
ghanshyam fed468f060 Replace deprecated test.attr with decorators.attr
Tempest has deprecated decorator 'tempest.test.attr' and
moved the same as stable interface to 'tempest.lib.decorators
.attr' in version 16.1.0.

Let's use the stable interface for attr decorator.
This will help Tempest to remove the deprecated decorator.

Change-Id: I8e0face1852df17d64ec667bf591d8bb3f0791be
2017-07-31 10:20:49 +00:00
OpenStack Proposal Bot 928fe9f0ea Updated from global requirements
Change-Id: I152156be5e39914e9c3c10d9a28507b9dcaa94c7
2017-07-31 10:20:09 +00:00
Hangdong Zhang 655285fd65 Update the documentation link for doc migration
Change-Id: Icbb63027ce6530372475b9392eb373c8678ae0fb
BTW: Do some optimization as well (http -> https)
2017-07-31 10:20:03 +00:00
Chuck Short af15cd09d4 Fix traceback when running nova-console
Recently utils.last_bytes has moved to libvirt/utils.py in nova.
(2341a41eaee5152e95379e5ed38012270af82ef5). Duplicate the function
that was in nova/utils.py.

Also includes a fix for nova-lxd's gate:
Update test-requirements with wsgi-intercept

Closes-Bug: #1707096

Change-Id: Ie77c8e67e29e8a01bbf58ab9277c5110cd7c112e
Signed-off-by: Chuck Short <charles.short@ericsson.com>>
2017-07-31 10:14:14 +02:00
James Page 78b6c14f2c vif: redux interface wiring approach
The nova-lxd driver has to take a slightly different approach
to virtual interface wiring due to a lack of an equivalent to
'launch and pause' in LXD.

For some interface types, the last mile tap device needs to
be present for vif plugging to complete successfully which
occurs prior to the instance being launched; This change
refactors the vif module to create veth pairs directly
in nova-lxd, rather than delegating this to LXD as part of
a bridged network interface type.  This allows vif plugging
to complete prior to the instance being created in LXD.

The side effect of this change is that all currently supported
interface types are now configured as 'physical' interfaces
in LXD profiles for instances - wiring to bridges is handled
directly by the nova-lxd driver instead.

This change has been validated with:

   ovs driver + iptables hybrid firewall driver
   ovs driver + openvswitch native firewall driver
   linuxbridge driver + iptables hybrid firewall driver

The VIF wiring approach is described in detail in the VIF
wiring documentation included in this change.

Closes-Bug: 1681758
Change-Id: Ic268e989d1ee19f696298fb1e0db729a00352a12
2017-07-12 15:45:59 +01:00
James Page 8d80f29193 devstack: disable volume boot pattern tests
Generalize skip of volume boot pattern; nova-lxd does not support
boot from volume.

Change-Id: If3688b639a5a890a80124c332281f17bd4becfb8
2017-07-12 15:45:40 +01:00
OpenStack Proposal Bot ca9073ca17 Updated from global requirements
Change-Id: Ic93ab6d9d08615d30705dc586a1e0823b1c4cbcd
2017-06-27 12:16:56 +00:00
James Page 6c66bd1f46 Tidy tox targets, fix coverage reporting
Misc fixes to bring tox targets back inline with general OpenStack
standards (py27 and py35 targets executed by default).

Deal with running 27 and 35 tests in succession.

This change also includes some fixes for coverage reporting; however
they are still currently broken due to mismatching module names
between nova-lxd and nova.virt.lxd.

Change-Id: If0079309a4c4b6b57fc6b5e6f0e947926b010f09
2017-06-26 12:55:58 +01:00
James Page f8daa3b38b Blacklist test_get_server_diagnostics tests
The nova-lxd driver does not currently implement the server diagnostic
feature; blacklist tests and reference open bug report for resolution
at some point in the future.

Change-Id: Ifb6e1b8524a7f75761866ed14c42abc49c5f4d9b
Related-Bug: 1700516
2017-06-26 12:54:18 +01:00
Jenkins d0ca7b7854 Merge "Updated from global requirements" 2017-06-23 14:03:02 +00:00
James Page a60c3757c8 Enable tempest interface related tests.
Required tempest change has landed; re-enable tests.

Change-Id: Ib17cf10578be697dd291b81bafc700fe2d1a148a
2017-06-23 09:53:01 +01:00
OpenStack Proposal Bot 0cb8f26609 Updated from global requirements
Change-Id: I25fd46fd74f200aba175fec2a99499ff0e817b96
2017-06-15 16:30:06 +00:00
Jenkins cfa0ee2d48 Merge "Updated from global requirements" 2017-06-15 16:01:22 +00:00