Skip to content

live disk-attach fails if device is sdaa or higher #7318

@atemp

Description

@atemp

Description
If a KVM VM has so many scsi devices that sdz is already in use, the next name would be sdaa. This works when creating the VM from scratch, but it fails if one uses live disk-attach (from sunstone or from cmdline).

To Reproduce
Add scsi disks until sdz is in use, make sure VM runs and live add another one. Log will show that it would get wrong bus addr (same as sda). Looking at the code one clearly sees that it only queries one char after sd and simply ignores all others.

Expected behavior
It should properly calculate values > 25 (e.g. sdz -> 25; sdaa -> 26)

Details

  • Affected Component: vmm_mad/remotes/kvm
  • Hypervisor: KVM
  • Version: ONE 7.0.0

Additional context
I will add a PR soon.

Also note: The original code did not handle any error/warning cases, like e.g. emit a message if a device is specified which has extra chars or leads to a bus address which is too high. So i did not add any as well.

Progress Status

  • Code committed
  • Testing - QA
  • Documentation (Release notes - resolved issues, compatibility, known issues)

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions