[release-2.11] MTV-4413 | Skip context-dependent validations when maps are missing#4728
Merged
yaacov merged 1 commit intorelease-2.11from Feb 12, 2026
Merged
[release-2.11] MTV-4413 | Skip context-dependent validations when maps are missing#4728yaacov merged 1 commit intorelease-2.11from
yaacov merged 1 commit intorelease-2.11from
Conversation
Issue: When a NetworkMap or StorageMap referenced by a Plan is deleted, validateNetworkMap/validateStorageMap correctly set Critical conditions but plancontext.New() then fails because Referenced.Map is nil. This hard error prevents updatePlanStatus() from ever being called, so the conditions are never persisted and the controller fails. Fix: Add an early return in validate() after map validations when blocker conditions are already present. This lets the reconcile flow continue, reconcile will also check HasBlockerCondition() and skips execution, and the user sees a "not ready" status on the Plan instead of controller crash. Ref: https://issues.redhat.com/browse/MTV-4413 Resolves: MTV-4413 Signed-off-by: yaacov <yzamir@redhat.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Backport: #4725
Issue:
When a NetworkMap or StorageMap referenced by a Plan is deleted, validateNetworkMap/validateStorageMap correctly set Critical conditions but plancontext.New() then fails because Referenced.Map is nil. This hard error prevents updatePlanStatus() from ever being called, so the conditions are never persisted and the controller fails.
Fix:
Add an early return in validate() after map validations when blocker conditions are already present. This lets the reconcile flow continue, reconcile will also check HasBlockerCondition() and skips execution, and the user sees a "not ready" status on the Plan instead of controller crash.
Example:
Create a plan and delete the network map:
Without fix:
with fix:
Ref: https://issues.redhat.com/browse/MTV-4413
Resolves: MTV-4413