7.5. Decommissioning an Image service API
To decommission an existing Image service API (glanceAPI), you must do the following:
-
Delete the
glanceAPICR and its associated objects, for example, pods andStatefulSets. -
Update the
keystoneEndpointto point to an activeglanceAPI.
You cannot delete a glanceAPI if it is the only glanceAPI in the OpenStackControlPlane, and you cannot point the keystoneEndpoint parameter in your OpenStackControlPlane CR file to a non-existent glanceAPI.
When you remove a glanceAPI, PersistentVolumeClaims (PVCs) that are associated to the API are preserved so that you can re-add the API with its previous settings if required.
Procedure
Verify that more that one
glanceAPIis deployed in theOpenStackControlPlane:$ oc -n openstack get oscp $(oc get oscp -o custom-columns=NAME:.metadata.name --no-headers) -o jsonpath='{.spec.glance.template.glanceAPIs}' | jqIdentify the current
glanceAPIthat is registered in the Keystone catalog:$ oc -n openstack get oscp $(oc get oscp -o custom-columns=NAME:.metadata.name --no-headers) -o jsonpath='{.spec.glance.template.keystoneEndpoint}'Verify that the new
glanceAPIhas a Keystone endpoint:$ oc exec -it openstackclient bash -- openstack endpoint list | grep imageIf the
glanceAPIthat you are removing is the API registered in the Keystone catalog, open yourOpenStackControlPlaneCR file,openstack_control_plane.yamlto decommission the API and update thekeystoneEndpointparameter. In the following example, you remove theglanceAPIthat is nameddefaultand update thekeystoneEndpointparameter todefault1:... apiVersion: core.openstack.org/v1beta1 kind: OpenStackControlPlane spec: glance: template: keystoneEndpoint: default1 glanceAPIs: default1: type: single replicas: 1 storage: storageRequest: 10G ...Update the control plane:
$ oc apply -f openstack_control_plane.yaml -n openstackWait until RHOCP creates the resources related to the
OpenStackControlPlaneCR. Run the following command to check the status:$ oc get openstackcontrolplane -n openstackThe
OpenStackControlPlaneresources are created when the status is "Setup complete".提示Append the
-woption to the end of thegetcommand to track deployment progress.