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

redhat-operators was attempted to be used after setting disableAllDefaultSources to true

XMLWordPrintable

    • Moderate
    • None
    • OPECO 233
    • 1
    • Rejected
    • Unspecified
    • If docs needed, set a value

      OCP version: 4.10.13

      Wasn't able to deploy the local-storage-operator on a disconnected setup.

      After disabling all default sources, the catalogsource list was showing that only the new (and expected) sources are available:

      oc get catalogsource -A
      NAMESPACE NAME DISPLAY TYPE PUBLISHER AGE
      openshift-marketplace ztpfw-catalog Disconnected Lab grpc disconnected-lab 22h
      openshift-marketplace ztpfw-catalog-certfied Disconnected Lab Certified grpc disconnected-lab-certified 22h

      The deployment of local-storage-operator was failing.

      [kni@provisionhost-0-0 ~]$ oc describe packagemanifest -n openshift-marketplace local-storage-operator [1061/1899]
      Name: local-storage-operator
      Namespace: openshift-marketplace
      Labels: catalog=ztpfw-catalog
      catalog-namespace=openshift-marketplace
      operator-metering=true
      operatorframework.io/arch.amd64=supported
      operatorframework.io/arch.ppc64le=supported
      operatorframework.io/arch.s390x=supported
      operatorframework.io/os.linux=supported
      provider=Red Hat
      provider-url=
      Annotations: <none>
      API Version: packages.operators.coreos.com/v1
      Kind: PackageManifest
      Metadata:
      Creation Timestamp: 2022-05-30T16:35:55Z
      Spec:
      Status:
      Catalog Source: ztpfw-catalog
      Catalog Source Display Name: Disconnected Lab
      Catalog Source Namespace: openshift-marketplace
      Catalog Source Publisher: disconnected-lab
      Channels:
      Current CSV: local-storage-operator.4.10.0-202205120735
      Current CSV Desc:
      Annotations:
      Alm - Examples: [
      {
      "apiVersion": "local.storage.openshift.io/v1",
      "kind": "LocalVolume",
      "metadata":

      { "name": "example" }

      ,
      "spec": {
      "storageClassDevices": [

      { "devicePaths": [ "/dev/disk/by-id/ata-crucial" ], "fsType": "ext4", "storageClassName": "foobar", "volumeMode": "Filesystem" }

      ]
      }
      },
      {
      "apiVersion": "local.storage.openshift.io/v1alpha1",
      "kind": "LocalVolumeSet",
      "metadata":

      { "name": "example-localvolumeset" }

      ,
      "spec": {
      "deviceInclusionSpec":

      { "deviceMechanicalProperties": [ "Rotational", "NonRotational" ], "deviceTypes": [ "RawDisk" ], "maxSize": "100G", "minSize": "10G" }

      ,
      "maxDeviceCount": 10,
      "nodeSelector": {
      "nodeSelectorTerms": [
      {
      "matchExpressions": [

      { "key": "kubernetes.io/hostname", "operator": "In", "values": [ "worker-0", "worker-1" ] }

      ]
      }
      ]
      },
      "storageClassName": "example-storageclass",
      "volumeMode": "Block"
      }
      },
      {
      "apiVersion": "local.storage.openshift.io/v1alpha1",
      "kind": "LocalVolumeDiscovery",
      "metadata":

      { "name": "auto-discover-devices" }

      ,
      "spec": {
      "nodeSelector": {
      "nodeSelectorTerms": [
      {
      "matchExpressions": [ [965/1899]

      { "key": "kubernetes.io/hostname", "operator": "In", "values": [ "worker-0", "worker-1" ] }

      ]
      }
      ]
      }
      }
      }
      ]
      Capabilities: Full Lifecycle
      Categories: Storage
      Container Image: registry.redhat.io/openshift4/ose-local-storage-operator@sha256:4a9944acc875d20f6c7095bf3f65c1b35ee50ed1746659e13ceacf64b6defb30
      Created At: 2019-08-14T00:00:00Z
      Description: Configure and use local storage volumes.
      olm.skipRange: >=4.3.0 <4.10.0-202205120735
      operatorframework.io/cluster-monitoring: true
      operatorframework.io/suggested-namespace: openshift-local-storage
      operators.operatorframework.io/internal-objects: ["localvolumediscoveryresults.local.storage.openshift.io"]
      Repository: https://github.com/openshift/local-storage-operator
      Support: Red Hat
      target.workload.openshift.io/management:

      {"effect": "PreferredDuringScheduling"}

      Apiservicedefinitions:
      Customresourcedefinitions:
      Owned:
      Description: Manage local storage volumes for OpenShift
      Display Name: Local Volume
      Kind: LocalVolume
      Name: localvolumes.local.storage.openshift.io
      Version: v1
      Description: A Local Volume set allows you to filter a set of storage volumes, group them and create a dedicated storage class to consume storage from the set of volumes.
      Display Name: Local Volume Set
      Kind: LocalVolumeSet
      Name: localvolumesets.local.storage.openshift.io
      Version: v1alpha1
      Description: Discover list of potentially usable disks on the chosen set of nodes
      Display Name: Local Volume Discovery
      Kind: LocalVolumeDiscovery
      Name: localvolumediscoveries.local.storage.openshift.io
      Version: v1alpha1
      Description: Disc inventory of available disks from selected nodes
      Display Name: Local Volume Discovery Result
      Kind: LocalVolumeDiscoveryResult
      Name: localvolumediscoveryresults.local.storage.openshift.io
      Version: v1alpha1
      Description: Operator that configures local storage volumes for use in Kubernetes and OpenShift. OpenShift 4.2 and above are the only supported OpenShift versions.

      Display Name: Local Storage
      Install Modes:
      Supported: true
      Type: OwnNamespace
      Supported: true
      Type: SingleNamespace
      Supported: false
      Type: MultiNamespace
      Supported: false
      Type: AllNamespaces
      Keywords:
      storage
      local storage
      Links:
      Name: Documentation
      URL: https://github.com/openshift/local-storage-operator/tree/master/docs
      Name: Source Repository
      URL: https://github.com/openshift/local-storage-operator
      Maintainers:
      Email: aos-storage-staff@redhat.com
      Name: Red Hat
      Maturity: stable
      Min Kube Version: 1.14.0
      Provider:
      Name: Red Hat
      Related Images:
      registry.redhat.io/openshift4/ose-local-storage-operator@sha256:4a9944acc875d20f6c7095bf3f65c1b35ee50ed1746659e13ceacf64b6defb30
      registry.redhat.io/openshift4/ose-kube-rbac-proxy@sha256:8503a9bab5ea92bc6f7f8cdc00b4dab8e73103973d17b0bfdbf921d15cd9a4c0
      registry.redhat.io/openshift4/ose-local-storage-diskmaker@sha256:1fbce778fed9f8422fd39b9e1072e0379b03ce11ed0e6bb4e641d56537fe6f67
      Version: 4.10.0-202205120735
      Name: 4.10
      Current CSV: local-storage-operator.4.10.0-202205120735
      Current CSV Desc:
      Annotations:
      Alm - Examples: [
      {
      "apiVersion": "local.storage.openshift.io/v1",
      "kind": "LocalVolume",
      "metadata":

      { "name": "example" }

      ,
      "spec": {
      "storageClassDevices": [

      { "devicePaths": [ "/dev/disk/by-id/ata-crucial" ], "fsType": "ext4", "storageClassName": "foobar", "volumeMode": "Filesystem" }

      ]
      }
      },
      {
      "apiVersion": "local.storage.openshift.io/v1alpha1",
      "kind": "LocalVolumeSet",
      "metadata":

      { "name": "example-localvolumeset" }

      ,
      "spec": {
      "deviceInclusionSpec":

      { "deviceMechanicalProperties": [ "Rotational", "NonRotational" ], "deviceTypes": [ "RawDisk" ], "maxSize": "100G", "minSize": "10G" }

      ,
      "maxDeviceCount": 10,
      "nodeSelector": {
      "nodeSelectorTerms": [
      {
      "matchExpressions": [

      { "key": "kubernetes.io/hostname", "operator": "In", "values": [ "worker-0", "worker-1" ] }

      ]
      }
      ]
      },
      "storageClassName": "example-storageclass",
      "volumeMode": "Block"
      }
      },
      {
      "apiVersion": "local.storage.openshift.io/v1alpha1",
      "kind": "LocalVolumeDiscovery",
      "metadata":

      { "name": "auto-discover-devices" }

      ,
      "spec": { [813/1899]
      "nodeSelector": {
      "nodeSelectorTerms": [
      {
      "matchExpressions": [

      { "key": "kubernetes.io/hostname", "operator": "In", "values": [ "worker-0", "worker-1" ] }

      ]
      }
      ]
      }
      }
      }
      ]
      Capabilities: Full Lifecycle
      Categories: Storage
      Container Image: registry.redhat.io/openshift4/ose-local-storage-operator@sha256:4a9944acc875d20f6c7095bf3f65c1b35ee50ed1746659e13ceacf64b6defb30
      Created At: 2019-08-14T00:00:00Z
      Description: Configure and use local storage volumes.
      olm.skipRange: >=4.3.0 <4.10.0-202205120735
      operatorframework.io/cluster-monitoring: true
      operatorframework.io/suggested-namespace: openshift-local-storage
      operators.operatorframework.io/internal-objects: ["localvolumediscoveryresults.local.storage.openshift.io"]
      Repository: https://github.com/openshift/local-storage-operator
      Support: Red Hat
      target.workload.openshift.io/management:

      {"effect": "PreferredDuringScheduling"}

      Apiservicedefinitions:
      Customresourcedefinitions:
      Owned:
      Description: Manage local storage volumes for OpenShift
      Display Name: Local Volume
      Kind: LocalVolume
      Name: localvolumes.local.storage.openshift.io
      Version: v1
      Description: A Local Volume set allows you to filter a set of storage volumes, group them and create a dedicated storage class to consume storage from the set of volumes.
      Display Name: Local Volume Set
      Kind: LocalVolumeSet
      Name: localvolumesets.local.storage.openshift.io
      Version: v1alpha1
      Description: Discover list of potentially usable disks on the chosen set of nodes
      Display Name: Local Volume Discovery
      Kind: LocalVolumeDiscovery
      Name: localvolumediscoveries.local.storage.openshift.io
      Version: v1alpha1
      Description: Disc inventory of available disks from selected nodes
      Display Name: Local Volume Discovery Result
      Kind: LocalVolumeDiscoveryResult
      Name: localvolumediscoveryresults.local.storage.openshift.io
      Version: v1alpha1
      Description: Operator that configures local storage volumes for use in Kubernetes and OpenShift. OpenShift 4.2 and above are the only supported OpenShift versions.

      Display Name: Local Storage
      Install Modes:
      Supported: true
      Type: OwnNamespace
      Supported: true
      Type: SingleNamespace
      Supported: false
      Type: MultiNamespace
      Supported: false
      Type: AllNamespaces
      Keywords:
      storage
      local storage
      Links:
      Name: Documentation
      URL: https://github.com/openshift/local-storage-operator/tree/master/docs
      Name: Source Repository
      URL: https://github.com/openshift/local-storage-operator
      Maintainers:
      Email: aos-storage-staff@redhat.com
      Name: Red Hat
      Maturity: stable
      Min Kube Version: 1.14.0
      Provider:
      Name: Red Hat
      Related Images:
      registry.redhat.io/openshift4/ose-local-storage-diskmaker@sha256:1fbce778fed9f8422fd39b9e1072e0379b03ce11ed0e6bb4e641d56537fe6f67
      registry.redhat.io/openshift4/ose-local-storage-operator@sha256:4a9944acc875d20f6c7095bf3f65c1b35ee50ed1746659e13ceacf64b6defb30
      registry.redhat.io/openshift4/ose-kube-rbac-proxy@sha256:8503a9bab5ea92bc6f7f8cdc00b4dab8e73103973d17b0bfdbf921d15cd9a4c0
      Version: 4.10.0-202205120735
      Name: stable
      Default Channel: stable
      Package Name: local-storage-operator
      Provider:
      Name: Red Hat
      Events: <none>

      The yaml for subscription:
      apiVersion: operators.coreos.com/v1alpha1
      kind: Subscription
      metadata:
      labels:
      operators.coreos.com/local-storage-operator.openshift-local-storage: ""
      name: local-storage-operator
      namespace: openshift-local-storage
      spec:
      channel: stable
      name: local-storage-operator
      source: ztpfw-catalog
      sourceNamespace: openshift-marketplace

      After applying the yaml, we were getting the following status running describe on the subscription:

      status:
      catalogHealth:

      • catalogSourceRef:
        apiVersion: operators.coreos.com/v1alpha1
        kind: CatalogSource
        name: ztpfw-catalog
        namespace: openshift-marketplace
        resourceVersion: "29973"
        uid: beacebda-8e91-4e02-8f27-e052a421cc91
        healthy: true
        lastUpdated: "2022-05-30T16:45:45Z"
      • catalogSourceRef:
        apiVersion: operators.coreos.com/v1alpha1
        kind: CatalogSource
        name: ztpfw-catalog-certfied
        namespace: openshift-marketplace
        resourceVersion: "29845"
        uid: e394f1e0-7a9d-4918-9e59-de8f69a068ce
        healthy: true
        lastUpdated: "2022-05-30T16:45:45Z"
        conditions:
      • lastTransitionTime: "2022-05-30T16:45:45Z"
        message: all available catalogsources are healthy
        reason: AllCatalogSourcesHealthy
        status: "False"
        type: CatalogSourcesUnhealthy
      • message: 'error using catalog redhat-operators (in namespace openshift-marketplace):
        failed to list bundles: rpc error: code = Unavailable desc = connection error:
        desc = "transport: Error while dialing dial tcp: lookup redhat-operators.openshift-marketplace.svc
        on 172.30.0.10:53: no such host"'
        reason: ErrorPreventedResolution
        status: "True"
        type: ResolutionFailed
        lastUpdated: "2022-05-30T16:45:45Z"

      Only after we ran:
      oc patch OperatorHub cluster --type json -p '[

      {"op": "add", "path": "/spec/disableAllDefaultSources", "value": false}

      ]'

      followed by:
      oc patch OperatorHub cluster --type json -p '[

      {"op": "add", "path": "/spec/disableAllDefaultSources", "value": true}

      ]'

      Things settled and the same subscription yaml was successfully used to deploy the local-storage-operator

      [kni@provisionhost-0-0 ~]$ oc get csv
      NAME DISPLAY VERSION REPLACES PHASE
      local-storage-operator.4.10.0-202205120735 Local Storage 4.10.0-202205120735 Succeeded

              anik120 Anik Bhattacharjee
              achuzhoy@redhat.com Alexander Chuzhoy
              Jian Zhang Jian Zhang
              Red Hat Employee
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: