Virtuozzo conainers lack SCSI info in libvirt XML

Bug #1712801 reported by Evgeny Antyshev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Low
Unassigned

Bug Description

Scenario is attach Ploop volume located on Vzstorage to Virtuozzo container, operated via a libvirt driver. Problem is that containers don't have anything like 'bus', and 'scsi' bus type is just a convenience value.

nova.conf:
[libvirt]
vzstorage_mount_group = root
images_type = ploop
connection_uri = parallels+unix:///system
live_migration_uri = vz+tcp://%s/system
cpu_mode = none
virt_type = parallels

Attach attempt:
Aug 18 10:35:24.604287 host-10-94-179-76 nova-compute[68438]: ERROR nova.virt.block_device [None req-dc714064-d843-4bbd-86bd-30bda4c5aba9 tempest-AttachVolumeShelveTestJSON-773580589 tempest-AttachVolumeShelveTestJSON-773580589] [instance: 7f4a9527-8ff0-4966-aad5-fe4bc55c9ef9] Driver failed to attach volume 2a595cc0-164a-4680-ba4d-5e8a352ccb72 at /dev/sdb: ValueError: max() arg is an empty sequence
Aug 18 10:35:24.604448 host-10-94-179-76 nova-compute[68438]: ERROR nova.virt.block_device [instance: 7f4a9527-8ff0-4966-aad5-fe4bc55c9ef9] Traceback (most recent call last):
Aug 18 10:35:24.604623 host-10-94-179-76 nova-compute[68438]: ERROR nova.virt.block_device [instance: 7f4a9527-8ff0-4966-aad5-fe4bc55c9ef9] File "/opt/stack/new/nova/nova/virt/block_device.py", line 389, in attach
Aug 18 10:35:24.604811 host-10-94-179-76 nova-compute[68438]: ERROR nova.virt.block_device [instance: 7f4a9527-8ff0-4966-aad5-fe4bc55c9ef9] device_type=self['device_type'], encryption=encryption)
Aug 18 10:35:24.604966 host-10-94-179-76 nova-compute[68438]: ERROR nova.virt.block_device [instance: 7f4a9527-8ff0-4966-aad5-fe4bc55c9ef9] File "/opt/stack/new/nova/nova/virt/libvirt/driver.py", line 1235, in attach_volume
Aug 18 10:35:24.605119 host-10-94-179-76 nova-compute[68438]: ERROR nova.virt.block_device [instance: 7f4a9527-8ff0-4966-aad5-fe4bc55c9ef9] disk_info['unit'] = self._get_scsi_controller_max_unit(guest) + 1
Aug 18 10:35:24.605269 host-10-94-179-76 nova-compute[68438]: ERROR nova.virt.block_device [instance: 7f4a9527-8ff0-4966-aad5-fe4bc55c9ef9] File "/opt/stack/new/nova/nova/virt/libvirt/driver.py", line 1060, in _get_scsi_controller_max_unit
Aug 18 10:35:24.605417 host-10-94-179-76 nova-compute[68438]: ERROR nova.virt.block_device [instance: 7f4a9527-8ff0-4966-aad5-fe4bc55c9ef9] return max(ret)
Aug 18 10:35:24.605586 host-10-94-179-76 nova-compute[68438]: ERROR nova.virt.block_device [instance: 7f4a9527-8ff0-4966-aad5-fe4bc55c9ef9] ValueError: max() arg is an empty sequence
Aug 18 10:35:24.605737 host-10-94-179-76 nova-compute[68438]: ERROR nova.virt.block_device [instance: 7f4a9527-8ff0-4966-aad5-fe4bc55c9ef9]

libvirt instance XML:
<domain type='vz' id='0'>
  <name>instance-00000007</name>
  <uuid>0e2917b7-37a7-443d-87b6-439d6ec1906d</uuid>
  <memory unit='KiB'>524288</memory>
  <currentMemory unit='KiB'>524288</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='x86_64'>exe</type>
    <init>/sbin/init</init>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <filesystem type='file' accessmode='passthrough'>
      <driver type='ploop' format='ploop'/>
      <source file='/opt/stack/data/nova/instances/0e2917b7-37a7-443d-87b6-439d6ec1906d/disk'/>
      <target dir='/'/>
    </filesystem>
    <interface type='network'>
      <mac address='00:00:00:00:00:00'/>
      <source network='host-routed'/>
      <target dev='venet0'/>
      <link state='up'/>
    </interface>
    <interface type='bridge' trustGuestRxFilters='no'>
      <mac address='fa:16:3e:44:08:ca'/>
      <source bridge='qbr25d67bec-74'/>
      <target dev='tap25d67bec-74'/>
      <link state='up'/>
    </interface>
    <input type='mouse' bus='parallels'/>
    <input type='keyboard' bus='parallels'/>
    <graphics type='vnc' port='5700' autoport='yes' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='parallels' heads='1'/>
    </video>
  </devices>
</domain>

Revision history for this message
Matt Riedemann (mriedem) wrote :

Which release of Nova are you using?

tags: added: libvirt virtuozzo
Revision history for this message
Maxim Nestratov (mnestratov) wrote :

I think it's upsream master

Changed in nova:
assignee: nobody → Maxim Nestratov (mnestratov)
Revision history for this message
Matt Riedemann (mriedem) wrote :

This was opened in response to this patch for the fix:

https://review.openstack.org/#/c/495756/

Changed in nova:
status: New → In Progress
assignee: Maxim Nestratov (mnestratov) → Evgeny Antyshev (eantyshev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Stephen Finucane (<email address hidden>) on branch: master
Review: https://review.opendev.org/495756

Changed in nova:
status: In Progress → New
assignee: Evgeny Antyshev (eantyshev) → nobody
Revision history for this message
Matt Riedemann (mriedem) wrote :

The fix for this https://review.opendev.org/495756 was abandoned so while I've confirmed the bug since the reporter pushed a fix for it I'm not sure anyone cares about fixing it anymore.

Changed in nova:
status: New → Confirmed
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.