Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-11240

extraMounts propagation to instance not working when uniquePodNames is true

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • rhos-18.0.5
    • rhos-18.0.0
    • cinder-operator
    • None
    • 3
    • False
    • Hide

      None

      Show
      None
    • False
    • Committed
    • No Docs Impact
    • Proposed
    • Proposed
    • None
    • Hide
      .`extraMounts` propagation to instance does not work when `uniquePodNames` is `true`

      When `uniquePodNames` is `true`, every Cinder Pod (and in general each component and service) is prefixed by a pseudo-random string. This affects the per-instance propagation, because the legacy method, based on `strings.TrimPrefix`, is not valid anymore.

      In a DCN deployment, Red Hat recommends propagating secrets to pods by matching the instance AZ name.

      Example 1 results in pods whose names match az0 getting the secret ceph-conf-az-0, pods whose names match az1 getting the secret ceph-conf-az-0, and so on. Example 1 works for Glance pods but only works for Cinder pods if `uniquePodNames` is `false`.

      *Workaround:* Set `uniquePodNames` to false as shown in Example 2, until this bug is resolved. The `uniquePodNames` setting is only needed if the storage backend uses NFS.

      *Example 1*
      ----
      apiVersion: core.openstack.org/v1beta1
      kind: OpenStackControlPlane
      spec:
        extraMounts:
        - extraVol:
          - extraVolType: Ceph
            mounts:
            - mountPath: /etc/ceph
              name: ceph0
              readOnly: true
            propagation:
            - az0
            volumes:
            - name: ceph0
              projected:
                sources:
                - secret:
                    name: ceph-conf-az-0
          - extraVolType: Ceph
            mounts:
            - mountPath: /etc/ceph
              name: ceph1
              readOnly: true
            propagation:
            - az1
            volumes:
            - name: ceph1
              projected:
                sources:
                - secret:
                    name: ceph-conf-az-1
      ----

      *Example 2*
      ----
      apiVersion: core.openstack.org/v1beta1
      kind: OpenStackControlPlane
      <...>
      spec:
        cinder:
          uniquePodNames: false # workaround https://issues.redhat.com/browse/OSPRH-11240
          enabled: true
          apiOverride:
            <...>
      ----
      Show
      .`extraMounts` propagation to instance does not work when `uniquePodNames` is `true` When `uniquePodNames` is `true`, every Cinder Pod (and in general each component and service) is prefixed by a pseudo-random string. This affects the per-instance propagation, because the legacy method, based on `strings.TrimPrefix`, is not valid anymore. In a DCN deployment, Red Hat recommends propagating secrets to pods by matching the instance AZ name. Example 1 results in pods whose names match az0 getting the secret ceph-conf-az-0, pods whose names match az1 getting the secret ceph-conf-az-0, and so on. Example 1 works for Glance pods but only works for Cinder pods if `uniquePodNames` is `false`. *Workaround:* Set `uniquePodNames` to false as shown in Example 2, until this bug is resolved. The `uniquePodNames` setting is only needed if the storage backend uses NFS. *Example 1* ---- apiVersion: core.openstack.org/v1beta1 kind: OpenStackControlPlane spec:   extraMounts:   - extraVol:     - extraVolType: Ceph       mounts:       - mountPath: /etc/ceph         name: ceph0         readOnly: true       propagation:       - az0       volumes:       - name: ceph0         projected:           sources:           - secret:               name: ceph-conf-az-0     - extraVolType: Ceph       mounts:       - mountPath: /etc/ceph         name: ceph1         readOnly: true       propagation:       - az1       volumes:       - name: ceph1         projected:           sources:           - secret:               name: ceph-conf-az-1 ---- *Example 2* ---- apiVersion: core.openstack.org/v1beta1 kind: OpenStackControlPlane <...> spec:   cinder:     uniquePodNames: false # workaround https://issues.redhat.com/browse/OSPRH-11240     enabled: true     apiOverride:       <...> ----
    • Known Issue
    • Done
    • Moderate

      When uniquePodNames is set to true, every Cinder Pod (but in general each component and service) is prefixed by a pseudo random string. This affects the per-instance propagation, because the old way based on strings.TrimPrefix is not valid anymore.

      In a DCN deployment we prefer to propagate secrets to pods by matching the instance AZ name. Example 1 below results in pods whose name match az0 getting the secret ceph-conf-az-0 and pods who's name patch az1 getting the secret ceph-conf-az-0 and so on. The example below works for Glance pods but only works for Cinder pods if uniquePodNames is set to false. As a workaround customers should set uniquePodNames false as in Example 2 until this bug is resolved. uniquePodNames is only needed if the storage backend uses NFS.

      Example 1

      apiVersion: core.openstack.org/v1beta1
      kind: OpenStackControlPlane
      spec: 
        extraMounts: 
        - extraVol: 
          - extraVolType: Ceph
            mounts: 
            - mountPath: /etc/ceph
              name: ceph0
              readOnly: true
            propagation: 
            - az0
            volumes: 
            - name: ceph0
              projected: 
                sources: 
                - secret: 
                    name: ceph-conf-az-0
          - extraVolType: Ceph
            mounts: 
            - mountPath: /etc/ceph
              name: ceph1
              readOnly: true
            propagation: 
            - az1
            volumes: 
            - name: ceph1
              projected: 
                sources: 
                - secret: 
                    name: ceph-conf-az-1
      

      Example 2

      apiVersion: core.openstack.org/v1beta1
      kind: OpenStackControlPlane
      <...>
      spec: 
        cinder: 
          uniquePodNames: false   # workaround https://issues.redhat.com/browse/OSPRH-11240
          enabled: true
          apiOverride: 
            <...>
      

              fpantano@redhat.com Francesco Pantano
              rhn-support-johfulto John Fulton
              rhos-dfg-storage-squad-cinder
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: