Uploaded image for project: 'Red Hat Developer Hub Bugs'
  1. Red Hat Developer Hub Bugs
  2. RHDHBUGS-2738

Known Issue: Using the mirror-plugins.sh script to mirror the plugin catalog index image may cause Operator-backed RHDH instances to fail to start if using the mirrored catalog index image

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • Hide
      = Operator-backed {product-very-short} instances might fail to start when using a mirrored plugin catalog index image

      Using the `mirror-plugins.sh` script to mirror the plugin catalog index image in a disconnected environment might cause Operator-backed {product} ({product-very-short}) instances to fail to start. Running the script rebuilds the catalog index image after replacing all plugin OCI references. If you subsequently use that mirrored catalog index image in your Backstage custom resource (CR), the init container fails to start and logs an error similar to the following:

      [source,text]
      ----
      InstallException: Cannot use {{inherit}} for oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-orchestrator: no existing plugin configuration found. Ensure a plugin from this image is defined in an included file with an explicit version.
      ----

      This occurs because the `install-dynamic-plugins` process resolves OCI references and attempts to merge plugin configurations even for plugins that are disabled by default in the Operator's configuration. This issue specifically affects Operator-backed instances of RHDH.

      As a workaround, manually empty the default `plugins` list in the Operator's default `ConfigMap`.
      +
      [NOTE]
      ====
      These manual changes are reverted when the Operator is upgraded.
      ====

      . Edit the `rhdh-default-config` ConfigMap located in the `rhdh-operator` namespace.
      . Locate the `dynamic-plugins.yaml` key within the ConfigMap data.
      . Modify the `plugins` field so that it is an empty list (`plugins: []`), as shown in the example below:
      +
      [source,yaml]
      ----
      # -- Truncated --
        dynamic-plugins.yaml: |
          apiVersion: v1
          kind: ConfigMap
          metadata:
            name: default-dynamic-plugins
          data:
            dynamic-plugins.yaml: |
              includes:
                - dynamic-plugins.default.yaml
              plugins: []
      # -- Truncated --
      ----
      . Save the ConfigMap and wait a few seconds for the changes to automatically propagate to the Operator pod.
      Show
      = Operator-backed {product-very-short} instances might fail to start when using a mirrored plugin catalog index image Using the `mirror-plugins.sh` script to mirror the plugin catalog index image in a disconnected environment might cause Operator-backed {product} ({product-very-short}) instances to fail to start. Running the script rebuilds the catalog index image after replacing all plugin OCI references. If you subsequently use that mirrored catalog index image in your Backstage custom resource (CR), the init container fails to start and logs an error similar to the following: [source,text] ---- InstallException: Cannot use {{inherit}} for oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-orchestrator: no existing plugin configuration found. Ensure a plugin from this image is defined in an included file with an explicit version. ---- This occurs because the `install-dynamic-plugins` process resolves OCI references and attempts to merge plugin configurations even for plugins that are disabled by default in the Operator's configuration. This issue specifically affects Operator-backed instances of RHDH. As a workaround, manually empty the default `plugins` list in the Operator's default `ConfigMap`. + [NOTE] ==== These manual changes are reverted when the Operator is upgraded. ==== . Edit the `rhdh-default-config` ConfigMap located in the `rhdh-operator` namespace. . Locate the `dynamic-plugins.yaml` key within the ConfigMap data. . Modify the `plugins` field so that it is an empty list (`plugins: []`), as shown in the example below: + [source,yaml] ---- # -- Truncated --   dynamic-plugins.yaml: |     apiVersion: v1     kind: ConfigMap     metadata:       name: default-dynamic-plugins     data:       dynamic-plugins.yaml: |         includes:           - dynamic-plugins.default.yaml         plugins: [] # -- Truncated -- ---- . Save the ConfigMap and wait a few seconds for the changes to automatically propagate to the Operator pod.
    • Known Issue
    • Done

      Description of problem:

      When running the mirror-plugins.sh script to mirror a full plugin catalog index image, it currently rebuilds that catalog index image after replacing all plugin OCI references to their mirrored ones.
      When a user later tries to use that mirrored catalog index image in their Backstage CR in their disconnected environment, the init container will fail to start with an error like this, even if the user did not declare any plugin reference to registry.access.redhat.com:

      InstallException: Cannot use {{inherit}} for oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-orchestrator: no existing plugin configuration found. Ensure a plugin from this image is defined in an included file with an explicit version.
      

      Root cause

      Those registry.access.redhat.com refs are declared in the operator default config (but disabled by default), and later merged by the Operator at runtime with the user-provided dynamic-plugins ConfigMap when it reconciles the CR.
      Now the problem is that the install-dynamic-plugins resolves the OCI references and attempts to merge plugin configs even on disabled plugins, as reported in RHDHBUGS-2533 (related Slack thread).

      This issue only affects Operator-backed instances of RHDH.

      Workaround

      Manually edit the Operator's default config ConfigMap in the cluster: called `rhdh-default-config` in the `rhdh-operator` namespace.
      Locate the `dynamic-plugins.yaml` key in that ConfigMap and make the default `plugins` list empty, as shown in the example below. Then wait a few seconds until the changes are automatically propagated to the Operator pod.

      # -- Truncated --
        dynamic-plugins.yaml: |
          apiVersion: v1
          kind: ConfigMap
          metadata: 
            name: default-dynamic-plugins
          data: 
            dynamic-plugins.yaml: |
              includes: 
                - dynamic-plugins.default.yaml
              ### TODO: You would need to edit the "plugins" field below: 
              plugins: []
      # -- Truncated --
      

      Notes

      • RHDHBUGS-2649 should help address this by no longer rebuilding the plugin catalog index image. As part of the airgapping procedure, it would be up to the user to explicitly mount a standard registries.conf extra file into the init container with their own mirroring rules, so that they can benefit from transparent mirroring of the plugin refs.

              rhn-support-jmagak Judith Amondi Magak
              rh-ee-asoro Armel Soro
              RHDH Install
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: