Commit Graph

41437 Commits

Author SHA1 Message Date
Jenkins a5dae110fb Merge "libvirt: attach configdrive after instance XML" 2016-06-28 17:08:17 +00:00
Jenkins b20dc332ac Merge "Evaluate 'task_state' in resource (de)allocation" 2016-06-28 16:07:22 +00:00
Jenkins a0b224b17b Merge "XenAPI: Add option for running nova independently from hypervisor" 2016-06-28 15:27:40 +00:00
Stephen Finucane f1320a7c2d Evaluate 'task_state' in resource (de)allocation
There are two types of VM states associated with shelving. The first,
'shelved' indicates that the VM has been powered off but the resources
remain allocated on the hypervisor. The second, 'shelved_offloaded',
indicates that the VM has been powered off and the resources freed.
When "unshelving" VMs in the latter state, the VM state does not change
from 'shelved_offloaded' until some time after the VM has been
"unshelved".

Change I83a5f06 introduced a change that allowed for deallocation of
resources when they were set to the 'shelved_offloaded' state. However,
the resource (de)allocation code path assumes any VM with a state of
'shelved_offloaded' should have resources deallocated from it, rather
than allocated to it. As the VM state has not changed when this code
path is executed, resources are incorrectly deallocated from the
instance twice.

Enhance the aformentioned check to account for task state in addition to
VM state. This ensures a VM that's still in 'shelved_offloaded' state,
but is in fact being unshelved, does not trigger deallocation.

Change-Id: Ie2e7b91937fc3d61bb1197fffc3549bebc65e8aa
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Resolves-bug: #1587386
Related-bug: #1545675
2016-06-28 14:32:35 +01:00
Jenkins 5d15918076 Merge "XenAPI: Stream config drive to XAPI" 2016-06-28 12:55:22 +00:00
Jenkins 44d8b0d0cf Merge "Moving test helpers to a common place" 2016-06-28 11:07:07 +00:00
Jenkins 7c0de90203 Merge "Improve image signature verification failure notification" 2016-06-28 11:01:35 +00:00
Jenkins 0c8565097c Merge "XenAPI: Perform disk operations in dom0" 2016-06-28 10:28:37 +00:00
Jenkins 5f75130c94 Merge "libvirt: add nova volume driver for vzstorage" 2016-06-28 10:23:37 +00:00
Jenkins 99b6b0531e Merge "api-ref: correct the order of APIs in server-tags" 2016-06-28 01:46:21 +00:00
dane-fichter f39e660baf Improve image signature verification failure notification
This change modifies the exception handling when Nova's
image signature verification fails so that the build is
aborted and instance's fault shows the error.

Change-Id: I05d877fe92593edaaa8b93b87b4b787827cae8f0
Closes-bug: #1594385
2016-06-27 12:55:02 -07:00
Artom Lifshitz c5c26716bf libvirt: attach configdrive after instance XML
In order to expose device tagging metadata in the configdrive, the
latter needs to be attached after the instance XML has been generated
and device addresses are known, but before the guest OS runs, as
it may depend on cloud-init data on the config drive.

This patch moves configdrive creation after the instance XML has
been generated but before the guest runs.

Partially implements: blueprint virt-device-role-tagging
Co-authored-by: Vladik Romanovsky <vromanso@redhat.com>
Change-Id: I931421ea688641e2ceb212c6dc099639c53433f2
2016-06-27 19:07:55 +00:00
Jenkins 0871f4953d Merge "Add console auth tokens db api methods" 2016-06-27 18:18:43 +00:00
Jenkins f9a8692b80 Merge "Add CellMappingList object" 2016-06-27 18:17:46 +00:00
Jenkins 7a51a5ca46 Merge "make failures on api_samples more clear" 2016-06-27 18:16:48 +00:00
Dmitry Guryanov b71a594db6 libvirt: add nova volume driver for vzstorage
Driver for vzstorage cinder volumes. The driver mounts
vzstorage cluster and uses images, located on this mount
as volumes.

Snapshots of "in-use" volumes support:
https://review.openstack.org/#/c/276465/

Cinder part has been merged, here are the bluprint and review:
https://blueprints.launchpad.net/cinder/+spec/virtuozzo-cloud-storage-support
https://review.openstack.org/#/c/188869/

Blueprint: libvirt-vzstorage-volume-support

Change-Id: I6732fff3a5c40859781a017ef05046513685167f
Co-Authored-By: Evgeny Antyshev <eantyshev@virtuozzo.com>
2016-06-27 17:43:16 +00:00
Jenkins 8124a5b466 Merge "Port test_ipv6 to py3 and simplify to_global()" 2016-06-27 17:07:39 +00:00
Jenkins 91538d2622 Merge "Release notes: fix typos" 2016-06-27 17:05:13 +00:00
Jenkins a39ed347e0 Merge "Remove unnecessary __init__" 2016-06-27 17:04:31 +00:00
Jenkins ea894733e8 Merge "Remove unused LOG" 2016-06-27 16:55:51 +00:00
Jenkins 2a39be0e15 Merge "policy: Replaces 'authorize' in nova-api (part 2)" 2016-06-27 15:53:01 +00:00
Balazs Gibizer b19e37782a Moving test helpers to a common place
The instance booting helper functions will be reused by the
subsequent patches so it is moved to a common place.

Change-Id: I4684df49a5301ac3ffcdd2213164925514a1d1c2
2016-06-27 17:49:47 +02:00
Jenkins c0894626c4 Merge "Allow monitor plugins to set own metric object" 2016-06-27 15:43:00 +00:00
Claudiu Belu 93cc5e3ffd policy: Replaces 'authorize' in nova-api (part 2)
Adds 'fatal' argument (with default value True) to context.
If the argument is False, if a nova.exception.Forbidden
is raised, False is returned instead. This is the equivalent of
soft_authorize.

Adds docstring to nova.context.RequestContext.can.

Adds unit tests for nova.context.RequestContext.can.

Partially-Implements: bp policy-in-code

Change-Id: Ib6388822da3d3eb9b8fbd9b5c341cd8efeb790fe
2016-06-27 13:18:03 +00:00
Bob Ball eac75d49d0 XenAPI: Add option for running nova independently from hypervisor
Add the independent compute option and ensure appropriate failure cases
for all incompatible options.

Change-Id: I76c1e3a80da8142639328b204aea5da59551eea3
Implements-blueprint: xenapi-independent-nova
2016-06-27 13:41:27 +01:00
Bob Ball 5915da7402 XenAPI: Stream config drive to XAPI
Rather than mounting a guest disk into the compute node,
create the config drive locally and stream it to the
XenServer hypervisor.

Change-Id: I324538decbadf63e78ba86e20e3d41687b0a195a
Implements-Blueprint: xenapi-independent-nova
2016-06-27 13:41:27 +01:00
Bob Ball 3e85b80649 XenAPI: Perform disk operations in dom0
Move some disk operations from DomU to Dom0 to allow Nova
to run independently from the hypervisor.

Some disk types can be created in Dom0 (e.g. swap, ext3) but
others cannot.  Add support here for creating those that can
in Dom0.  This will be documented in the independent_compute
config flag in the last patch in this series.

Implements: blueprint xenapi-independent-nova
Change-Id: I634e783a5e19f9710544920e12300b299fc06b36
2016-06-27 13:41:15 +01:00
Victor Stinner 3204a46232 Port test_ipv6 to py3 and simplify to_global()
* ipv6.account_identifier.to_global(): on Python 3, encode project_id
  to UTF-8.
* Simplify also to_global(): replace netaddr.EUI(mac).words with
  netaddr.EUI.value to avoid conversions (int => str (hex) => int).
* tests-py3.txt: run nova.tests.unit.test_ipv6 on Python 3

Partially-Implements: blueprint nova-python3-newton
Change-Id: I6f6f711fd00980de8cdccbdfe2d636f21440aea7
2016-06-27 14:37:47 +02:00
Jenkins fcb3dbf870 Merge "Fix error message for VirtualInterfaceUnplugException" 2016-06-27 12:27:36 +00:00
Jenkins 76e857cade Merge "libvirt: virtlogd: use "log" element in char devices" 2016-06-27 11:50:40 +00:00
Jenkins eddf885c3a Merge "Make instance as second arg in compute api calls" 2016-06-27 11:49:56 +00:00
Jenkins f4e42e1ec6 Merge "Port cinder unit tests to Python 3" 2016-06-27 11:49:14 +00:00
Jenkins 44f95da186 Merge "Remove rate_limit param in builder" 2016-06-27 11:48:34 +00:00
Jenkins 55b0c24b36 Merge "libvirt: Add boot ordering to individual disks" 2016-06-27 11:47:48 +00:00
Jenkins 5333f91048 Merge "image_meta: Add hw_rescue_device and hw_rescue_bus" 2016-06-27 11:46:54 +00:00
Jenkins 0dfcfe2ccb Merge "api-ref: verify images.inc" 2016-06-27 11:46:09 +00:00
Jenkins 9373f7f2d5 Merge "XenAPI: Support neutron security group" 2016-06-27 11:45:26 +00:00
Jenkins c77a873c30 Merge "Check if flavor.vcpus is more than MAX_TAP_QUEUES" 2016-06-27 11:44:34 +00:00
Jenkins 1d329d5f1b Merge "live migration check source failed caused bdm.device_path lost" 2016-06-27 11:10:50 +00:00
Jenkins 6737c9b562 Merge "Stop using mox from unit/fake_server_actions.py" 2016-06-27 11:10:06 +00:00
Jenkins 888f69d7e3 Merge "Remove mox from unit/virt/libvirt/volume/*.py" 2016-06-27 11:09:16 +00:00
Jenkins cf3c99e28e Merge "Remove mox in tests/unit/objects/test_instance_faults" 2016-06-27 11:08:35 +00:00
Jenkins 51520dd631 Merge "Remove mox from tests/unit/virt/test_imagecache.py" 2016-06-27 11:08:01 +00:00
Jenkins 3d653c47fa Merge "Added support for new block device format in Hyper-V" 2016-06-27 11:07:21 +00:00
Jenkins 11b17dada3 Merge "libvirt: fix disk size calculation for VZ container instances" 2016-06-27 11:06:34 +00:00
Jenkins 9ab4e6ba2a Merge "add ploop support into qemu-img info" 2016-06-27 11:01:32 +00:00
Sudipta Biswas 2a53063679 Allow monitor plugins to set own metric object
The values reported by a monitor depends on the type of value which
will not be uniform for all the monitors. For example, the memory
bandwidth monitor will return a dict of ints while the cpu monitor
returns a normal int value. The monitor metric objects offer
different fields to be set depending on the monitor in question.

This patchset allows the monitors to decide what metric field
it would like to populate as over a general implementation of
creating the monitor metric object inside the base module.
This would also help in exchanging versioned objects between
the monitors and the compute drivers.

Eventually this work will lead up to making the metrics.update
notification as versioned.

Related to blueprint memory-bw
Co-Authored-By: Ahilan Rajadeva <rajadeva@us.ibm.com>

Change-Id: Ieaf3d44bbe73e71ad877199bbbc779afa4218b51
2016-06-27 14:38:32 +05:30
Dan Dan Song ae0116c2f2 api-ref: correct the order of APIs in server-tags
The order of APIs in server-tags isn't match the rule as other api
ref docs. This patch correct it.

Part of bp:api-ref-in-rst

Change-Id: Ie1a43863e4ede4f7a1e028131248263e9c5a434f
2016-06-27 17:00:07 +08:00
zhufl 99c11e526f Remove unused LOG
This is to remove unused LOG

Change-Id: I503198adf1cad1c4af9e0935c941eee5c2373991
2016-06-27 16:40:13 +08:00
zhufl 79402586ca Remove unnecessary __init__
This is to remove unnecessary __init__ to keep code clean.

Change-Id: Ib9f2d39122ea4bb24c864ba13afaf07f4b3a7a33
2016-06-27 15:23:00 +08:00