Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #14861 +/- ##
============================================
+ Coverage 18.34% 18.35% +0.01%
- Complexity 16669 16673 +4
============================================
Files 5939 5939
Lines 537819 537830 +11
Branches 65941 65943 +2
============================================
+ Hits 98638 98726 +88
+ Misses 427960 427877 -83
- Partials 11221 11227 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Fixes #14860
A multipath map that has lost all its paths still passes the block device check, so CloudStack skips discovery and hands the dead disk to the VM or to the template copy. This treats a map with no active paths as not connected, and connectVolume.sh now flushes such a map before scanning so it gets rebuilt. The wait loop also checks the device directly instead of calling back into the connect path.
If the dead map cant be flushed because something still holds it open, the attach does not succeed on the dead disk. It keeps retrying with a warning in agent.log until the existing retry limit runs out.
Test:
KVM host with a FlashArray FibreChannel volume. Attach it to a VM, hold the map open on the host (
sleep 10800 < /dev/mapper/3<wwid> &), detach it so the map is left with no paths, then attach it again.Before: attach succeeds on the dead map.
After: while the map is held, the agent refuses it instead of attaching it:
Once the map is released, connectVolume.sh flushes it, rescans, and the attach finishes on a healthy map:
Also added unit tests for the connected check.