Bug 1969794 - [OSP] Document how to use image registry PVC backend with custom availability zones
Summary: [OSP] Document how to use image registry PVC backend with custom availability...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.8
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.11.0
Assignee: Stephen Finucane
QA Contact: rlobillo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-09 09:21 UTC by Mike Fedosin
Modified: 2022-08-10 10:36 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 10:36:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 4985 0 None open Bug 1969794: Document how to use image registry with a custom PVC backend 2021-06-09 09:28:47 UTC
Github openshift installer pull 5922 0 None open Bug 1969794: Correct typo 2022-05-17 17:00:59 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 10:36:35 UTC

Description Mike Fedosin 2021-06-09 09:21:31 UTC
Now there is no such documentation available, which makes it harder for users to deploy the image registry pvc backend volume in a custom availability zone.

Comment 2 rlobillo 2021-07-28 13:52:46 UTC
Verified on 4.9.0-0.nightly-2021-07-27-181211 over OSP16.1 (RHOS-16.1-RHEL-8-20210604.n.0)

(shiftstack) [stack@undercloud-0 ~]$ openstack availability zone list --volume
+-----------+-------------+
| Zone Name | Zone Status |
+-----------+-------------+
| nova      | available   |
| cinderAZ0 | available   |
| cinderAZ1 | available   |
+-----------+-------------+

(shiftstack) [stack@undercloud-0 ~]$ cat <<\EOF | oc apply -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: custom-csi-storageclass 
provisioner: cinder.csi.openstack.org
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true
parameters:
  availability: cinderAZ1
EOF

storageclass.storage.k8s.io/custom-csi-storageclass created
(shiftstack) [stack@undercloud-0 ~]$ cat <<EOF | oc apply -f -
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: csi-pvc-imageregistry
  namespace: openshift-image-registry
  annotations:
    imageregistry.openshift.io: "true"
spec:
  accessModes:
  - ReadWriteOnce
  volumeMode: Block
  resources:
    requests:
      storage: 100Gi
  storageClassName: custom-csi-storageclass
EOF
persistentvolumeclaim/csi-pvc-imageregistry created


(shiftstack) [stack@undercloud-0 ~]$ cat registry-config.yaml 
apiVersion: imageregistry.operator.openshift.io/v1
kind: Config
metadata:
  name: cluster
spec:
  defaultRoute: true
  disableRedirect: true
  rolloutStrategy: Recreate
  replicas: 1
  storage:
    managementState: Managed
    pvc:
      claim: csi-pvc-imageregistry
    swift: null
  status: null
(reverse-i-search)`oc appl': oc apply -f registry-config.yaml 


(shiftstack) [stack@undercloud-0 ~]$ oc get configs.imageregistry.operator.openshift.io/cluster -o json | jq .status.conditions[0]
{
  "lastTransitionTime": "2021-07-28T13:45:40Z",
  "reason": "PVC Exists",
  "status": "True",
  "type": "StorageExists"
}


(shiftstack) [stack@undercloud-0 ~]$  oc get pvc -n openshift-image-registry csi-pvc-imageregistry
NAME                    STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS              AGE
csi-pvc-imageregistry   Bound    pvc-05506333-1aae-486d-9ede-f55f4527e5cd   100Gi      RWO            custom-csi-storageclass   20m

(shiftstack) [stack@undercloud-0 ~]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.9.0-0.nightly-2021-07-27-181211   True        False         49m     Cluster version is 4.9.0-0.nightly-2021-07-27-181211

(shiftstack) [stack@undercloud-0 ~]$ openstack volume list
+--------------------------------------+------------------------------------------+--------+------+------------------------------------------------------+
| ID                                   | Name                                     | Status | Size | Attached to                                          |
+--------------------------------------+------------------------------------------+--------+------+------------------------------------------------------+
| ec47ba62-2b66-400c-ae21-c68d0eaad3e1 | pvc-05506333-1aae-486d-9ede-f55f4527e5cd | in-use |  100 | Attached to ostest-bhssb-worker-2-7plmn on /dev/vdb  |
| 49b95b15-aa3b-4c9f-af15-028a43a002c3 | ostest-bhssb-worker-2-7plmn              | in-use |   25 | Attached to ostest-bhssb-worker-2-7plmn on /dev/vda  |
| c090c175-215c-448a-94d0-227e02baf4f6 | ostest-bhssb-worker-1-6hgcn              | in-use |   25 | Attached to ostest-bhssb-worker-1-6hgcn on /dev/vda  |
| e27f0599-dc58-42ef-8fbb-026c2cfb3a4a | ostest-bhssb-worker-0-qb6p8              | in-use |   25 | Attached to ostest-bhssb-worker-0-qb6p8 on /dev/vda  |
| ce83352c-3595-4cef-8b88-1d72f9c816d6 | ostest-bhssb-master-1                    | in-use |   25 | Attached to ostest-bhssb-master-1 on /dev/vda        |
| ae2491ef-3f83-4146-90b1-c275179af076 | ostest-bhssb-master-2                    | in-use |   25 | Attached to ostest-bhssb-master-2 on /dev/vda        |
| 244723bc-4e87-4385-ace8-a3051446da27 | ostest-bhssb-master-0                    | in-use |   25 | Attached to ostest-bhssb-master-0 on /dev/vda        |
+--------------------------------------+------------------------------------------+--------+------+------------------------------------------------------+

(shiftstack) [stack@undercloud-0 ~]$ openstack volume show pvc-05506333-1aae-486d-9ede-f55f4527e5cd -c availability_zone
+-------------------+-----------+
| Field             | Value     |
+-------------------+-----------+
| availability_zone | cinderAZ1 |
+-------------------+-----------+

Comment 3 rlobillo 2021-07-28 14:56:34 UTC
Failed on 4.9.0-0.nightly-2021-07-27-181211. The image-registry pod is failing mounting the volume. The PVC should be volumeMode: Filesystem and not Block.

Comment 4 ShiftStack Bugwatcher 2021-11-25 16:11:53 UTC
Removing the Triaged keyword because:

* the QE automation assessment (flag qe_test_coverage) is missing

Comment 9 errata-xmlrpc 2022-08-10 10:36:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5069


Note You need to log in before you can comment on or make changes to this bug.