From 4aeb3f35430f76b864cd3d11a16d195405b8899d Mon Sep 17 00:00:00 2001 From: Oliver Walsh Date: Thu, 1 Jul 2021 17:03:27 +0100 Subject: [PATCH] Enable image copy for multiple RBD Glance stores Previously when using multiple RBD glance stores the operator was responsible for copying the image to all stores. Nova-compute now has the ability to automatically copy an image to the local glance store when required. This change enables the feature and adds the following role specific parameters to control the behaviour: NovaGlanceRbdCopyPollInterval NovaGlanceRbdCopyTimeout Related Nova change: Ia839ad418b0f2887cb8e8f5ee3e660a0751db9ce Depends-On: I227f40111591cfe1026ce992b3de3e28d092f329 Change-Id: If7532022f399115357f1fdfa9a510d615ed55609 --- .../nova/nova-compute-container-puppet.yaml | 27 +++++++++++++++++++ .../glance_image_copy-34a3e62c48eaee0e.yaml | 13 +++++++++ 2 files changed, 40 insertions(+) create mode 100644 releasenotes/notes/glance_image_copy-34a3e62c48eaee0e.yaml diff --git a/deployment/nova/nova-compute-container-puppet.yaml b/deployment/nova/nova-compute-container-puppet.yaml index d3cbc88a9f..799cfd8d72 100644 --- a/deployment/nova/nova-compute-container-puppet.yaml +++ b/deployment/nova/nova-compute-container-puppet.yaml @@ -722,6 +722,28 @@ parameters: default: '' tags: - role_specific + GlanceBackendID: + type: string + default: 'default_backend' + description: The default backend's identifier. + constraints: + - allowed_pattern: "[a-zA-Z0-9_-]+" + NovaGlanceRbdCopyPollInterval: + type: number + description: > + The interval in seconds with which to poll Glance after asking for it + to copy an image to the local rbd store. + default: 15 + tags: + - role_specific + NovaGlanceRbdCopyTimeout: + type: number + description: > + The overall maximum time we will wait for Glance to complete an image + copy to our local rbd store. + default: 600 + tags: + - role_specific CustomProviderInventories: description: | Array of hashes describing the custom providers for the compute role. @@ -947,6 +969,8 @@ resources: nova::compute::image_cache::remove_unused_resized_minimum_age_seconds: NovaComputeImageCacheRemoveUnusedResizedMinimumAge nova::compute::image_cache::precache_concurrency: NovaComputeImageCachePrecacheConcurrency nova::compute::provider::custom_inventories: CustomProviderInventories + nova::compute::rbd::libvirt_images_rbd_glance_copy_poll_interval: NovaGlanceRbdCopyPollInterval + nova::compute::rbd::libvirt_images_rbd_glance_copy_timeout: NovaGlanceRbdCopyTimeout - values: {get_param: [RoleParameters]} - values: NovaVcpuPinSet: {get_param: NovaVcpuPinSet} @@ -1045,6 +1069,8 @@ resources: NovaComputeImageCacheRemoveUnusedResizedMinimumAge: {get_param: NovaComputeImageCacheRemoveUnusedResizedMinimumAge} NovaComputeImageCachePrecacheConcurrency: {get_param: NovaComputeImageCachePrecacheConcurrency} CustomProviderInventories: {get_param: CustomProviderInventories} + NovaGlanceRbdCopyPollInterval: {get_param: NovaGlanceRbdCopyPollInterval} + NovaGlanceRbdCopyTimeout: {get_param: NovaGlanceRbdCopyTimeout} outputs: role_data: @@ -1073,6 +1099,7 @@ outputs: tripleo::profile::base::nova::migration::client::nova_compute_enabled: true tripleo::profile::base::nova::migration::client::ssh_private_key: {get_param: [ MigrationSshKey, private_key ]} tripleo::profile::base::nova::migration::client::ssh_port: {get_param: MigrationSshPort} + nova::compute::rbd::libvirt_images_rbd_glance_store_name: {get_param: GlanceBackendID} nova::compute::rbd::libvirt_images_rbd_ceph_conf: list_join: - '' diff --git a/releasenotes/notes/glance_image_copy-34a3e62c48eaee0e.yaml b/releasenotes/notes/glance_image_copy-34a3e62c48eaee0e.yaml new file mode 100644 index 0000000000..106540e3db --- /dev/null +++ b/releasenotes/notes/glance_image_copy-34a3e62c48eaee0e.yaml @@ -0,0 +1,13 @@ +--- +features: + - | + + Enable image copy for multiple RBD Glance stores + + Previously when using multiple RBD glance stores the operator was responsible for copying the image to all stores. + Nova-compute now has the ability to automatically copy an image to the local glance store when required. + This change enables the feature and adds the following role specific + parameters to control the behaviour. + + - ``NovaGlanceRbdCopyPollInterval`` + - ``NovaGlanceRbdCopyTimeout``