TestVolumeBootPattern.test_volume_boot_pattern fail with libvirt-xen

Bug #1443898 reported by Anthony PERARD
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Thomas Bechtold
tempest
Invalid
Undecided
Unassigned

Bug Description

The following test is failling when runned with libvirt-xen nova compute node.
tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_volume_boot_pattern

This is due to the function _boot_instance_from_volume which create a volume with the device name "vda", but this is not supported by Xen.

Also Nova itself does not reject the device name.

This is with devstack master.

Tags: libvirt xen
Revision history for this message
Anthony PERARD (anthony-perard) wrote :

I try to replace 'device_name': 'vda' in the test by 'device_name': 'xvda', but this leads to an Exception in nova/compute/api.py InvalidBDMBootSequence. This is because boot_index is set to -1 with xvda, instead of 0.
nova is only looking for a device_name equal to 'vda' to be a root device (or root_device_name).

I've search for a way to change root_device_name and it's look like this could be in the volume image metadata 'root_device_name', but I don't know if it's possible to change within the tempest test.

Revision history for this message
Anthony PERARD (anthony-perard) wrote :

A patch that would fix this bug: https://review.openstack.org/180161/
       nova: libvirt-xen: Replace vda by xvda in BDM v1

Revision history for this message
Ghanshyam Mann (ghanshyammann) wrote :

Changing it to nova as it is going to be fixed there first. if So then we can open it for Tempest and fix it by making it config option etc.

-https://review.openstack.org/180161/

Revision history for this message
Ghanshyam Mann (ghanshyammann) wrote :

marking invalid for Tempest as of now as Nova does not support xvda. Once we have that fixed in nova feel free to reopen it for Tempest.

Changed in tempest:
status: New → Invalid
Changed in nova:
assignee: nobody → Anthony PERARD (anthony-perard)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/180161
Reason: This patch seems to have been stalled for a fair while, so I am going to abandon it to keep the review queue clean. Please restore the change when it is ready for review.

Sean Dague (sdague)
Changed in nova:
assignee: Anthony PERARD (anthony-perard) → nobody
status: In Progress → Incomplete
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Compute (nova) because there has been no activity for 60 days.]

Changed in nova:
status: Incomplete → Expired
Changed in nova:
status: Expired → Confirmed
Revision history for this message
Thomas Bechtold (toabctl) wrote :
Download full text (32.8 KiB)

This is still valid in Newton (SLE12SP2 + libvirt+Xen). The compute log, while running

ostestr -r '^tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_volume_boot_pattern'

says

2016-11-24 14:03:05.361 20735 DEBUG nova.virt.libvirt.vif [req-2c616be2-2a1e-4c8a-9e13-c987769c08b9 bc99b0f18e9f4bbc8771459747dfbf82 77892b47b3644886b8abccca3b1348bd - - -] vif_type=ovs instance=Instance(access_ip_v4=None,access_ip_v6=None,architecture=None,auto_disk_config=False,availability_zone=None,cell_name=None,cleaned=False,config_drive='',created_at=2016-11-24T14:02:58Z,default_ephemeral_device=None,default_swap_device=None,deleted=False,deleted_at=None,device_metadata=None,disable_terminate=False,display_description='tempest.common.compute-instance-113612408',display_name='tempest.common.compute-instance-113612408',ec2_ids=EC2Ids,ephemeral_gb=0,ephemeral_key_uuid=None,fault=<?>,flavor=Flavor(2),host='d52-54-77-77-77-02',hostname='tempest.common.compute-instance-113612408',id=45,image_ref='',info_cache=InstanceInfoCache,instance_type_id=2,kernel_id='6589b1d5-1128-4354-8b4d-02492c28f51d',key_data='ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfW9wEI5aC9a78TPAVdlLB/n5ynpR+IZ36DOIWFaZxCScNFl9axRNKk65C+kvim4BG9XDlp5gcxsnaTI0dy+j+V9A1woAKAgfHNHokB99JcHnX+rQ1TJc03z/owj1UXenGb0TsAWRvCr2ed/ICDZcrCnfrcAu7EnUjnE43Oy40L8n1/BCANRdf7VOuLrjJs9kZLtf8F1YntR0J2Z/JO2eOeEoaPoHGdTIxMncOC2vxlv+WYRXOCix01RJ2MRk67PDzwSp0H3gHQb6GmA97e9R4iWKvzuNaWc4atl4tJJ2WPnLIAh2wcFKjC1BhHehBZuhZKTDHyn0hkpsW8YPV+AzN Generated-by-Nova',key_name='tempest-TestVolumeBootPattern-860379563',keypairs=KeyPairList,launch_index=0,launched_at=None,launched_on='d52-54-77-77-77-02',locked=False,locked_by=None,memory_mb=128,metadata={},migration_context=<?>,new_flavor=None,node='d52-54-77-77-77-02.vc3.cloud.suse.de',numa_topology=None,old_flavor=None,os_type=None,pci_devices=PciDeviceList,pci_requests=InstancePCIRequests,power_state=0,progress=0,project_id='77892b47b3644886b8abccca3b1348bd',ramdisk_id='16db3de2-6668-4b65-a03d-bc81848172ce',reservation_id='r-zmyfugva',root_device_name='/dev/vda',root_gb=0,security_groups=SecurityGroupList,services=<?>,shutdown_terminate=False,system_metadata={image_base_image_ref='',image_kernel_id='6589b1d5-1128-4354-8b4d-02492c28f51d',image_min_disk='0',image_min_ram='0',image_ramdisk_id='16db3de2-6668-4b65-a03d-bc81848172ce',network_allocated='True'},tags=<?>,task_state='spawning',terminated_at=None,updated_at=2016-11-24T14:02:59Z,user_data=None,user_id='bc99b0f18e9f4bbc8771459747dfbf82',uuid=08b12f22-3020-4524-b5ec-c4cd357f2def,vcpu_model=None,vcpus=1,vm_mode=None,vm_state='building') vif={"profile": {}, "ovs_interfaceid": "97f1e71f-36f3-4fef-bd86-a813be63039e", "preserve_on_delete": false, "network": {"bridge": "br-int", "subnets": [{"ips": [{"meta": {}, "version": 4, "type": "fixed", "floating_ips": [], "address": "10.100.0.5"}], "version": 4, "meta": {"dhcp_server": "10.100.0.2"}, "dns": [], "routes": [], "cidr": "10.100.0.0/28", "gateway": {"meta": {}, "version": 4, "type": "gateway", "address": "10.100.0.1"}}], "meta": {"injected": false, "tenant_id": "77892b47b3644886b8abccca3b1348bd", "mtu": 8858}, "id": "db161be2-6b35-4876-9e8e-cbde69116fae", "label": "te...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/402318

Changed in nova:
assignee: nobody → Thomas Bechtold (toabctl)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/402318
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=12485c74faf317dfe2c05ee0b4877412002893d6
Submitter: Jenkins
Branch: master

commit 12485c74faf317dfe2c05ee0b4877412002893d6
Author: Thomas Bechtold <email address hidden>
Date: Thu Nov 24 17:04:37 2016 +0100

    Fix root_device_name for Xen

    When running the Tempest scenario test_volume_boot_pattern.\
         TestVolumeBootPattern.test_volume_boot_pattern with a
    libvirt+Xen environment, the tests fails because the
    root_device_name is set to 'vda' which is invalid for Xen.
    When getting the BDM for the root block device, check that
    the root_device_name is compatible with the used disk bus and
    if it is not, adjust the root_device_name.

    Change-Id: I4c231b5ef646a067be1566653b6ee89ccbee60f3
    Closes-Bug: #1443898

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 15.0.0.0rc1

This issue was fixed in the openstack/nova 15.0.0.0rc1 release candidate.

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.