Repository navigation
fix: return success when backend image/volume is missing on unpublish - #6589
mergify[bot] merged 2 commits into
Conversation
| volOptions, _, err := store.NewVolumeOptionsFromVolID(ctx, volumeId, nil, secrets, cs.ClusterName) | ||
| if err != nil { | ||
| if errors.Is(err, cerrors.ErrVolumeNotFound) || | ||
| errors.Is(err, util.ErrKeyNotFound) || |
There was a problem hiding this comment.
do we need KeyNotFound error here? same for rbd as well
There was a problem hiding this comment.
First we get the imageID from the journal and then getImageInfo(). If the journal object/key state is messed up (manually or other reason) there is no way we can getImageInfo. Similar for CephFS
There was a problem hiding this comment.
we still need to consider new keys or few less important keys not required for Unpublish/delete might be present for new volumes not for old one.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Regression tests are needed to protect the new error-handling behavior in both drivers.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Makes controller unpublish idempotent when RBD or CephFS backend resources are missing, allowing attachment cleanup to complete.
Changes:
- Treat missing images, subvolumes, journal keys, and pools as successful unpublishes.
- Log skipped cleanup for missing volumes.
| File | Description |
|---|---|
internal/rbd/controllerserver.go |
Handles missing RBD resources successfully. |
internal/cephfs/controllerserver.go |
Handles missing CephFS resources successfully. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if errors.Is(err, cerrors.ErrVolumeNotFound) || | ||
| errors.Is(err, util.ErrKeyNotFound) || | ||
| errors.Is(err, util.ErrPoolNotFound) { |
| if errors.Is(err, rbderrors.ErrImageNotFound) || | ||
| errors.Is(err, util.ErrKeyNotFound) || | ||
| errors.Is(err, util.ErrPoolNotFound) { |
|
@iPraveenParihar , please add the |
|
/queue |
|
@Mergifyio rebase |
❌ This pull request comes from a fork and cannot be rebasedDetailsGitHub refuses an OAuth token on its rebase API for a fork, so rebasing one means impersonating a GitHub user to force-push the contributor's branch. Mergify does not do that. Use the |
|
@Mergifyio rebase |
❌ This pull request comes from a fork and cannot be rebasedDetailsGitHub refuses an OAuth token on its rebase API for a fork, so rebasing one means impersonating a GitHub user to force-push the contributor's branch. Mergify does not do that. Use the |
|
/queue |
|
@Mergifyio rebase |
❌ This pull request comes from a fork and cannot be rebasedDetailsGitHub refuses an OAuth token on its rebase API for a fork, so rebasing one means impersonating a GitHub user to force-push the contributor's branch. Mergify does not do that. Use the |
|
@Mergifyio queue |
Merge Queue Status
This pull request spent 50 seconds in the queue, with no time running CI. ReasonThe merge conditions cannot be satisfied due to failing checks
HintYou may have to fix your CI before adding the pull request to the queue again. Required conditions to merge
Requeued — the merge queue status continues in this comment ↓. |
|
/test ci/centos/upgrade-tests-cephfs |
|
/test ci/centos/mini-e2e/k8s-1.37/nfs |
|
/test ci/centos/upgrade-tests-rbd |
|
/test ci/centos/k8s-e2e-external-storage/1.36 |
|
/test ci/centos/k8s-e2e-external-storage/1.35 |
|
/test ci/centos/k8s-e2e-external-storage/1.35 |
|
/test ci/centos/mini-e2e/k8s-1.35 |
|
/test ci/centos/upgrade-tests-rbd |
|
/test ci/centos/k8s-e2e-external-storage/1.36 |
|
/test ci/centos/k8s-e2e-external-storage/1.34 |
|
/test ci/centos/mini-e2e/k8s-1.36 |
|
/test ci/centos/mini-e2e/k8s-1.34 |
|
😞 Why did Mergify add queue label in middle of ongoing CI runs? Now it runs all again. |
|
/test ci/centos/k8s-e2e-external-storage/1.34 Failed to install the VM to run the tests, logs. |
|
/test ci/centos/mini-e2e/k8s-1.37/nfs Flaked twice. |
|
Both failing e2e report: |
|
/retest ci/centos/k8s-e2e-external-storage/1.34 |
|
/retest ci/centos/mini-e2e/k8s-1.34 |
|
failed logs |
|
/retest ci/centos/mini-e2e/k8s-1.34 |
|
😕 it passed on 1.35 and 1.36, and fails on 1.34 The IP 10.244.1.5 is not inside 10.244.0.0/24, @nixpanic @gadididi Is this flaky test we need to improve or error handling needed in core logic? |
|
/test ci/centos/mini-e2e/k8s-1.34 |
|
skipping e2e as e2e passed for other tests, this seems flaky |
Merge Queue Status
This pull request spent 10 seconds in the queue, including 1 second running CI. Required conditions to merge
|
Hi @iPraveenParihar sorry about that, I was on PTO.. it is something wrong I do in the nvmeof e2e test, I will fix it ASAP. |

Describe what this PR does
Fixes: #6586
Checklist:
Show available bot commands
These commands are normally not required, but in case of issues, leave any of
the following bot commands in an otherwise empty comment in this PR:
/retest ci/centos/<job-name>: retest the<job-name>after unrelatedfailure (please report the failure too!)