Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-8757

Example group config has two storageClasses but policyGen only includes one in output policy

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • 4.11.z
    • GitOps ZTP
    • No
    • False
    • Hide

      None

      Show
      None

      This is a clone of issue OCPBUGS-7348. The following is the description of the original issue:

      This bug is a backport clone of [Bugzilla Bug 2049306](https://bugzilla.redhat.com/show_bug.cgi?id=2049306). The following is the description of the original bug:

      Description of problem:
      The group-du-sno-ranGen.yaml reference PolicyGenTemplate includes two StorageClass entries, however the generated policy includes only one.

      Version-Release number of selected component (if applicable): 4.10

      How reproducible: always

      Steps to Reproduce:
      1. Run policyGen tool against reference group-du-sno-ranGen PolicyGenTemplate
      2. Observe generated results
      3.

      Actual results:
      Section from input PGT:

          - fileName: StorageLV.yaml
            policyName: "config-policy"
            spec:
              storageClassDevices:
                - storageClassName: "example-storage-class-1"
                  volumeMode: Filesystem
                  fsType: xfs
                  devicePaths:
                    - /dev/sdb1
                - storageClassName: "example-storage-class-2"
                  volumeMode: Filesystem
                  fsType: xfs
                  devicePaths:
                    - /dev/sdb2
      

      Generated Policy:

                          - complianceType: musthave
                            objectDefinition:
                              apiVersion: local.storage.openshift.io/v1
                              kind: LocalVolume
                              metadata:
                                  annotations:
                                      ran.openshift.io/ztp-deploy-wave: "10"
                                  name: local-disks
                                  namespace: openshift-local-storage
                              spec:
                                  logLevel: Normal
                                  managementState: Managed
                                  storageClassDevices:
                                      - devicePaths:
                                          - /dev/sdb1
                                        fsType: xfs
                                        storageClassName: example-storage-class-1
                                        volumeMode: Filesystem
      

      Expected results:
      Both example-storage-class-1 and example-storage-class-2 included

            saskari@redhat.com Saeid Askari
            openshift-crt-jira-prow OpenShift Prow Bot
            Yang Liu Yang Liu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: