Skip to content

Subsequent VM Creation is failing for ISCSI Storage Pool on Oracle Linux - #88

Open
suryag1201 wants to merge 2 commits into
mainfrom
bugfix/CSTACKEX-233
Open

Subsequent VM Creation is failing for ISCSI Storage Pool on Oracle Linux#88
suryag1201 wants to merge 2 commits into
mainfrom
bugfix/CSTACKEX-233

Conversation

@suryag1201

@suryag1201 suryag1201 commented Aug 7, 2026

Copy link
Copy Markdown

Description

Subsequent VM Creation is failing for ISCSI Storage Pool on Oracle Linux

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

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?

Copilot AI lite review requested due to automatic review settings August 7, 2026 10:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants