← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1598370] [NEW] Got AttributeError when launching instance in Aarch64

 

Public bug reported:

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.

** Affects: nova
     Importance: Undecided
     Assignee: Kevin Zhao (kevin-zhao)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => Kevin Zhao (kevin-zhao)

-- 
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):
  New

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


Follow ups