Commit Graph

159 Commits

Author SHA1 Message Date
Stephen Finucane 817dcc89a9 Remove cells code
Thankfully the bulk of this is neatly organized in a single directory
and can be removed, now that the bulk of the references to it have been
removed. The only complicated area is the tests, though effort has been
taken to minimise the diff here wherever possible.

Part of blueprint remove-cells-v1

Change-Id: Ib0e0b708c46e4330e51f8f8fdfbb02d45aaf0f44
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-05-20 10:29:16 +01:00
ZhongShengping 7ecaa3fcf8 Replace git.openstack.org URLs with opendev.org URLs
Thorough replacement of git.openstack.org URLs with their opendev.org
counterparts.

Change-Id: I3e0af55e0707f04428a422b973d016ad30c82a12
2019-04-24 13:59:57 +08:00
Balazs Gibizer b2a995f198 Extend RequestGroup object for mapping
This patch adds two new fields to the RequestGroup ovo, requester_id and
provider_uuids. These two fields are needed to be able to hold and
communicate the mapping between the requester of the RequestGroup (e.g.
Neutron port) and the resource providers that are fulfilling the request
(e.g. network device RPs). If the RequestGroup represents the un-numbered
group then more than one RP can fulfill the request hence provider_uuids
is a list.

These new fields later in the series will be populated based on some
logic in the nova-conductor. However in the long run we expect that
these fields will be populated from the Placement allocation
candidates response.

blueprint bandwidth-resource-provider

Change-Id: Ic4735f92542e5e0ca36b459874dc486f6b360317
2019-02-07 20:06:51 -05:00
Előd Illés 70c7ba7324 Transform scheduler.select_destinations notification
Transform the scheduler.select_destinations.start and
scheduler.select_destinations.end notifications to the
versioned notification framework.

Change-Id: I019e88fabd1d386c0d6395a7b1969315873485fd
Implements: bp versioned-notification-transformation-stein
2018-11-30 13:20:35 +01:00
Alex Szarka fe4e47d989 Transform compute_task notifications
The following notifications have been transformed to
the versioned notification framework.

* compute_task.build_instances
* compute_task.migrate_server
* compute_task.rebuild_server

Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: Ibfb0a6db5920d921c4fc7cabf3f4d2838ea7f421
Implements: bp versioned-notification-transformation-stein
2018-11-21 16:23:28 +09:00
Balazs Gibizer d4f8974f87 Add request_spec.RequestGroup versioned object
Later patches will introduce a field in RequestSpec using this type as
the field type to store the resource requests coming from outside of
Nova like the bandwidth request coming from the Neutron ports.

This patch refactors the usage of placement.lib.RequestGroup. Until now
this class was used both by placement and nova services and they used
it only as a util class. However after this series the nova services
would like to use such a class via RPC which requires an OVO. This
patch makes sure that the new OVO is used by nova and the old plain
object is used by placement. This way placement is not forced to use
an OVO where no OVO functionality is required.

The minimum required version of oslo.versionedobjects is updated to
1.33.3 to include the fix for bug 1771804.

Change-Id: I46c97d2641d9685ef59771314665a17a5236097d
blueprint: bandwidth-resource-provider
2018-11-05 17:47:06 -05:00
Takashi NATSUME 5859741f4d Transform volume.usage notification
The volume.usage notification has been transformed to
the versioned notification framework.

Change-Id: Ica45a95d26b602f9a149d42516baf4b84fc01cec
Implements: bp versioned-notification-transformation-stein
2018-10-09 06:28:11 +00:00
Gábor Antal c0e4e162ce Transform libvirt.error notification
The libvirt.error notification has been transformed to
the versioned notification framework.

Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: I7d2287ce06d77c0afdef0ea8bdfb70f6c52d3c50
Implements: bp versioned-notification-transformation-stein
2018-09-18 07:06:09 +00:00
Stephen Finucane 24c016ed6c Assorted cleanups from numa-aware-vswitches series
Resolve open issues from preceding patches.

Part of blueprint numa-aware-vswitches

Change-Id: I0c35109b67aa94cf19a4d20a97bf5ab15cf3db4e
2018-07-27 09:49:12 -07:00
Sean Mooney 0a71a542e0 Add VIFMigrateData object for live migration
- This change adds a new VIFMigrateData object.
- This change adds a new vifs field to the
  base LiveMigrateData object.

Later patches will populate this information during
live migration where nova uses the neutron port
binding extended API to bind the port on the destination
host, and store the destination host binding details
in this object to be leveraged on the source host for
things like defining vif details in the guest before
starting the live migration in the hypervisor.

Note that vif_details and profile must be stored as
serialized dicts similar to
LibvirtLiveMigrateBDMInfo.connection_info_json.

Co-Authored-By: Matt Riedemann <mriedem.os@gmail.com>

Part of blueprint neutron-new-port-binding-api

Change-Id: I174ae21f143016bb23b8043fa22465dac6c71314
2018-07-19 09:08:12 -04:00
Zuul 529621bbb1 Merge "Transform instance.live_migration_force_complete notification" 2018-07-16 16:33:35 +00:00
Zuul 16a2db6f23 Merge "Transform aggregate.update_prop notification" 2018-07-16 15:15:32 +00:00
Zuul f2b96588ef Merge "network: Always retrieve network information if available" 2018-07-16 12:18:53 +00:00
Gábor Antal 23efc549a1 Transform instance.live_migration_force_complete notification
The instance.live_migration_force_complete.start and
instance.live_migration_force_complete.end notifications have been
transformed to the versioned notification framework.

Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: I2e9a474457a7597a9febc111b13a67ddcf45f29e
Implements: bp versioned-notification-transformation-rocky
2018-07-16 00:12:37 +09:00
Gábor Antal 6322cb6a18 Transform aggregate.update_prop notification
The aggregate.update_prop.start and aggregate.update_prop.end
notifications has been transformed to the versioned notification
framework.

Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: I37b19573b6d0e1131c446fcec361f01fa2560f82
Implements: bp versioned-notification-transformation-rocky
2018-07-15 23:36:31 +09:00
Gábor Antal ab2279eb09 Transform instance.rebuild_scheduled notification
The instance.rebuild_scheduled notification has been transformed
to the versioned notification framework.

Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: I640562b8dd049ff5b6fea9286dc3082b9d837ed3
Implements: bp versioned-notification-transformation-rocky
2018-07-09 09:55:40 +09:00
Stephen Finucane de72526791 network: Always retrieve network information if available
We're going to need to consume information about the physnet and tunnel
status of networks. While we don't currently retrieve the latter, we do
retrieve the former but only for SR-IOV ports. Modify this so physnet
information is retrieved for any non-auto and non-null network requests.
This is stored in a new object, 'NetworkMetadata', which defines fields
for both physnets and tunneled networks. The latter attribute of this
object is unset for now, but this is not an issue as the value returned
from this function is not yet used.

Part of blueprint numa-aware-vswitches

Change-Id: I3dde6074d69e299f2844675ef968c8f949722395
2018-07-03 16:50:06 +01:00
Yikun Jiang 0b9b37fe9a Add instance.unlock notification
The instance.unlock versioned notification is introduced in this
patch.

The unlock operation just changes the instance.locked to False in
API, we send the notification after db operation.

Change-Id: Ic750c33b4f88ba9c62ea8cba86915c6010f2cd6f
blueprint: trigger-notifications-when-lock-unlock-instances
2018-06-25 19:25:39 +00:00
Yikun Jiang 102cdb9315 Add instance.lock notification
The instance.lock versioned notification is introduced in this
patch.

The lock operation just changes the instance.locked to True in
API, we send the notification after db operation.

Change-Id: I03a13afa91c29f4fee25336cb82ea5c887eae2f8
blueprint: trigger-notifications-when-lock-unlock-instances
2018-06-21 10:29:31 +08:00
Mohammed Naser aa5b1326c8 Added ability to configure default architecture for ImagePropertiesFilter
When using ImagePropertiesFilter with multiple architectures inside the
same deployment, it is possible that images can be uploaded without the
hw_architecture property defined.

This results in behaviour where the instance could be scheduled on any
type of hypervisor, resulting in an instance that will successfully
transition to ACTIVE but never properly run because of the difference
in architecture.

This makes the ImagePropertiesFilter problematic as most images are
generally uploaded without the architecture property set because
most documentation does not encourage doing that.

The addition of this flag allows to make using the filter possible
because it allows the deployer to assume a default architecture if
the user did not supply one (assuming it would be the most common
architecture in their deployment, such as x86_64) yet if the user
wants a more specific architecture, they can do it in their image
properties.

In order to avoid a circular import loop, the references to the
architecture field have been moved to a seperate module so that
they can be properly and cleaned imported inside configuration.

Change-Id: Ib52deb095028e93619b93ef9e5f70775df2a403a
Closes-Bug: #1769283
2018-05-14 16:55:13 -04:00
Béla Vancsics 090d58d23d Transform aggregate.update_metadata notification
The aggregate.update_metadata.start and aggregate.update_metadata.end
notifications has been transformed to the versioned notification framework.

Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: Iab73b1351a50869620334f692aaefb566ba4ddf8
Implements: bp versioned-notification-transformation-rocky
2018-04-04 23:25:42 +00:00
Zuul 68afe71e26 Merge "Move resource class fields" 2018-03-13 19:13:19 +00:00
Chris Dent f346913594 Move resource class fields
Move the ResourceClass field to its own package, and move that package
to the top of the nova hierarchy since it is used by both nova tooling
and placement tooling but we don't want the placement version to have to
incorporate the nova code. Eventually we'd like to see an
os-resource-classes library, similar to os-traits, which will serve this
functionality. This is a step in that direction.

Changes in this patch are quite widespread, but are mostly only changes
of imports.

Change-Id: Iea182341f9419cb514a044f76864d6bec60a3683
2018-03-13 09:01:30 +00:00
Takashi NATSUME c4397d5e5a Transform servergroup.addmember notification
The servergroup.addmember notification has been transformed
to the versioned notification framework.

Change-Id: I5291e453ba06f0f26c4928e4f7482c40e725a781
Implements: bp versioned-notification-transformation-rocky
2018-03-06 22:03:00 +00:00
Stephen Finucane 0cd858b4ab objects: Add PCI NUMA policy fields
Add the requisite policy field to 'InstacePCIRequests' for the
aforementioned feature. We also add a missing 'super' call for the
'obj_make_compatible' function of this object and add the missing unit
tests for same.

bp share-pci-between-numa-nodes

Change-Id: I9360fe299083045a4baf4a703d2b53b3eb30a558
2017-12-20 14:59:10 +00:00
Matt Riedemann fe535cbaa0 Address nits from service create/destroy notification review
This adds two things from the review of change
I955d98f9fd4b121f98e172e5ab30eb668a24006d:

1. A utility method to convert a service binary to a valid
   notification source.

2. Adds a comment in the functional test reminding us that
   we're using the latest microversion which is how we get
   the service uuid from the REST API.

Change-Id: If67b4e07d608f323c1154f7f379d4eb849e46fbf
2017-11-27 11:42:13 -05:00
liyingjun 8e793a6c6f Versioned notifications for service create and delete
New notifications service.create and service.delete are introduced
with INFO priority and the payload of the notification is the serialized
form of the already existing Service versioned object. Service.create
notification will be emitted after the service is created (so the uuid
is available) and also send the service.delete notification after the
service is deleted.

Implement blueprint: service-create-destroy-notification

Change-Id: I955d98f9fd4b121f98e172e5ab30eb668a24006d
2017-11-27 11:11:44 -05:00
Zuul 8350f20167 Merge "Transform keypair.import notification" 2017-10-31 00:26:33 +00:00
Béla Vancsics a4c7ab8851 Transform keypair.import notification
The keypair.import.start and keypair.import.end notifications
has been transformed to the versioned notification framework.

Change-Id: Icadc53d84fa021aae0f9ec2e18e9125de98e00f6
Implements: bp versioned-notification-transformation-queens
2017-10-30 16:44:29 -04:00
Huan Xie 5694ff0635 VGPU: Define vgpu resource class
This patch is to add definition of resource class for VGPU and
VGPU_DISPLAY_HEAD, and there will be a series of patches to implement
the whole vgpu feature.

Partially Implements: blueprint add-support-for-vgpu

Change-Id: Ie363453eb9856b39e4ededc5e76807b3d165a1c5
2017-10-25 02:02:38 +01:00
Előd Illés 08599b0892 Add instance.interface_detach notification
Based on the following discussion:
http://lists.openstack.org/pipermail/openstack-dev/2017-September/121978.html

removeFixedIp action is deprecated, so instead of transforming its
notification, the instance.interface_detach versioned notification is
introduced.

Change-Id: Id4fa9eba59ef958ce514d9eb43346adf095b8b6e
Implements: blueprint versioned-notification-transformation-queens
2017-09-22 14:32:34 +02:00
Előd Illés 5a70f23ec5 Add instance.interface_attach notification
Based on the following discussion:
http://lists.openstack.org/pipermail/openstack-dev/2017-September/121978.html

addFixedIp action is deprecated, so instead of transforming the
instance.add_fixed_ip notification (https://review.openstack.org/#/c/332876),
instance.interface_attach versioned notification is introduced.

Change-Id: Id8d2c48c9c864554a917596e377d30515465fec1
Implements: bp versioned-notification-transformation-queens
2017-09-21 16:56:42 +02:00
Chris Dent 99f0387b94 [placement] Unregister the ResourceClass object
Unregister the ResourceClass object because we do not need RPC
and versioning for the objects in nova.objects.resource_provider.

There are three primary changes here:

* unregistering the ResourceClass class
* where objects.ResourceClass is used, point directly to the
  nova.objects.resource_provider package instead
* move the CUSTOM_NAMESPACE for resource class names to the the fields
  object. This avoids an import loop and also makes more sense as
  the field represents the name.

Partially-Implements: bp placement-deregister-objects
Change-Id: If537c786ea1a61383d82bad9a1de86c25c6cdbd2
2017-09-15 16:49:45 +01:00
Jenkins be3a66781f Merge "Clarify the field usage guidelines" 2017-08-30 10:04:17 +00:00
Jenkins a6c429bd79 Merge "Use enum value instead of string service name" 2017-08-28 21:23:41 +00:00
Ed Leafe bca6ade42b Clarify the field usage guidelines
The note explaining not to use the Nova versions of object field types
mentions that they will be removed, implying that the types listed
there, such as Dict and List should not be used. This update clarifies
that it is only the Nova versions of these fields that will be removed,
and that it is perfectly fine to use the o.vo field types.

Change-Id: I4ae2392e97f5cbe59e5c9c94c06c48a5d9c9d7d3
2017-08-28 19:43:21 +00:00
Balazs Gibizer 7c0132c5f4 Use enum value instead of string service name
In the nova notification code path the nova service / binary names
are hardcoded. There is a possible confusion as the REST API uses
'nova-osapi_compute' while the notifications use 'nova-api'
as the name of the nova compute service binary.
To avoid possible mixing of the names a new enum is introduced
in the notification code path with the valid values form
notification perspective.

Change-Id: Ia85a8b6c34a3efaf3ef509aab316294b9c0c2fd1
Closes-Bug: #1696152
2017-07-25 17:36:41 +02:00
Takashi NATSUME feddee9b29 Use PCIAddressField in oslo.versionedobjects
Change-Id: I82eb14ca178b7b02344ddeb64d66858f8e14b0c3
2017-07-11 01:03:16 +00:00
John Hua 0c0361e8bf XenAPI: device tagging
XenAPI implementation of device tagging

Partially-Implements: blueprint virt-device-role-tagging-xenapi

Change-Id: I565617e05acf33e6254ea091b88d975270ffde05
Depends-On: I9fe520bc9b68d0bc7f879617f2cd27dd1029e4de
2017-06-14 01:53:06 +00:00
Sergey Nikitin 2cf846e1e7 Added nova objects for intance diagnostics
Following objects were added:

* CpuDiagnostics
* NicDiagnostics
* DiskDiagnostics
* MemoryDiagnostics
* Diagnostics

These objects will be used to transmit data via RPC.
They are based on same objects from nova.virt.diagnostics.
But old objects were used only for storing data.
During RPC transmission they are transform into dictionaries.
It is not right approach.  We will have some problems
in case of adding new diagnostics fields.

New nova objects will allow us to have a good control of objects
versioning. It will force contributors to dump objects
version in case of any changes.

Also some new fields were added/modified to be in accordance with
updated diagnostic spec Ibcc2b98ae5b3731a9e5a1a3f28fc7ce4655c8ea6

blueprint: restore-vm-diagnostics

Change-Id: I6b15001e6f4e649df983071464ec8642bfc89b61
2017-05-30 00:39:44 +04:00
Sujitha bb7d5214a4 Adding auto_disk_config field to InstancePayload
Add auto_disk_config field to InstancePayload based on
instance.auto_disk_config boolean value. If true, set it to
AUTO else MANUAL.

Implements: bp additional-notification-fields-for-searchlight
Change-Id: I18af99479562e2fe5e74e6e1252b804b074fee58
2017-04-21 12:45:39 +02:00
dane-fichter d015b98042 Remove backend dependency for key types
This change moves the ImageMetaProp's SignatureKeyType
tuple from a dynamically loaded object to a static tuple,
removing the dependency on the OpenSSL backend, which
can vary from OS to OS.

Depends-On: Idbda49587f3b62a0870d10817291205bde0e821e
Change-Id: Id5191e575191d3beaa24435e98a3852dddcfe3bf
Closes-Bug: #1681946
2017-04-12 23:41:27 +00:00
dane-fichter d17e701ddb Use cursive for signature verification
This change removes the signature_utils module
from Nova and uses the cursive library, which
contains an identical module.

Change-Id: I8179282a9d19f829aca0b5bd2775d855b3364c86
Depends-On: I7e5797661fee258bc0270b5f109704b591633519
Implements: blueprint signature-code-cleanup
Partial-Bug: #1528349
2017-03-28 01:41:41 -07:00
Matt Riedemann 685e41f71f Remove unused VIFModel._get_legacy method
This was introduced in d777301135
and was dead code from the start.

Change-Id: I9ca1cbfac903a2f116eb66bea7f3b51f7459fd6f
2017-03-20 12:19:31 -04:00
Jay Pipes e7840cdf1d virt: implement get_inventory() for Ironic
This patch implements the new get_inventory() virt driver API method for
the Ironic driver. Included is a new functional test of the interaction
between the placement API, the resource tracker, and the scheduler
reporting client with respect to the change in the Ironic resource
reporting behaviour that corresponds to this change.

Change-Id: I59be1cbedc99dcbb0ccde089a9f4737305176324
blueprint: custom-resource-classes-pike
2017-03-15 21:49:25 +00:00
Takashi NATSUME c392769662 Use ListOfIntegersField in oslo.versionedobjects
Replace 'ListOfIntegersField' defined in nova
with 'ListOfIntegersField' defined in oslo.versionedobjects.

TrivialFix
Change-Id: Ia19e72503804c7e15599206105082826b8bc4ff2
2017-02-13 01:03:49 +00:00
Jenkins 7767bbd35a Merge "Add 'disabled' to WatchdogAction field" 2017-01-31 21:14:03 +00:00
Jenkins da25ec9f7a Merge "Create schema generation for NetworkModel" 2017-01-10 17:29:58 +00:00
Balazs Gibizer 58d068d01a Add aggregate notification related enum values
The ADD_HOST and REMOVE_HOST enum value is added to the
NotificationAction enum in a single commit to avoid unnecessary
version bumps. Subsequent patches will use these enum values.

Implements: bp versioned-notification-transformation-ocata
Change-Id: I6bf92da1ce0ade8054a0cda8aa20b7c4aec9fe5f
2017-01-04 17:45:40 +00:00
Matt Riedemann 98d93196cd Add 'disabled' to WatchdogAction field
Image property hw_watchdog_action can have a 'disabled'
value which is actually defined in the glance metadefs so
someone using Horizon might pick that. Also, it's the default
behavior in the libvirt driver. However, if you try to create
a server with that set the create fails in nova-api because
the enum field didn't have 'disabled' as a valid value.

This adds it, bumps the ImageMetaProps version and adds tests.

Change-Id: I4cec3e8b8527b909cc60893db26732a19263220d
Closes-Bug: #1633200
2017-01-03 17:27:40 -05:00