Skip to content

toolkit: fix encrypted ISO installer hang - #18795

Open
Muhammad Falak R Wani (mfrw) wants to merge 1 commit into
3.0-devfrom
mfrw/fix-encrypted-iso-installer-hang
Open

toolkit: fix encrypted ISO installer hang#18795
Muhammad Falak R Wani (mfrw) wants to merge 1 commit into
3.0-devfrom
mfrw/fix-encrypted-iso-installer-hang

Conversation

@mfrw

Copy link
Copy Markdown
Member

Use WaitForDiskDevice instead of RefreshPartitions after partition
setup. sfdisk already updates the kernel partition table, while the
opened LUKS/LVM mapping keeps the root partition busy and causes a
subsequent BLKRRPART request to return EBUSY.

Also increment the partition-reread retry counter instead of resetting
it to 1, restoring the retry limit and preventing indefinite backoff.
Keep the metadata synchronization checks without rereading an in-use
partition table.

Signed-off-by: Muhammad Falak R Wani falakreyaz@gmail.com

Use WaitForDiskDevice instead of RefreshPartitions after partition
setup. sfdisk already updates the kernel partition table, while the
opened LUKS/LVM mapping keeps the root partition busy and causes a
subsequent BLKRRPART request to return EBUSY.

Also increment the partition-reread retry counter instead of resetting
it to 1, restoring the retry limit and preventing indefinite backoff.
Keep the metadata synchronization checks without rereading an in-use
partition table.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The functional changes are sound; only a minor comment typo remains.

Pull request overview

Prevents encrypted ISO installer hangs during partition setup.

Changes:

  • Waits for disk metadata without triggering BLKRRPART.
  • Restores the partition-reread retry limit.
File summaries
File Description
toolkit/tools/imagegen/diskutils/diskutils.go Updates partition synchronization and retry behavior.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

// Wait for the disk's metadata to populate.
err = RefreshPartitions(diskDevPath)
// sfdisk already updated the partition table. LUKS/LVM may now hold
// partions open, so wait for metadata without issuing BLKRRPART
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0-dev PRs Destined for AzureLinux 3.0 Tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants