Spawn instance failed when use_ipv6=true in nova.conf and network does not contain IPv6

Bug #1175725 reported by David Peraza
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
David Peraza

Bug Description

Here is the stack trace:

2013-05-02 10:58:26.246 ERROR nova.virt.hyperv.vmops [req-99f87ed2-98fe-4b75-a5b4-87c3d95b49de 6e15c99a64f34d9eb420e8dc751317e8 0384a4eb1bc54bf9b70f49c145015ad7] 'ip6s'
2013-05-02 10:58:26.246 3768 TRACE nova.virt.hyperv.vmops Traceback (most recent call last):
2013-05-02 10:58:26.246 3768 TRACE nova.virt.hyperv.vmops File "C:\Program Files (x86)\Python27\lib\site-packages\nova\virt\hyperv\vmops.py", line 179, in spawn
2013-05-02 10:58:26.246 3768 TRACE nova.virt.hyperv.vmops admin_password)
2013-05-02 10:58:26.246 3768 TRACE nova.virt.hyperv.vmops File "C:\Program Files (x86)\Python27\lib\site-packages\nova\virt\hyperv\vmops.py", line 231, in _create_config_drive
2013-05-02 10:58:26.246 3768 TRACE nova.virt.hyperv.vmops extra_md=extra_md)
2013-05-02 10:58:26.246 3768 TRACE nova.virt.hyperv.vmops File "C:\Program Files (x86)\Python27\lib\site-packages\nova\api\metadata\base.py", line 146, in __init__
2013-05-02 10:58:26.246 3768 TRACE nova.virt.hyperv.vmops cfg = netutils.get_injected_network_template(network_info)
2013-05-02 10:58:26.246 3768 TRACE nova.virt.hyperv.vmops File "C:\Program Files (x86)\Python27\lib\site-packages\nova\virt\netutils.py", line 94, in get_injected_network_template
2013-05-02 10:58:26.246 3768 TRACE nova.virt.hyperv.vmops address_v6 = mapping['ip6s'][0]['ip']
2013-05-02 10:58:26.246 3768 TRACE nova.virt.hyperv.vmops KeyError: 'ip6s'
2013-05-02 10:58:26.246 3768 TRACE nova.virt.hyperv.vmops
2013-05-02 10:58:39.397 ERROR nova.compute.manager [req-99f87ed2-98fe-4b75-a5b4-87c3d95b49de 6e15c99a64f34d9eb420e8dc751317e8 0384a4eb1bc54bf9b70f49c145015ad7] [instance: 7b0ac2da-2d0e-484b-b5a3-09a150b71a81] Instance failed to spawn
2013-05-02 10:58:39.397 3768 TRACE nova.compute.manager [instance: 7b0ac2da-2d0e-484b-b5a3-09a150b71a81] Traceback (most recent call last):
2013-05-02 10:58:39.397 3768 TRACE nova.compute.manager [instance: 7b0ac2da-2d0e-484b-b5a3-09a150b71a81] File "C:\Program Files (x86)\Python27\lib\site-packages\nova\compute\manager.py", line 1109, in _spawn
2013-05-02 10:58:39.397 3768 TRACE nova.compute.manager [instance: 7b0ac2da-2d0e-484b-b5a3-09a150b71a81] block_device_info)
2013-05-02 10:58:39.397 3768 TRACE nova.compute.manager [instance: 7b0ac2da-2d0e-484b-b5a3-09a150b71a81] File "C:\Program Files (x86)\Python27\lib\site-packages\nova\virt\hyperv\driver.py", line 57, in spawn
2013-05-02 10:58:39.397 3768 TRACE nova.compute.manager [instance: 7b0ac2da-2d0e-484b-b5a3-09a150b71a81] admin_password, network_info, block_device_info)
2013-05-02 10:58:39.397 3768 TRACE nova.compute.manager [instance: 7b0ac2da-2d0e-484b-b5a3-09a150b71a81] File "C:\Program Files (x86)\Python27\lib\site-packages\nova\virt\hyperv\vmops.py", line 187, in spawn
2013-05-02 10:58:39.397 3768 TRACE nova.compute.manager [instance: 7b0ac2da-2d0e-484b-b5a3-09a150b71a81] raise vmutils.HyperVException(_('Spawn instance failed'))
2013-05-02 10:58:39.397 3768 TRACE nova.compute.manager [instance: 7b0ac2da-2d0e-484b-b5a3-09a150b71a81] HyperVException: Spawn instance failed
2013-05-02 10:58:39.397 3768 TRACE nova.compute.manager [instance: 7b0ac2da-2d0e-484b-b5a3-09a150b71a81]
2013-05-02 10:58:46.740 ERROR nova.compute.manager [req-99f87ed2-98fe-4b75-a5b4-87c3d95b49de 6e15c99a64f34d9eb420e8dc751317e8 0384a4eb1bc54bf9b70f49c145015ad7] [instance: 7b0ac2da-2d0e-484b-b5a3-09a150b71a81] Error: ['Traceback (most recent call last):\n', ' File "C:\\Program Files (x86)\\Python27\\lib\\site-packages\\nova\\compute\\manager.py", line 846, in _run_instance\n set_access_ip=set_access_ip)\n', ' File "C:\\Program Files (x86)\\Python27\\lib\\site-packages\\nova\\compute\\manager.py", line 1113, in _spawn\n LOG.exception(_(\'Instance failed to spawn\'), instance=instance)\n', ' File "C:\\Program Files (x86)\\Python27\\lib\\contextlib.py", line 24, in __exit__\n self.gen.next()\n', ' File "C:\\Program Files (x86)\\Python27\\lib\\site-packages\\nova\\compute\\manager.py", line 1109, in _spawn\n block_device_info)\n', ' File "C:\\Program Files (x86)\\Python27\\lib\\site-packages\\nova\\virt\\hyperv\\driver.py", line 57, in spawn\n admin_password, network_info, block_device_info)\n', ' File "C:\\Program Files (x86)\\Python27\\lib\\site-packages\\nova\\virt\\hyperv\\vmops.py", line 187, in spawn\n raise vmutils.HyperVException(_(\'Spawn instance failed\'))\n', 'HyperVException: Spawn instance failed\n']

Revision history for this message
David Peraza (dperaza) wrote :

Usecase:

Cloud configured with IPV6 support in mind, so the use_ipv6 flag is set on all nova.conf. Quantum admin configures with only IPV4 first. All spawns will fail on this code.

Do we need to be more proactive here checking that network info does contain ipv6 to set?

Revision history for this message
David Peraza (dperaza) wrote :

Added to wrong project switching to nova

affects: keystone → nova
Revision history for this message
David Peraza (dperaza) wrote :

propose this change: https://review.openstack.org/#/c/28073

Not sure why it does not show here, probably because I created in keystone first by mistake and then switched here

Changed in nova:
assignee: nobody → David Peraza (dperaza)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/28073
Committed: http://github.com/openstack/nova/commit/005b9950ac84bf3ae06c24ee018f192064060428
Submitter: Jenkins
Branch: master

commit 005b9950ac84bf3ae06c24ee018f192064060428
Author: David Peraza <email address hidden>
Date: Thu May 2 18:59:30 2013 +0000

    Being more defensive around the use_ipv6 config option

    fixes bug 1175725

    Will allow for the flag to be set to filter out ipv6 if
    configured but will not add ipv6 to template if ipv6 is not
    configured in quantum. This will allow spwan to continue
    working in the case where ipv6 is not configured but flag
    use_ipv6 is set in nova.

    Change-Id: I26ebdff81efcdeff827521cec247d2c443a5e0ad

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
David Peraza (dperaza) wrote :

grizzly-backport-potential

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

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/28302

Neela Shah (neela)
tags: added: grizzly-backport-potential
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-1 → 2013.2
Alan Pevec (apevec)
tags: removed: grizzly-backport-potential
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.