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

A docker image bundled with grafana is not able to run and throws Operation not permitted

XMLWordPrintable

    • Important
    • Rejected
    • All
    • If docs needed, set a value

      Description of problem:
      A docker image which bundles grafana is not able to run and throws '/usr/share/grafana/bin/grafana-server: Operation not permitted' Pods goes into crashLoopBackOff

      This issue is specific to OCP 4.11 environment. It works with earlier versions of OCP.
      Version-Release number of selected component (if applicable):
      Grfana (7.1.5) and OCP 4.11.0-RC-5.

      How reproducible:
      A dockerfile which bundles grafana has below kind of RUN instruction

      RUN setcap 'cap_net_bind_service=+ep' /usr/share/grafana/bin/grafana-server && \
      chmod 775 /run.sh
      EXPOSE 3000

      USER grafana
      WORKDIR /
      ENTRYPOINT [ "/run.sh" ]

      (run.sh starts the grafana server like below)

      exec grafana-server \
      --homepath="$GF_PATHS_HOME" \
      --config="$GF_PATHS_CONFIG" \
      "$@" \
      cfg:default.log.mode="console" \
      cfg:default.paths.data="$GF_PATHS_DATA" \
      cfg:default.paths.logs="$GF_PATHS_LOGS" \
      cfg:default.paths.plugins="$GF_PATHS_PLUGINS" \
      cfg:default.paths.provisioning="$GF_PATHS_PROVISIONING"

      (Note: i have even replaced exec and started grafana-server like below. still same problem

      /usr/share/grafana/bin/grafana-server \
      --homepath="$GF_PATHS_HOME" \
      --config="$GF_PATHS_CONFIG" \
      "$@" \
      cfg:default.log.mode="console" \
      cfg:default.paths.data="$GF_PATHS_DATA" \
      cfg:default.paths.logs="$GF_PATHS_LOGS" \
      cfg:default.paths.plugins="$GF_PATHS_PLUGINS" \
      cfg:default.paths.provisioning="$GF_PATHS_PROVISIONING"

      Steps to Reproduce:
      1. grafana docker image is built with above code
      2. ibm-monitoring-grafana operator deploys grafana
      3. Grafana pods gets created and CrashLoopBackOff error is seen

      grafana container log throws below issue
      /run.sh: line 74: /usr/share/grafana/bin/grafana-server: Operation not permitted

      Actual results:
      Grafana pod goes into CrashLoopBackOff error

      Expected results:

      Grafana pod comes up properly

      Additional info:
      We have seen this issue only with OCP 4.11 version. It was working fine till OCP 4.10

            rhn-coreos-sponnaga Sudha Ponnaganti
            openshift_jira_bot OpenShift Jira Bot
            Xiaojie Yuan Xiaojie Yuan
            Red Hat Employee
            Sudha Ponnaganti
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: