yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #95959
[Bug 2112373] [NEW] Flavor Extra Specs for SCSI Controller Model Not Honored for Volume Boot
Public bug reported:
When booting instances from volume, Nova ignores the flavor's hw:scsi_model extra spec and falls back to a default (e.g., lsilogic). This results in a mismatch between the expected and actual SCSI controller model used in the libvirt domain definition.
Problem Description
Nova allows defining SCSI controller behavior through hw:scsi_model and
hw:disk_bus in flavor extra_specs, which are respected when an instance
boots from an image. However, for volume-backed instances, the flavor’s
extra_specs are ignored, and Nova silently defaults to a hardcoded value
(typically lsilogic).
This inconsistency makes it difficult for operators to enforce a standard controller model (e.g., virtio-scsi) across all workloads, regardless of boot method.
Use Case
Operator defines a flavor with hw:scsi_model=virtio-scsi and hw:disk_bus=scsi.
Instance is booted from a volume (no image).
Nova generates libvirt domain XML with SCSI controller model set to lsilogic instead of virtio-scsi.
The mismatch causes degraded guest performance or failure to boot (e.g., UEFI Windows guests with incorrect controller).
Proposed Change
Ensure that Nova uses hw:scsi_model from the flavor's extra_specs when:
The instance is booted from volume,
No image metadata is available,
No controller is explicitly defined.
This fallback logic should be added in _get_guest_storage_config() to set the controller model from the flavor's extra_specs if the image metadata does not define one.
Proposed Code Change
/usr/lib/python3/dist-packages/nova/virt/libvirt/driver.py
## org line
- scsi_controller = self._get_scsi_controller(image_meta)
## added code starts here
+ scsi_controller = self._get_scsi_controller(
+ image_meta or objects.ImageMeta.from_dict({'properties': {}}))+
+
+ if not scsi_controller and flavor:
+ extra_specs = flavor.get('extra_specs', {}) if isinstance(flavor, dict) else flavor.extra_specs
+ scsi_model = extra_specs.get('hw:scsi_model', 'lsilogic')
+ scsi_controller = vconfig.LibvirtConfigGuestController()
+ scsi_controller.type = 'scsi'
+ scsi_controller.model = scsi_model
## added code stops here
** Affects: nova
Importance: Undecided
Status: New
** Tags: boot-from-volume flavor libvirt scsi
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/2112373
Title:
Flavor Extra Specs for SCSI Controller Model Not Honored for Volume
Boot
Status in OpenStack Compute (nova):
New
Bug description:
When booting instances from volume, Nova ignores the flavor's hw:scsi_model extra spec and falls back to a default (e.g., lsilogic). This results in a mismatch between the expected and actual SCSI controller model used in the libvirt domain definition.
Problem Description
Nova allows defining SCSI controller behavior through hw:scsi_model
and hw:disk_bus in flavor extra_specs, which are respected when an
instance boots from an image. However, for volume-backed instances,
the flavor’s extra_specs are ignored, and Nova silently defaults to a
hardcoded value (typically lsilogic).
This inconsistency makes it difficult for operators to enforce a standard controller model (e.g., virtio-scsi) across all workloads, regardless of boot method.
Use Case
Operator defines a flavor with hw:scsi_model=virtio-scsi and hw:disk_bus=scsi.
Instance is booted from a volume (no image).
Nova generates libvirt domain XML with SCSI controller model set to lsilogic instead of virtio-scsi.
The mismatch causes degraded guest performance or failure to boot (e.g., UEFI Windows guests with incorrect controller).
Proposed Change
Ensure that Nova uses hw:scsi_model from the flavor's extra_specs when:
The instance is booted from volume,
No image metadata is available,
No controller is explicitly defined.
This fallback logic should be added in _get_guest_storage_config() to set the controller model from the flavor's extra_specs if the image metadata does not define one.
Proposed Code Change
/usr/lib/python3/dist-packages/nova/virt/libvirt/driver.py
## org line
- scsi_controller = self._get_scsi_controller(image_meta)
## added code starts here
+ scsi_controller = self._get_scsi_controller(
+ image_meta or objects.ImageMeta.from_dict({'properties': {}}))+
+
+ if not scsi_controller and flavor:
+ extra_specs = flavor.get('extra_specs', {}) if isinstance(flavor, dict) else flavor.extra_specs
+ scsi_model = extra_specs.get('hw:scsi_model', 'lsilogic')
+ scsi_controller = vconfig.LibvirtConfigGuestController()
+ scsi_controller.type = 'scsi'
+ scsi_controller.model = scsi_model
## added code stops here
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/2112373/+subscriptions