Add security group to running instance with nexus monolithic plugin throws error

Bug #1365226 reported by Rabi Mishra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Rabi Mishra
Icehouse
Fix Released
Undecided
Unassigned

Bug Description

While adding new security group to an existing instance with cisco nexus plugin(provider network) throws the following error.

# nova add-secgroup 987efb45-1a6c-4a76-a26b-fe9cfdd8073e test-security
ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-8e0b85a2-7499-4420-8a68-3c68aa3ee1c9)

Looking at the server.log points to an empty host list being passed.
/var/log/neutron/server.log

2014-09-02 20:10:22.116 52259 INFO neutron.wsgi [req-091df3c8-7bdb-42b5-801a-a26a650a451a None] (52259) accepted ('172.21.9.134', 39434)

2014-09-02 20:10:22.211 52259 ERROR neutron.plugins.cisco.models.virt_phy_sw_v2 [-] Unable to update port '' on Nexus switch
2014-09-02 20:10:22.211 52259 TRACE neutron.plugins.cisco.models.virt_phy_sw_v2 Traceback (most recent call last):
2014-09-02 20:10:22.211 52259 TRACE neutron.plugins.cisco.models.virt_phy_sw_v2 File "/usr/lib/python2.7/site-packages/neutron/plugins/cisco/models/virt_phy_sw_v2.py", line 405, in u
pdate_port
2014-09-02 20:10:22.211 52259 TRACE neutron.plugins.cisco.models.virt_phy_sw_v2 self._invoke_nexus_for_net_create(context, *create_args)
2014-09-02 20:10:22.211 52259 TRACE neutron.plugins.cisco.models.virt_phy_sw_v2 File "/usr/lib/python2.7/site-packages/neutron/plugins/cisco/models/virt_phy_sw_v2.py", line 263, in _
invoke_nexus_for_net_create
2014-09-02 20:10:22.211 52259 TRACE neutron.plugins.cisco.models.virt_phy_sw_v2 [network, attachment])
2014-09-02 20:10:22.211 52259 TRACE neutron.plugins.cisco.models.virt_phy_sw_v2 File "/usr/lib/python2.7/site-packages/neutron/plugins/cisco/models/virt_phy_sw_v2.py", line 148, in _
invoke_plugin_per_device
2014-09-02 20:10:22.211 52259 TRACE neutron.plugins.cisco.models.virt_phy_sw_v2 return func(*args, **kwargs)
2014-09-02 20:10:22.211 52259 TRACE neutron.plugins.cisco.models.virt_phy_sw_v2 File "/usr/lib/python2.7/site-packages/neutron/plugins/cisco/nexus/cisco_nexus_plugin_v2.py", line 79,
 in create_network
2014-09-02 20:10:22.211 52259 TRACE neutron.plugins.cisco.models.virt_phy_sw_v2 raise cisco_exc.NexusComputeHostNotConfigured(host=host)
2014-09-02 20:10:22.211 52259 TRACE neutron.plugins.cisco.models.virt_phy_sw_v2 NexusComputeHostNotConfigured: Connection to None is not configured.
2014-09-02 20:10:22.211 52259 TRACE neutron.plugins.cisco.models.virt_phy_sw_v2
2014-09-02 20:10:22.256 52259 INFO neutron.api.v2.resource [req-8ebea742-09b5-416b-820f-69461c496319 None] update failed (client error): Connection to None is not configured.
2014-09-02 20:10:22.257 52259 INFO neutron.wsgi [req-8ebea742-09b5-416b-820f-69461c496319 None] 172.21.9.134 - - [02/Sep/2014 20:10:22] "PUT //v2.0/ports/c2e6b716-5c7d-4d23-ab78-ecd2a649469b.json HTTP/1.1" 404 322 0.140213

Rabi Mishra (rabi)
summary: - update security group with nexus monolithic plugin throws error
+ Add security group to running instance with nexus monolithic plugin
+ throws error
description: updated
Rabi Mishra (rabi)
Changed in neutron:
assignee: nobody → Rabi Mishra (rabi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: New → In Progress
Revision history for this message
Rabi Mishra (rabi) wrote :

There is no validation of new_host_id for NULL, therefore while adding security group it assumes to be host migration and fails.

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

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/122312

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

Change abandoned by Rabi Mishra (<email address hidden>) on branch: master
Review: https://review.openstack.org/119559
Reason: Tree removed from Juno. uploaded change for stable/icehouse

Kyle Mestery (mestery)
Changed in neutron:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/icehouse)

Reviewed: https://review.openstack.org/122312
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=7d4eb3106343ef0a8229788ebf8aaf9bc76a2fc1
Submitter: Jenkins
Branch: stable/icehouse

commit 7d4eb3106343ef0a8229788ebf8aaf9bc76a2fc1
Author: Rabi Mishra <email address hidden>
Date: Sat Sep 6 19:53:33 2014 +0530

    Fix error adding security groups to instances with nexus

    Adding security group to running instance should not
    invoke the nexus plugin. Current implementation does not
    validate for the 'new_host_id' and assumes it as host migration
    and fails. As the nexus monolithic plugin has been removed
    after icehouse, this would be merged to stable/icehouse.

    Closes-Bug: #1365226

    Change-Id: I9ab6b8438e6ee0698a8e2ae7ff7736f7c71b2370

tags: added: in-stable-icehouse
Rabi Mishra (rabi)
Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-1 → 2015.1.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.