From 0e03ba791f7dcab08eb2b0deeb78d29609e81d2b Mon Sep 17 00:00:00 2001 From: Oliver Walsh Date: Wed, 2 Sep 2020 19:05:29 +0100 Subject: [PATCH] Add the NovaImageCacheTTL to the nova compute service This exposes the remove_unused_original_minimum_age_seconds from nova.conf which controls the time (in seconds) that nova compute should continue caching an image once it is no longer used by and instances on the host. Change-Id: Idfa892bab0cb59de5a418f0dc23a6e7d60100a49 --- deployment/nova/nova-compute-container-puppet.yaml | 10 ++++++++++ .../notes/nova_image_cache_ttl-824f241363b9dd4e.yaml | 8 ++++++++ 2 files changed, 18 insertions(+) create mode 100644 releasenotes/notes/nova_image_cache_ttl-824f241363b9dd4e.yaml diff --git a/deployment/nova/nova-compute-container-puppet.yaml b/deployment/nova/nova-compute-container-puppet.yaml index 50bfd9f846..a1040b4a9b 100644 --- a/deployment/nova/nova-compute-container-puppet.yaml +++ b/deployment/nova/nova-compute-container-puppet.yaml @@ -423,6 +423,14 @@ parameters: default: "" tags: - role_specific + NovaImageCacheTTL: + type: number + description: > + Time in seconds that nova compute should continue caching an image once + it is no longer used by any instances on the host + default: 86400 + tags: + - role_specific # DEPRECATED: the following options are deprecated and are currently maintained # for backwards compatibility. They will be removed in future release. @@ -522,6 +530,7 @@ resources: nova::compute::max_disk_devices_to_attach: NovaMaxDiskDevicesToAttach nova::compute::libvirt::pmem_namespaces: NovaPMEMMappings nova_pmem_namespaces: NovaPMEMNamespaces + nova::compute::libvirt::remove_unused_original_minimum_age_seconds: NovaImageCacheTTL - values: {get_param: [RoleParameters]} - values: NovaVcpuPinSet: {get_param: NovaVcpuPinSet} @@ -596,6 +605,7 @@ resources: NovaMaxDiskDevicesToAttach: {get_param: NovaMaxDiskDevicesToAttach} NovaPMEMMappings: {get_param: NovaPMEMMappings} NovaPMEMNamespaces: {get_param: NovaPMEMNamespaces} + NovaImageCacheTTL: {get_param: NovaImageCacheTTL} conditions: enable_instance_ha: {equals: [{get_param: EnableInstanceHA}, true]} diff --git a/releasenotes/notes/nova_image_cache_ttl-824f241363b9dd4e.yaml b/releasenotes/notes/nova_image_cache_ttl-824f241363b9dd4e.yaml new file mode 100644 index 0000000000..bf07eaf3bf --- /dev/null +++ b/releasenotes/notes/nova_image_cache_ttl-824f241363b9dd4e.yaml @@ -0,0 +1,8 @@ +--- +features: + - | + Add the NovaImageCacheTTL to the nova compute service. + This exposes the remove_unused_original_minimum_age_seconds from nova.conf + which controls the time (in seconds) that nova compute should continue + caching an image once it is no longer used by and instances on the host. + Defaults to 86400 (24hrs)