Subsequent VM Creation is failing for ISCSI Storage Pool on Oracle Linux - #88
Open
suryag1201 wants to merge 2 commits into
Open
Subsequent VM Creation is failing for ISCSI Storage Pool on Oracle Linux#88suryag1201 wants to merge 2 commits into
suryag1201 wants to merge 2 commits into
Conversation
added 2 commits
August 6, 2026 22:34
There was a problem hiding this comment.
Pull request overview
This PR addresses failures when creating subsequent VMs on iSCSI primary storage with KVM (notably on Oracle Linux) by making iSCSI login/rescan behavior more robust and adding additional readiness checks before proceeding.
Changes:
- Adds explicit handling for iscsiadm exit codes and a pre-login session existence check to decide when a rescan is needed.
- Updates iSCSI login result handling to be idempotent across distros (Ubuntu vs Oracle Linux behavior) and triggers rescans when a session pre-exists.
- Adds extra validation for device readiness and improves by-path filesystem checks before calling
blockdev.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+351
to
+354
| if (Files.isRegularFile(devicePath)) { | ||
| logger.warn("Removing corrupt regular file at iSCSI by-path {} (expected block device symlink)", deviceByPath); | ||
| return 0L; | ||
| } |
Comment on lines
+230
to
+234
| OutputInterpreter.AllLinesParser parser = new OutputInterpreter.AllLinesParser(); | ||
|
|
||
| sessionCmd.executeIgnoreExitValue(parser, ISCSI_ERR_NO_OBJS_FOUND); | ||
|
|
||
| String sessions = parser.getLines(); |
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.
Description
Subsequent VM Creation is failing for ISCSI Storage Pool on Oracle Linux
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Tested on both Oracle and Unbuntu and tried creating multiple VMs
How did you try to break this feature and the system with this change?