← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1598370] Re: Got AttributeError when launching instance in Aarch64

 

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

commit a221eb4cc6ea6bd3459495be9d2a443e9808fb1a
Author: Kevin Zhao <kevin.zhao@xxxxxxxxxx>
Date:   Sat Jul 2 09:13:58 2016 +0000

    libvirt: Modify the interface address object assignment
    
    In some other arch such as AArch64, the interface of the device
    has the address "virtio-mmio", not "PCI" or "Drive", so assign the
    default object "LibvirtConfigGuestDeviceAddress" to the interface.
    Also fix problem for S390x, s390x has address "ccw".
    
    Closes-Bug: #1598370
    
    Change-Id: I10004c2060ff8f5a60e065b237311fe5b9fd1876
    Signed-off-by: Kevin Zhao <kevin.zhao@xxxxxxxxxx>


** Changed in: nova
       Status: In Progress => Fix Released

-- 
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/1598370

Title:
  Got AttributeError  when launching instance in Aarch64

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  Description
  ===========
  Using nova to create an instance in AArch64,and finally got AttributeError "'NoneType' object has no attribute 'parse_dom'" after "_get_guest_xml".
  ==================
  1.Using devstack to deploy openstack. Using default local.conf.

  2.Upload the aarch64 image with glance.
  $ source ~/devstack/openrc admin admin
  $ glance image-create --name image-arm64.img --disk-format qcow2 --container-format bare --visibility public --file images/image-arm64-wily.qcow2 --progress
  $ glance image-create --name image-arm64.vmlinuz --disk-format aki --container-format aki --visibility public --file images/image-arm64-wily.vmlinuz --progress
  $ glance image-create --name image-arm64.initrd --disk-format ari --container-format ari --visibility public --file images/image-arm64-wily.initrd --progress
  $ IMAGE_UUID=$(glance image-list | grep image-arm64.img | awk '{ print $2 }')
  $ IMAGE_KERNEL_UUID=$(glance image-list | grep image-arm64.vmlinuz | awk '{ print $2 }')
  $ IMAGE_INITRD_UUID=$(glance image-list | grep image-arm64.initrd | awk '{ print $2 }')
  $ glance image-update --kernel-id ${IMAGE_KERNEL_UUID} --ramdisk-id ${IMAGE_INITRD_UUID} ${IMAGE_UUID}
  3.Set the scsi model:
  $ glance image-update --property hw_disk_bus --property hw_scsi_model=virtio-scsi ${IMAGE_UUID}

  4.nova add keypair
  $ nova keypair-add default --pub-key ~/.ssh/id_rsa.pub

  5.Launch the instance:
  $ image=$(nova image-list | egrep "image-arm64.img"'[^-]' | awk '{ print $2 }')
  $ nova boot --flavor m1.small--image ${image} --key-name default test-arm64

  6.See the n-cpu log, we can get the error information.

  Expected result
  ===============
  Spawning guest successfully.

  Actual result
  =============
  Got the error log information as below:
  2016-07-02 06:57:08.645 ERROR nova.compute.manager [req-c8805971-7d8a-4775-ae95-7ac62b284487 admin admin] [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd] Instance failed to spawn
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd] Traceback (most recent call last):
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd]   File "/opt/stack/nova/nova/compute/manager.py", line 2063, in _build_resources
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd]     yield resources
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd]   File "/opt/stack/nova/nova/compute/manager.py", line 1907, in _build_and_run_instance
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd]     block_device_info=block_device_info)
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 2665, in spawn
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd]     post_xml_callback=gen_confdrive)
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 4860, in _create_domain_and_network
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd]     post_xml_callback=post_xml_callback)
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 4784, in _create_domain
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd]     post_xml_callback()
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 3137, in _create_configdrive
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd]     instance)
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 7547, in _build_device_metadata
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd]     guest_config.parse_dom(xml_dom)
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd]   File "/opt/stack/nova/nova/virt/libvirt/config.py", line 2193, in parse_dom
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd]     obj.parse_dom(d)
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd]   File "/opt/stack/nova/nova/virt/libvirt/config.py", line 1402, in parse_dom
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd]     obj.parse_dom(c)
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd] AttributeError: 'NoneType' object has no attribute 'parse_dom'
  2016-07-02 06:57:08.645 TRACE nova.compute.manager [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd] 
  2016-07-02 06:57:08.647 INFO nova.compute.manager [req-c8805971-7d8a-4775-ae95-7ac62b284487 admin admin] [instance: c8ea40f1-2877-45d7-af4c-2cc6e8b966bd] Terminating instance

  
  Environment
  ===========
  1. Exact version of OpenStack you are running. See the following
    list for all releases: http://docs.openstack.org/releases/
     Nova development, commit code: 23153952a979c93a414705744b0f8ba4bde18f75

  2. Which hypervisor did you use?
      Libvirt+KVM
      $ kvm --version
      QEMU emulator version 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.1), Copyright (c) 2003-2008 Fabrice Bellard
      $ libvirtd --version
      libvirtd (libvirt) 1.3.1

  2. Which storage type did you use?
     In the host file system,all in one physics machine.
  stack@u202154:/opt/stack/nova$ df -hl
  Filesystem      Size  Used Avail Use% Mounted on
  udev            7.8G     0  7.8G   0% /dev
  tmpfs           1.6G   21M  1.6G   2% /run
  /dev/sda2       917G   12G  859G   2% /
  tmpfs           7.9G     0  7.9G   0% /dev/shm
  tmpfs           5.0M     0  5.0M   0% /run/lock
  tmpfs           7.9G     0  7.9G   0% /sys/fs/cgroup
  /dev/sda1       511M  888K  511M   1% /boot/efi
  cgmfs           100K     0  100K   0% /run/cgmanager/fs
  tmpfs           1.6G     0  1.6G   0% /run/user/1002

  
  3. Which networking type did you use?
     nova-network

  4. Environment information:
     Architecture : AARCH64
     OS: Ubuntu 16.04

  Detailed log info is in the accessory.
  The guest xml is also in the log info.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1598370/+subscriptions


References