Skip to content

[oadp-1.5] OADP-8924: Treat missing openshift-apiserver config as no internal registry - #499

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:oadp-1.5from
openshift-cherrypick-robot:cherry-pick-489-to-oadp-1.5
Oct 21, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
openshift:oadp-1.5from
openshift-cherrypick-robot:cherry-pick-489-to-oadp-1.5

Conversation

@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

This is an automated cherry-pick of #489

/assign kaovilai

GetRegistryInfo returned the NotFound error from the openshift-apiserver/config
ConfigMap Get. Clusters without that ConfigMap (e.g. HCP guest clusters, where
openshift-apiserver runs on the management cluster) then failed every
backup/restore item action that calls GetRegistryInfo, such as pods:

  error executing custom action (groupResource=pods ...): rpc error:
  code = Unknown desc = configmaps "config" not found

On NotFound, cache and return an empty registry hostname with no error, matching
the existing handling of a missing docker-registry service on K8s <= 1.11. Other
errors are still returned.

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Co-Authored-By: Claude Code (model: Claude Sonnet 5.5) <noreply@anthropic.com>
@openshift-ci-robot

openshift-ci-robot commented Oct 21, 2026 •

Copy link
Copy Markdown

@openshift-cherrypick-robot: Ignoring requests to cherry-pick non-bug issues: OADP-8924

Details

In response to this:

This is an automated cherry-pick of #489

/assign kaovilai

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 4cdf2ae7-2eec-4ba1-a686-ce6b5afacc85

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@sseago

sseago commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 21, 2026
@sseago

sseago commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Oct 21, 2026
@openshift-ci

openshift-ci Bot commented Oct 21, 2026

Copy link
Copy Markdown

@openshift-cherrypick-robot: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-ci

openshift-ci Bot commented Oct 21, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: openshift-cherrypick-robot, shubham-pampattiwar, sseago

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [shubham-pampattiwar,sseago]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-bot Bot merged commit 6ed67d3 into openshift:oadp-1.5 Oct 21, 2026
4 checks passed
@kaovilai

Copy link
Copy Markdown
Member

Validated this oadp-1.5 backport on a live HCP guest: ROSA HCP, OCP 4.21.40, OADP 1.5.8. The fix works.

On base (f6bd7ad) the bug reproduces for both backup and restore. With this PR (a12a502) it is gone, and the logs show the new IsNotFound branch ran. The default path behaves the same as before.

Findings from the live guest, beyond what #489 reasoned from code:

  • openshift-apiserver/config is genuinely absent in the guest (configmaps "config" not found), while the openshift-apiserver namespace exists.
  • A default guest never reaches the configmap lookup. All 59 openshift imagestreams have dockerImageRepository set, so the imagestream lookup succeeds first.
  • Setting the guest registry to Removed does not clear dockerImageRepository. I watched for 10 minutes. On HCP the hostname comes from the management-side openshift-apiserver config, so that trigger from OADP-8924: Treat missing openshift-apiserver config as no internal registry #489 does not apply on HCP.
  • The ROSA CLI can't disable the ImageRegistry capability on HCP. The realistic trigger is a self-managed HCP guest with ImageRegistry disabled, or any guest where the openshift imagestream lookup comes up empty.

Caveat: the missing configmap was real, but I induced the empty-imagestream condition. I set samples to Removed and deleted the 10 CVO payload imagestreams, then started each backup or restore right away. CVO recreates them within about 15–20 s, which is long enough for the plugin's lookup. Each run's logs show which branch was taken.

Scenario base f6bd7ad PR a12a502
Backup, imagestreams present (default guest) Completed 40/40, value from imagestream Completed 40/40, value from imagestream
Backup, no imagestreams + configmap NotFound PartiallyFailed, 3× configmaps "config" not found (pods, deployments, replicasets) Completed 40/40, 0 errors, logs openshift-apiserver config not found, no internal registry once
Restore into a new namespace, same condition PartiallyFailed, Deployment/ReplicaSet/Pod not restored Completed 32/32, app rolled out, configmap data intact
Stock OADP 1.5.8 plugin, same condition PartiallyFailed, same 3 errors (fix not yet shipped in 1.5.8) —
Details
  • Images were swapped through the CSV RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN, pinned by digest. The velero pod's init container imageID was checked before each run.
    • base: quay.io/tkaovila/openshift-velero-plugin@sha256:02c681f196453d355ec430b4d9a8c9d981ac6b291e0d7891b58944fd2d5d8aca
    • PR: quay.io/tkaovila/openshift-velero-plugin@sha256:29d62a4565a55cc42dcf3f0f9ee434af359bb1d4c8cd2abf7aaf74eeae47cad3
  • Backup content, pod annotation openshift.io/backup-registry-hostname:
    • default path: image-registry.openshift-image-registry.svc:5000
    • PR with no registry: ""
  • The 10 restore warnings (same on both images) come from ROSA-managed dedicated-admins* RoleBindings and CA ConfigMaps that already exist in the target namespace. They are unrelated.
  • Not tested live: non-NotFound errors (403/5xx) still fail items. The unit test's 500 case covers that.
  • Unit tests: go test ./velero-plugins/common/... passes on the PR. The new NotFound test case fails on base, as intended.
  • The cluster and all test resources were torn down afterwards.

Note

Responses generated with Claude (model: Claude Opus 5.5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants