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

"run bundle" failed : can't create directory '/database': Permission denied

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • 4.9.z
    • 4.9.z
    • Operator SDK
    • None
    • Important
    • None
    • Proposed
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      Operator sdk run bundle failed since the catalogsource pods can't be created successfully.

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

      	operator-sdk version: "v1.10.1-ocp", commit: 
      "feca9d550dba64c419a83236a1a62a6e553c6635", kubernetes version: "v1.21",
       go version: "go1.16.12", GOOS: "linux", GOARCH: "amd64"
      
      	cluster version: 4.9.48
      

      How reproducible:

      always

      Steps to Reproduce:

      1.#operator-sdk run bundle quay.io/olmqe/blacklist-bundle:v4.9
       

      Actual results:

      1.#operator-sdk run bundle quay.io/olmqe/blacklist-bundle:v4.9
      INFO[0032] Successfully created registry pod: quay-io-olmqe-blacklist-bundle-v4-9 
      INFO[0032] Created CatalogSource: blacklist-catalog     
      INFO[0033] OperatorGroup "operator-sdk-og" created      
      INFO[0033] Created Subscription: blacklist-v0-0-1-sub   
      FATA[0121] Failed to run bundle: install plan is not available for the subscription blacklist-v0-0-1-sub: timed out waiting for the condition
      2.#oc logs quay-io-olmqe-blacklist-bundle-v4-9
      mkdir: can't create directory '/database': Permission denied
      3.#oc describe pod quay-io-olmqe-blacklist-bundle-v4-9
      Name:         quay-io-olmqe-blacklist-bundle-v4-9
      Namespace:    default
      Priority:     0
      ...........
      Containers:
        registry-grpc:
          Container ID:  cri-o://c144df39b9d949c91cbd65c941dbd56fb09625864b3fd0c4c09bb3327c85ea6e
          Image:         quay.io/operator-framework/opm:latest
          Image ID:      quay.io/operator-framework/opm@sha256:20115067cd21ba59e04115a0c378bfb91569552ad096196c8f65a23bd3d22ac8
          Port:          50051/TCP
          Host Port:     0/TCP
          Command:
            sh
            -c
            mkdir -p /database && \
            opm registry add -d /database/index.db -b quay.io/olmqe/blacklist-bundle:v4.9 --mode=semver --skip-tls=false && \
            opm registry serve -d /database/index.db -p 50051
            
          State:          Waiting
            Reason:       CrashLoopBackOff
          Last State:     Terminated
            Reason:       Error
            Exit Code:    1
            Started:      Thu, 22 Sep 2022 21:16:21 +0800
            Finished:     Thu, 22 Sep 2022 21:16:21 +0800
          Ready:          False
          Restart Count:  38
          Environment:    <none>
          Mounts:
            /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-pvnht (ro)
      Conditions:
        Type              Status
        Initialized       True 
        Ready             False 
        ContainersReady   False 
        PodScheduled      True 
      Volumes:
        kube-api-access-pvnht:
          Type:                    Projected (a volume that contains injected data from multiple sources)
          TokenExpirationSeconds:  3607
          ConfigMapName:           kube-root-ca.crt
          ConfigMapOptional:       <nil>
          DownwardAPI:             true
          ConfigMapName:           openshift-service-ca.crt
          ConfigMapOptional:       <nil>
      QoS Class:                   BestEffort
      Node-Selectors:              <none>
      Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                                   node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
       

      Expected results:

      Install operator success.

      Additional info:

      The problem doesn't exist in operator-sdk 4.7 & operator-sdk 4.8.

              rhn-engineering-jesusr Jesus Rodriguez (Inactive)
              rhn-support-jfan Jia Fan
              Jia Fan Jia Fan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: