Commit Graph

1068 Commits

Author SHA1 Message Date
OpenDev Sysadmins fde6e82e5e 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
Alex Kavanagh a923465977 Fix up stable/pike to be able to pass tempest tests
1. Backport tempest-dsvm-lxd-rc from master to stable/pike

This is just to ignore some newer/changed tempest tests that the
pike release of nova-lxd doesn't support.

2. Fix up destroy method to ensure proper clean-up

Cherry-picked from: 6b56b30e8b.  This cleans up the destroy method
to ensure that both the containers are deleted if the destroy method is
called whilst and instance is in rescued mode.

Change-Id: Iaceb4bd9c91c07471259cea8e3e337150823c702
2018-02-28 11:56:24 +00:00
James Page 9747c27413 Open stable/pike branch
Change-Id: Idd28737311c30dc0443af52613e8fe2b85a43d4c
2017-08-30 14:03:10 +01: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
Jenkins bfb061d02c Merge "Using assertIsNone(xxx) instead of assertEqual(None, xxx)" 2017-06-15 15:58:01 +00:00
OpenStack Proposal Bot 522c0747dd Updated from global requirements
Change-Id: I4500ec12656d0efe618e6c1b7b8f752ee0373feb
2017-06-14 16:39:21 +00:00
James Page 16866d2cf8 Refactor container VIF handling for linuxbridge
Neutron recently changed behaviour to complete all bridge setup
and configuration for the linuxbridge driver via the neutron
linuxbridge agent, requiring Nova simply to setup the tap device
that subsequently gets plugged into a linuxbridge.

Rework plug/unplug handling based on libvirt driver to fallback
to a legacy style plug/unplug driver for tap devices of this kind.

In the case of LXD we actually still use a veth pair so that:

  a) security group rules are applied to the tap named
     device on the host.
  b) the container still gets part of a nic to use, named
     ethX internally to the container.
  c) the neutron linuxbridge agent can see the required tapXXX
     device prior to the container being created, allowing
     VIF plugging to be completed.

This looks something like this once wired and running:

           Host       |     Container

  [bridge] <-> [tapXXX|tinXXX] <-> [ethX]

The veth pair is mapping into a LXD container using the physical
LXD nic type.

As the drive now creates the veth pair for unbridged network
types, unplug must occur after the device has been removed
from the container during interface_detach.

Rework LXD device profile naming for consistency:

  a) VIFs attaching to bridges will be named inline with the
     bridge (no-change)
  b) VIFs not being attached to a bridge will be named with
     the VIF devname (changed from 'unbridged' which did not
     support any multiplicity).

Change-Id: I2fdf41e5640f5ca5e3bcd7df1aa159a65b706138
Closes-Bug: 1694719
2017-06-12 15:14:28 +01:00
James Page 698f3da561 Re-check image alias prior to sync from glance
If two processes attempt to upload the same image at the same
time, the second will fail as the image alias will already have
been created by the first process.

Re-check by image alias as part of the lock context for the image
prior to syncing the image from glance to ensure that a duplicate
sync is not executed.

Change-Id: Ie5ef1fcf9170e18cf41767683036162fd509ee94
Closes-bug: 1697455
2017-06-12 14:57:13 +01:00
James Page 41ac333680 Misc fixes for devstack gate tests
Correct typo in INSTALL_LXD setting.

Correctly set default for for LXD_GROUP.

Rewrite gate pre-test hook to use DEVSTACK_LOCAL_CONFIG.

Use central Cirros version and architecture.

Drop use of Xenial images for tempest tests.

Split out tempest configuration into test-config phase.

Change-Id: Iff0f0a501dae13e2306b9efb87d06c0d917d6233
2017-06-12 09:26:29 +01:00
Vu Cong Tuan 2760941c2f Using assertIsNone(xxx) instead of assertEqual(None, xxx)
Refer to OpenStack Style Guidelines:
https://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises

[H203] Unit test assertions tend to give better messages for more
specific assertions. As a result, assertIsNone(xxx) is preferred over
assertEqual(None, xxx)

Change-Id: I8ccc344a40762ddc01253e23b533e27f3618d5f1
2017-06-03 16:13:20 +07:00
Jenkins 52232047f1 Merge "Add storage pool support" 2017-05-22 10:37:40 +00:00
Chris MacNaughton d883fa99eb Add storage pool support
LXD has grown support for multiple storage pools
defined by name and type (btrfs, zfs, lvm, etc)
and we would like to support this in nova-lxd

Change-Id: I702d1600fdf70bfd1e2402e3455dd868e25214c0
2017-05-19 08:55:30 +02:00
James Page 95e1db84bc Pass readonly flag as a string, not a boolean.
The LXD API requires that data be passed as strings; pass the
readonly flag for config-drive support as a string to ensure
it can be parsed by LXD avoiding the following error:

  json: cannot unmarshal bool into Go value of type string

Change-Id: I0c5dbd9cb8b8ea4f43398849f8b4c33305231d54
Closes-Bug: 1691428
2017-05-17 10:54:06 +01:00
Chris MacNaughton ff1c8cd12c Update output to match our specs
python 2.x matched these correctly without the casts but a version
bump to python 3.x (identified in 3.5.3) changes the output, this
change casts to int when we expect an integer output

Change-Id: Id6010b95a3c90d5538497c9936a6484400436ca6
2017-04-27 11:42:02 +02:00
James Page 02ce341738 Report ZFS pool capacity and usage statistics
When LXD is using a ZFS backend, correctly report disk stats
based on the usage of the ZFS pool rather than the usage of
the filesystem at /var/lib/lxd.

Change-Id: I2f2b843156cdc47c2f3324d69c384f943a0e1499
Closes-Bug: 1680869
2017-04-07 17:17:41 +01:00
Jenkins a91cdd62ce Merge "Allow mounting more device types" 2017-04-05 14:29:07 +00:00
Jenkins a96a885d4f Merge "Local copy of scenario test base class" 2017-04-05 13:45:42 +00:00
Jenkins 2d1db850e2 Merge "Remove log translations" 2017-04-05 13:42:04 +00:00
OpenStack Proposal Bot 19a15cb1df Updated from global requirements
Change-Id: I13f37cb770e2bf68267c798757cbe71613c2ba34
2017-03-28 21:34:12 +00:00
James Page c3f55e797e Ensure config-drive is read-only
The /config-drive dir presented from the host OS should
be presented as read only to ensure that the instance
can write directly to the host OS filesystem.

Change-Id: I997ef68048fa0a77f9cb0b70c325b9b96c079e2f
Closes-Bug: 1675741
2017-03-24 13:14:18 +00:00
James Page 991b2bd550 Fix config-drive support inline with cloud-init
Proposed changes to cloud-init under the same bug will
introduce behaviour to support a config-drive type concept
for LXD containers at /config-drive.

The current path is broken; switch to this new path to
support offline configuration of cloud instances.

Change-Id: I4996a34f84eb088c408a6454de9281908490a8eb
Closes-Bug: 1673411
2017-03-24 08:06:55 +00:00
Chris MacNaughton 842914ab29 Allow mounting more device types
Use os-brick to give us support for ceph block devices

Change-Id: Icaeb16a41a1d07d381030867820b00e38eb12fbd
2017-03-23 12:21:21 +01:00
libing 3905c4a403 Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: Iadf6f8d68ee0fa52a71b693983dccf624957dcdc
2017-03-21 16:14:27 +08:00
Andrea Frittoli 2e5b73d126 Local copy of scenario test base class
The scenario tests base class from Tempest is not a stable interface
and it's going to be refactored on Tempest side, as notified in

http://lists.openstack.org/pipermail/openstack-dev/2017-February/112938.html

Maintain a local copy of the base class, taken from Tempest with head of
master at c5f1064759fe6c75a4bc5dc251ed1661845936cb.

Change-Id: I586d03848d96126640da030e393d468cd613a58a
2017-03-17 17:35:26 +00:00
Jenkins dd89e3336f Merge "Fix typo in documentation" 2017-03-16 12:31:51 +00:00
Jenkins 9e0580ffe1 Merge "Pass client object to flavor.to_profile calls" 2017-03-16 12:03:25 +00:00
Chris MacNaughton 8d6282a053 Fix typo in documentation
Change-Id: Ia812dae53d0861f8c0ba0aa6790fc8765a5b5035
2017-03-16 12:56:33 +01:00
Jenkins 6ac9d365cf Merge "Switch nova and upper-constraints back to master branches." 2017-03-16 11:55:42 +00:00
Jenkins 8ea803093c Merge "Updated from global requirements" 2017-03-16 11:23:47 +00:00
James Page 9ca7dc3f93 Pass client object to flavor.to_profile calls
Ensure that client attribute is passed to to_profile calls,
completing some refactoring earlier during the Ocata cycle.

This resolved issues with cold migration of containers between
compute hosts.

Change-Id: I6500349ecacd30a6cb7698fe3e0af2e1fb1817de
Closes-Bug: 1651006
2017-03-16 11:20:20 +00:00