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

opm fails to serve FBC if cachedir not provided

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 4.13
    • 4.13, 4.12
    • OLM
    • None
    • ODSK 231
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Bug Fix
    • Done

      Description of problem:

      opm serve fails with message:
      
      Error: compute digest: compute hash: write tar: stat .: os: DirFS with empty root

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

      4.12

      How reproducible:

      100%

      Steps to Reproduce:

      (The easiest reproducer involves serving an empty catalog)

      1. mkdir /tmp/catalog
      
      2. using Dockerfile /tmp/catalog.Dockerfile based on 4.12 docs (https://access.redhat.com/documentation/en-us/openshift_container_platform/4.12/html-single/operators/index#olm-creating-fb-catalog-image_olm-managing-custom-catalogs
      # The base image is expected to contain
      # /bin/opm (with a serve subcommand) and /bin/grpc_health_probe
      FROM registry.redhat.io/openshift4/ose-operator-registry:v4.12
      
      # Configure the entrypoint and command
      ENTRYPOINT ["/bin/opm"]
      CMD ["serve", "/configs"]
      
      # Copy declarative config root into image at /configs
      ADD catalog /configs
      
      # Set DC-specific label for the location of the DC root directory
      # in the image
      LABEL operators.operatorframework.io.index.configs.v1=/configs
      
      3. build the image `cd /tmp/ && docker build -f catalog.Dockerfile .`
      
      4. execute an instance of the container in docker/podman `docker run --name cat-run [image-file]`
      
      5. error

      Using a dockerfile generated from opm (`opm generate dockerfile [dir]`) works, but includes precache and cachedir options to opm.

       

      Actual results:

      Error: compute digest: compute hash: write tar: stat .: os: DirFS with empty root

      Expected results:

      opm generates cache in default /tmp/cache location and serves without error

      Additional info:

       

       

              rh-ee-jkeister Jordan Keister
              rh-ee-jkeister Jordan Keister
              Xia Zhao Xia Zhao
              Alex Dellapenta Alex Dellapenta
              Votes:
              1 Vote for this issue
              Watchers:
              20 Start watching this issue

                Created:
                Updated:
                Resolved: