From 564e23702ba79f4234ca5ff59d9bef1b9cc82ee8 Mon Sep 17 00:00:00 2001 From: Robert Church Date: Mon, 14 Jan 2019 10:57:45 -0500 Subject: [PATCH] Stein: Update Cinder to include resource_filters.json During Stein the deprecated query_volume_filters config option was removed. As a result, /etc/cinder/resource_filters.json is required to allow volume display operations to function. This adds the file to the configmap and provides the default values for the filters. Change-Id: I5b21949160430c72eb63db20475efa9f098e809f Story: 2004751 Task: 28894 Signed-off-by: Robert Church --- .../openstack-helm/centos/build_srpm.data | 2 +- .../openstack-helm/centos/openstack-helm.spec | 2 + ...der-to-include-resource_filters.json.patch | 99 +++++++++++++++++++ 3 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 openstack/openstack-helm/files/0007-Stein-Update-Cinder-to-include-resource_filters.json.patch diff --git a/openstack/openstack-helm/centos/build_srpm.data b/openstack/openstack-helm/centos/build_srpm.data index 2bcbdedb..02fffd4f 100644 --- a/openstack/openstack-helm/centos/build_srpm.data +++ b/openstack/openstack-helm/centos/build_srpm.data @@ -5,4 +5,4 @@ TAR="$TAR_NAME-$SHA.tar.gz" COPY_LIST="${CGCS_BASE}/downloads/$TAR $PKG_BASE/files/* " -TIS_PATCH_VER=7 +TIS_PATCH_VER=8 diff --git a/openstack/openstack-helm/centos/openstack-helm.spec b/openstack/openstack-helm/centos/openstack-helm.spec index 4ab26389..888eb852 100644 --- a/openstack/openstack-helm/centos/openstack-helm.spec +++ b/openstack/openstack-helm/centos/openstack-helm.spec @@ -24,6 +24,7 @@ Patch03: 0003-Add-Panko-Chart.patch Patch04: Remove-stale-Apache2-service-pids-when-a-POD-starts.patch Patch05: 0005-Add-heat-purge-deleted-cron-job.patch Patch06: 0006-Stein-Remove-ceilometer-upgrade-option.patch +Patch07: 0007-Stein-Update-Cinder-to-include-resource_filters.json.patch BuildRequires: helm BuildRequires: openstack-helm-infra @@ -40,6 +41,7 @@ Openstack Helm charts %patch04 -p1 %patch05 -p1 %patch06 -p1 +%patch07 -p1 %build # initialize helm and build the toolkit diff --git a/openstack/openstack-helm/files/0007-Stein-Update-Cinder-to-include-resource_filters.json.patch b/openstack/openstack-helm/files/0007-Stein-Update-Cinder-to-include-resource_filters.json.patch new file mode 100644 index 00000000..7c4b397b --- /dev/null +++ b/openstack/openstack-helm/files/0007-Stein-Update-Cinder-to-include-resource_filters.json.patch @@ -0,0 +1,99 @@ +From 26dc954e697b365ff8bca6a0f862f1053ed25648 Mon Sep 17 00:00:00 2001 +From: Robert Church +Date: Fri, 11 Jan 2019 17:23:44 -0500 +Subject: [PATCH 7/7] Stein: Update Cinder to include resource_filters.json + +During Stein the deprecated query_volume_filters config option was +removed. As a result, /etc/cinder/resource_filters.json is required to +allow volume display operations to function. + +This adds the file to the configmap and provides the default values for +the filters. + +Signed-off-by: Robert Church +--- + cinder/templates/configmap-etc.yaml | 1 + + cinder/templates/deployment-api.yaml | 4 ++++ + cinder/values.yaml | 39 ++++++++++++++++++++++++++++++++++++ + 3 files changed, 44 insertions(+) + +diff --git a/cinder/templates/configmap-etc.yaml b/cinder/templates/configmap-etc.yaml +index 88d9fa07..5ed73db6 100644 +--- a/cinder/templates/configmap-etc.yaml ++++ b/cinder/templates/configmap-etc.yaml +@@ -121,6 +121,7 @@ data: + policy.json: {{ toJson .Values.conf.policy | b64enc }} + cinder_sudoers: {{ $envAll.Values.conf.cinder_sudoers | b64enc }} + rootwrap.conf: {{ $envAll.Values.conf.rootwrap | b64enc }} ++ resource_filters.json: {{ toJson .Values.conf.resource_filters | b64enc }} + {{- range $key, $value := $envAll.Values.conf.rootwrap_filters }} + {{- $filePrefix := replace "_" "-" $key }} + {{ printf "%s.filters" $filePrefix }}: {{ $value.content | b64enc }} +diff --git a/cinder/templates/deployment-api.yaml b/cinder/templates/deployment-api.yaml +index 9213d34f..82131579 100644 +--- a/cinder/templates/deployment-api.yaml ++++ b/cinder/templates/deployment-api.yaml +@@ -109,6 +109,10 @@ spec: + mountPath: /etc/cinder/policy.json + subPath: policy.json + readOnly: true ++ - name: cinder-etc ++ mountPath: /etc/cinder/resource_filters.json ++ subPath: resource_filters.json ++ readOnly: true + {{- if eq ( split "://" .Values.conf.cinder.coordination.backend_url )._0 "file" }} + - name: cinder-coordination + mountPath: {{ ( split "://" .Values.conf.cinder.coordination.backend_url )._1 }} +diff --git a/cinder/values.yaml b/cinder/values.yaml +index cd3eb1a2..e79f8f6f 100644 +--- a/cinder/values.yaml ++++ b/cinder/values.yaml +@@ -865,6 +865,45 @@ conf: + sla: + failure_rate: + max: 0 ++ resource_filters: ++ volume: ++ - name ++ - status ++ - metadata ++ - bootable ++ - migration_status ++ - availability_zone ++ - group_id ++ backup: ++ - name ++ - status ++ - volume_id ++ snapshot: ++ - name ++ - status ++ - volume_id ++ - metadata ++ - availability_zone ++ group: [] ++ group_snapshot: ++ - status ++ - group_id ++ attachment: ++ - volume_id ++ - status ++ - instance_id ++ - attach_status ++ message: ++ - resource_uuid ++ - resource_type ++ - event_id ++ - request_id ++ - message_level ++ pool: ++ - name ++ - volume_type ++ volume_type: [] ++ + + backup: + external_ceph_rbd: +-- +2.16.5 +