boot fails on network /w only an ipv6 subnet, AttributeError: 'NoneType' object has no attribute 'get'

Bug #1476402 reported by Adam Gandelman
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Unassigned
akanda
Invalid
Undecided
Unassigned

Bug Description

On rug startup, the devstack-created router appliance fails to spawn with the following traceback in nova:

ams': None})]| from (pid=17775) _allocate_network_async /opt/stack/nova/nova/compute/manager.py:1527
2015-07-20 14:07:26.462 ERROR nova.compute.manager [req-057f87b7-b0b5-45e7-b6f8-5c6cbb7a2be0 neutron service] [instance: 2e5ff228-9d7b-436a-8053-6fcd11b02eb7] Instance failed to spawn
2015-07-20 14:07:26.462 TRACE nova.compute.manager [instance: 2e5ff228-9d7b-436a-8053-6fcd11b02eb7] Traceback (most recent call last):
2015-07-20 14:07:26.462 TRACE nova.compute.manager [instance: 2e5ff228-9d7b-436a-8053-6fcd11b02eb7] File "/opt/stack/nova/nova/compute/manager.py", line 2110, in _build_resources
2015-07-20 14:07:26.462 TRACE nova.compute.manager [instance: 2e5ff228-9d7b-436a-8053-6fcd11b02eb7] yield resources
2015-07-20 14:07:26.462 TRACE nova.compute.manager [instance: 2e5ff228-9d7b-436a-8053-6fcd11b02eb7] File "/opt/stack/nova/nova/compute/manager.py", line 1982, in _build_and_run_instance
2015-07-20 14:07:26.462 TRACE nova.compute.manager [instance: 2e5ff228-9d7b-436a-8053-6fcd11b02eb7] block_device_info=block_device_info)
2015-07-20 14:07:26.462 TRACE nova.compute.manager [instance: 2e5ff228-9d7b-436a-8053-6fcd11b02eb7] File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 2409, in spawn
2015-07-20 14:07:26.462 TRACE nova.compute.manager [instance: 2e5ff228-9d7b-436a-8053-6fcd11b02eb7] admin_pass=admin_password)
2015-07-20 14:07:26.462 TRACE nova.compute.manager [instance: 2e5ff228-9d7b-436a-8053-6fcd11b02eb7] File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 2882, in _create_image
2015-07-20 14:07:26.462 TRACE nova.compute.manager [instance: 2e5ff228-9d7b-436a-8053-6fcd11b02eb7] content=files, extra_md=extra_md, network_info=network_info)
2015-07-20 14:07:26.462 TRACE nova.compute.manager [instance: 2e5ff228-9d7b-436a-8053-6fcd11b02eb7] File "/opt/stack/nova/nova/api/metadata/base.py", line 156, in __init__
2015-07-20 14:07:26.462 TRACE nova.compute.manager [instance: 2e5ff228-9d7b-436a-8053-6fcd11b02eb7] self.network_metadata = netutils.get_network_metadata(network_info)
2015-07-20 14:07:26.462 TRACE nova.compute.manager [instance: 2e5ff228-9d7b-436a-8053-6fcd11b02eb7] File "/opt/stack/nova/nova/virt/netutils.py", line 229, in get_network_metadata
2015-07-20 14:07:26.462 TRACE nova.compute.manager [instance: 2e5ff228-9d7b-436a-8053-6fcd11b02eb7] if subnet_v4.get('ips'):
2015-07-20 14:07:26.462 TRACE nova.compute.manager [instance: 2e5ff228-9d7b-436a-8053-6fcd11b02eb7] AttributeError: 'NoneType' object has no attribute 'get'
2015-07-20 14:07:26.462 TRACE nova.compute.manager [instance: 2e5ff228-9d7b-436a-8053-6fcd11b02eb7]
2015-07-20 14:07:26.464 INFO nova.compute.manager [req-057f87b7-b0b5-45e7-b6f8-5c6cbb7a2be0 neutron service] [instance: 2e5ff228-9d7b-436a-8053-6fcd11b02eb7] Terminating instance

A little digging shows that this recently merged into nova and is likely the cause of the breakage: https://review.openstack.org/#/c/102649/

Revision history for this message
Adam Gandelman (gandelman-a) wrote :

This is a nova bug introduced /w https://review.openstack.org/#/c/102649/ that prevents instances from booting unless their network has an ipv4 subnet. Instances on a network that only have a single ipv6 subnet will fail on this AttributeError

summary: - appliance fails to spawn, AttributeError: 'NoneType' object has no
- attribute 'get'
+ boot fails on network /w only an ipv6 subnet, AttributeError: 'NoneType'
+ object has no attribute 'get'
Changed in akanda:
status: New → Invalid
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/203846

Changed in nova:
status: New → In Progress
Changed in nova:
assignee: nobody → Drew Thorstensen (thorst)
assignee: Drew Thorstensen (thorst) → nobody
Changed in nova:
importance: Undecided → Low
tags: added: network
tags: added: low-hanging-fruit
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 6cce41eaa3e73cad9d04255521634f1af08267b6
Author: Adam Gandelman <email address hidden>
Date: Mon Jul 20 15:44:23 2015 -0700

    Only work with ipv4 subnet metadata if one exists

    This code currently throws an exception and fails the build if an
    instance boots on a network without a v4 subnet. Protect against
    this by checking it has a ipv4 subnet.

    Change-Id: I7c5de308b557293f5ac6b919d5566ace809ce200
    Closes-bug: #1476402

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → liberty-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: liberty-2 → 12.0.0
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.