Creating instance on network with no subnet: no error message

Bug #1237711 reported by Agrin Hilmkil
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Unassigned
OpenStack Dashboard (Horizon)
Fix Released
Medium
Itxaka Serrano

Bug Description

When trying to launch an instance on a network without any subnet the creation fails. No error message is provided even though it is clear the issue is due to the lack of a subnet. No entry visible in the log for that instance.

nova scheduler log:
--------------------------
l2013-10-09 15:14:35.249 INFO nova.scheduler.filter_scheduler [req-df928b03-ae40-4d34-ae6c-00160f59dc3c admin admin] Attempting to build 1 instance(s) uuids: [u'0d2a3866-23b0-4f85-9689-f4b37877e950']
2013-10-09 15:14:35.279 INFO nova.scheduler.filter_scheduler [req-df928b03-ae40-4d34-ae6c-00160f59dc3c admin admin] Choosing host WeighedHost [host: kraken-vc1-ubuntu1, weight: 252733.0] for instance 0d2a3866-23b0-4f85-9689-f4b37877e950
2013-10-09 15:14:38.028 INFO nova.scheduler.filter_scheduler [req-df928b03-ae40-4d34-ae6c-00160f59dc3c admin admin] Attempting to build 1 instance(s) uuids: [u'0d2a3866-23b0-4f85-9689-f4b37877e950']
2013-10-09 15:14:38.030 ERROR nova.scheduler.filter_scheduler [req-df928b03-ae40-4d34-ae6c-00160f59dc3c admin admin] [instance: 0d2a3866-23b0-4f85-9689-f4b37877e950] Error from last host: kraken-vc1-ubuntu1 (node domain-c21(kraken-vc1)): [u'Traceback (most recent call last):\n', u' File "/opt/stack/nova/nova/compute/manager.py", line 1039, in _build_instance\n set_access_ip=set_access_ip)\n', u' File "/opt/stack/nova/nova/compute/manager.py", line 1412, in _spawn\n LOG.exception(_(\'Instance failed to spawn\'), instance=instance)\n', u' File "/opt/stack/nova/nova/compute/manager.py", line 1409, in _spawn\n block_device_info)\n', u' File "/opt/stack/nova/nova/virt/vmwareapi/driver.py", line 623, in spawn\n admin_password, network_info, block_device_info)\n', u' File "/opt/stack/nova/nova/virt/vmwareapi/vmops.py", line 243, in spawn\n vif_infos = _get_vif_infos()\n', u' File "/opt/stack/nova/nova/virt/vmwareapi/vmops.py", line 227, in _get_vif_infos\n for vif in network_info:\n', u' File "/opt/stack/nova/nova/network/model.py", line 375, in __iter__\n return self._sync_wrapper(fn, *args, **kwargs)\n', u' File "/opt/stack/nova/nova/network/model.py", line 366, in _sync_wrapper\n self.wait()\n', u' File "/opt/stack/nova/nova/network/model.py", line 398, in wait\n self[:] = self._gt.wait()\n', u' File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 168, in wait\n return self._exit_event.wait()\n', u' File "/usr/local/lib/python2.7/dist-packages/eventlet/event.py", line 120, in wait\n current.throw(*self._exc)\n', u' File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 194, in main\n result = function(*args, **kwargs)\n', u' File "/opt/stack/nova/nova/compute/manager.py", line 1230, in _allocate_network_async\n dhcp_options=dhcp_options)\n', u' File "/opt/stack/nova/nova/network/api.py", line 49, in wrapper\n res = f(self, context, *args, **kwargs)\n', u' File "/opt/stack/nova/nova/network/neutronv2/api.py", line 315, in allocate_for_instance\n raise exception.SecurityGroupCannotBeApplied()\n', u'SecurityGroupCannotBeApplied: Network requires port_security_enabled and subnet associated in order to apply security groups.\n']
2013-10-09 15:14:38.055 WARNING nova.scheduler.driver [req-df928b03-ae40-4d34-ae6c-00160f59dc3c admin admin] [instance: 0d2a3866-23b0-4f85-9689-f4b37877e950] Setting instance to ERROR state

Tags: network
Revision history for this message
Agrin Hilmkil (ahilmkil) wrote :
Changed in horizon:
importance: Undecided → Medium
milestone: none → icehouse-1
status: New → Confirmed
Changed in horizon:
assignee: nobody → George Peristerakis (george-peristerakis)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in horizon:
status: In Progress → Fix Committed
Revision history for this message
Julie Pichon (jpichon) wrote :

The status should only be changed to "Fix Committed" after the patch is merged, this should happen automatically.

Changed in horizon:
status: Fix Committed → In Progress
Thierry Carrez (ttx)
Changed in horizon:
milestone: icehouse-1 → icehouse-2
Revision history for this message
Akihiro Motoki (amotoki) wrote :

In theory Neutron allows a network without subnet, so it seems be a bug of Neutron. The proposed patch prevents users from launching an instance without an IP address. It is not a case of Cloud data center, but there is a case. IMO Horizon should not block such feature.

Before merging the proposed patch, we need to investigate if the current OpenStack (nova + neutron) does not support a network without subnet. I know it does not work one or one-half years ago.

In addition, Nova should provide more intuitive error message and Dashboard should display it.

Revision history for this message
Matt Riedemann (mriedem) wrote :

Seems like Aaron Rosen's nova patch here would have some impact on how this works, at least for the exception case with no subnets:

https://review.openstack.org/#/c/59578/

tags: added: network
Changed in nova:
importance: Undecided → Low
Changed in nova:
status: New → Triaged
David Lyle (david-lyle)
Changed in horizon:
milestone: icehouse-2 → icehouse-3
Thierry Carrez (ttx)
Changed in horizon:
milestone: icehouse-3 → icehouse-rc1
no longer affects: neutron
David Lyle (david-lyle)
Changed in horizon:
milestone: icehouse-rc1 → ongoing
milestone: ongoing → next
Revision history for this message
Aaron Rosen (arosen) wrote :

This issue was already address here: https://review.openstack.org/#/c/79801/

Changed in nova:
status: Triaged → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by George Peristerakis (<email address hidden>) on branch: master
Review: https://review.openstack.org/95926

Revision history for this message
Henrique Truta (henriquetruta) wrote :

Did this patch (https://review.openstack.org/#/c/79801/) solve the bug?

Revision history for this message
George Peristerakis (george-peristerakis) wrote :

I will have to test it on Horizon's side.

Revision history for this message
George Peristerakis (george-peristerakis) wrote :

@henrique-4 The nova patch worked. Now the exception handling need to fixed

Revision history for this message
Itxaka Serrano (itxaka) wrote :

This seems to be fixed as Horizon wont show any networks that dont have a subnet in the launch instance modal:
https://github.com/openstack/horizon/commit/1b6807baf385d6e5768f149fa8e4d07bc24ebff1

Still, needs to be fixed on the new angular panel.

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

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

Changed in horizon:
assignee: George Peristerakis (george-peristerakis) → Itxaka Serrano (itxakaserrano)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/257296
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=feb0ad027fbe105a9f291507dad0f84fff0ae13d
Submitter: Jenkins
Branch: master

commit feb0ad027fbe105a9f291507dad0f84fff0ae13d
Author: Itxaka <email address hidden>
Date: Mon Dec 14 12:55:57 2015 +0100

    Exclude networks with no subnets angular

    Nova doesnt allow to boot from a network which has
    no subnet, so we should not show those networks on the
    new instance launch angular panel.
    On the python launch instance this was solved in patch
    https://github.com/openstack/horizon/commit/1b6807baf385d6e5768f149fa8e4d07bc24ebff1

    Change-Id: I8b94d45e95f8e22b579d04f6cec7345d947f8e12
    Closes-Bug: #1237711

Changed in horizon:
status: In Progress → Fix Released
Changed in horizon:
milestone: next → newton-2
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/horizon 10.0.0.0b2

This issue was fixed in the openstack/horizon 10.0.0.0b2 development milestone.

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.