NSXv: Spoof guard publish policy failed while deleting port

Bug #1486722 reported by Gary Kotton on 2015-08-19
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vmware-nsx
High
Gary Kotton

Bug Description

2015-08-19 08:42:39.415 24914 DEBUG vmware_nsx.neutron.plugins.vmware.vshield.vcns [req-d7c8e7ee-3e36-4f4e-a74e-34389540e5fa ] VcnsApiHelper('POST', '/api/4.0/services/spoofguard/spoofguardpolicy-55?action=approve', '{"spoofguardList": {"spoofguard": {"publishedIpAddress": [{"ipAddress": "1.1.4.6"}], "publishedMacAddress": "fa:16:3e:12:df:a5", "approvedIpAddress": [{"ipAddress": "1.1.4.6"}], "vnicUuid": caa10b58-0cc6-4f9f-b038-a4373fd69581.000", "approvedMacAddress": "fa:16:3e:12:df:a5", "id": "caa10b58-0cc6-4f9f-b038-a4373fd69581.000"}}}') do_request /usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py:93
2015-08-19 08:42:39.597 24914 DEBUG vmware_nsx.neutron.plugins.vmware.vshield.vcns [req-d7c8e7ee-3e36-4f4e-a74e-34389540e5fa ] VcnsApiHelper('POST', '/api/4.0/services/spoofguard/spoofguardpolicy-55?action=publish&vnicId=caa10b58-0cc6-4f9f-b038-a4373fd69581.000', 'null') do_request /usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py:93
2015-08-19 08:43:08.074 24907 DEBUG vmware_nsx.neutron.plugins.vmware.vshield.vcns [req-501446f2-fccb-4814-a298-bb80cc4c3ff2 ] VcnsApiHelper('POST', '/api/4.0/services/spoofguard/spoofguardpolicy-55?action=approve', '{"spoofguardList": {"spoofguard": {"publishedIpAddress": [], "publishedMacAddress": "", "approvedIpAddress": [], "vnicUuid": "caa10b58-0cc6-4f9f-b038-a4373fd69581.000", "approvedMacAddress": "", "id": "caa10b58-0cc6-4f9f-b038-a4373fd69581.000"}}}') do_request /usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py:93
2015-08-19 08:43:10.235 24907 DEBUG vmware_nsx.neutron.plugins.vmware.vshield.vcns [req-501446f2-fccb-4814-a298-bb80cc4c3ff2 ] VcnsApiHelper('POST', '/api/4.0/services/spoofguard/spoofguardpolicy-55?action=publish&vnicId=caa10b58-0cc6-4f9f-b038-a4373fd69581.000', 'null') do_request /usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py:93
2015-08-19 08:43:18.465 24907 DEBUG vmware_nsx.neutron.plugins.vmware.vshield.vcns [req-501446f2-fccb-4814-a298-bb80cc4c3ff2 ] VcnsApiHelper('POST', '/api/4.0/services/spoofguard/spoofguardpolicy-55?action=publish&vnicId=caa10b58-0cc6-4f9f-b038-a4373fd69581.000', 'null') do_request /usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py:93
2015-08-19 08:43:21.041 24907 DEBUG vmware_nsx.neutron.plugins.vmware.vshield.vcns [req-501446f2-fccb-4814-a298-bb80cc4c3ff2 ] VcnsApiHelper('POST', '/api/4.0/services/spoofguard/spoofguardpolicy-55?action=publish&vnicId=caa10b58-0cc6-4f9f-b038-a4373fd69581.000', 'null') do_request /usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py:93
2015-08-19 08:43:23.477 24907 DEBUG vmware_nsx.neutron.plugins.vmware.vshield.vcns [req-501446f2-fccb-4814-a298-bb80cc4c3ff2 ] VcnsApiHelper('POST', '/api/4.0/services/spoofguard/spoofguardpolicy-55?action=publish&vnicId=caa10b58-0cc6-4f9f-b038-a4373fd69581.000', 'null') do_request /usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py:93
2015-08-19 08:43:30.712 24907 DEBUG vmware_nsx.neutron.plugins.vmware.vshield.vcns [req-501446f2-fccb-4814-a298-bb80cc4c3ff2 ] VcnsApiHelper('POST', '/api/4.0/services/spoofguard/spoofguardpolicy-55?action=publish&vnicId=caa10b58-0cc6-4f9f-b038-a4373fd69581.000', 'null') do_request /usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py:93
2015-08-19 08:43:37.016 24907 DEBUG vmware_nsx.neutron.plugins.vmware.vshield.vcns [req-501446f2-fccb-4814-a298-bb80cc4c3ff2 ] VcnsApiHelper('POST', '/api/4.0/services/spoofguard/spoofguardpolicy-55?action=publish&vnicId=caa10b58-0cc6-4f9f-b038-a4373fd69581.000', 'null') do_request /usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py:93
2015-08-19 08:43:39.592 24907 DEBUG vmware_nsx.neutron.plugins.vmware.vshield.vcns [req-501446f2-fccb-4814-a298-bb80cc4c3ff2 ] VcnsApiHelper('POST', '/api/4.0/services/spoofguard/spoofguardpolicy-55?action=publish&vnicId=caa10b58-0cc6-4f9f-b038-a4373fd69581.000', 'null') do_request /usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py:93
2015-08-19 08:43:43.125 24907 DEBUG vmware_nsx.neutron.plugins.vmware.vshield.vcns [req-501446f2-fccb-4814-a298-bb80cc4c3ff2 ] VcnsApiHelper('POST', '/api/4.0/services/spoofguard/spoofguardpolicy-55?action=publish&vnicId=caa10b58-0cc6-4f9f-b038-a4373fd69581.000', 'null') do_request /usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py:93
2015-08-19 08:43:45.734 24907 DEBUG vmware_nsx.neutron.plugins.vmware.vshield.vcns [req-501446f2-fccb-4814-a298-bb80cc4c3ff2 ] VcnsApiHelper('POST', '/api/4.0/services/spoofguard/spoofguardpolicy-55?action=publish&vnicId=caa10b58-0cc6-4f9f-b038-a4373fd69581.000', 'null') do_request /usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py:93
2015-08-19 08:43:47.979 24907 DEBUG vmware_nsx.neutron.plugins.vmware.vshield.vcns [req-501446f2-fccb-4814-a298-bb80cc4c3ff2 ] VcnsApiHelper('POST', '/api/4.0/services/spoofguard/spoofguardpolicy-55?action=publish&vnicId=caa10b58-0cc6-4f9f-b038-a4373fd69581.000', 'null') do_request /usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py:93
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource RequestBad: Request https://172.17.2.142/api/4.0/services/spoofguard/spoofguardpolicy-55?action=publish&vnicId=caa10b58-0cc6-4f9f-b038-a4373fd69581.000 is Bad, response {"details":"Invalid Parameter.","errorCode":401,"moduleName":"core-services"}
2015-08-19 09:13:50.253 24907 DEBUG vmware_nsx.neutron.plugins.vmware.vshield.vcns [req-d57d0d1d-c931-46c4-9b01-c19a86501be5 ] VcnsApiHelper('POST', '/api/4.0/services/spoofguard/spoofguardpolicy-55?action=approve', '{"spoofguardList": {"spoofguard": {"publishedIpAddress": [], "publishedMacAddress": "", "approvedIpAddress": [], "vnicUuid": "caa10b58-0cc6-4f9f-b038-a4373fd69581.000", "approvedMacAddress": "", "id": "caa10b58-0cc6-4f9f-b038-a4373fd69581.000"}}}') do_request /usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py:93

.

2015-08-19 08:43:48.085 24907 ERROR neutron.api.v2.resource [req-501446f2-fccb-4814-a298-bb80cc4c3ff2 ] delete failed
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource Traceback (most recent call last):
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/api/v2/resource.py", line 83, in resource
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource result = method(request=request, **args)
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 490, in delete
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource obj_deleter(request.context, id, **kwargs)
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v.py", line 1030, in delete_port
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource context.session, neutron_db_port['network_id'], vnic_id)
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v.py", line 2038, in _remove_vnic_from_spoofguard_policy
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource self.nsx_v.vcns.inactivate_vnic_assigned_addresses(policy_id, vnic_id)
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py", line 653, in inactivate_vnic_assigned_addresses
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource return self.publish_assigned_addresses(policy_id, vnic_id)
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/retrying.py", line 68, in wrapped_f
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource return Retrying(*dargs, **dkw).call(f, *args, **kw)
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/retrying.py", line 229, in call
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource raise attempt.get()
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/retrying.py", line 261, in get
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource six.reraise(self.value[0], self.value[1], self.value[2])
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/retrying.py", line 217, in call
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py", line 644, in publish_assigned_addresses
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource return self.do_request(HTTP_POST, publish_vnic_uri, decode=False)
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py", line 101, in do_request
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource headers, encodeParams)
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/retrying.py", line 68, in wrapped_f
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource return Retrying(*dargs, **dkw).call(f, *args, **kw)
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/retrying.py", line 223, in call
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource return attempt.get(self._wrap_exception)
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/retrying.py", line 261, in get
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource six.reraise(self.value[0], self.value[1], self.value[2])
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/retrying.py", line 217, in call
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py", line 87, in _client_request
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource return client(method, uri, params, headers, encodeParams)
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/common/VcnsApiClient.py", line 112, in request
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource raise cls(uri=uri, status=status, header=header, response=response)
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource RequestBad: Request https://172.17.2.142/api/4.0/services/spoofguard/spoofguardpolicy-55?action=publish&vnicId=caa10b58-0cc6-4f9f-b038-a4373fd69
581.000 is Bad, response {"details":"Invalid Parameter.","errorCode":401,"moduleName":"core-services"}
2015-08-19 08:43:48.085 24907 TRACE neutron.api.v2.resource

Gary Kotton (garyk) wrote :
Changed in vmware-nsx:
assignee: nobody → Gary Kotton (garyk)
importance: Undecided → High

Reviewed: https://review.openstack.org/214768
Committed: https://git.openstack.org/cgit/openstack/vmware-nsx/commit/?id=636f809f301fb17709ce10bbc198df9828d1ca51
Submitter: Jenkins
Branch: master

commit 636f809f301fb17709ce10bbc198df9828d1ca51
Author: Gary Kotton <email address hidden>
Date: Wed Aug 19 12:21:36 2015 -0700

    NSXv: do not fail on spoofgaurd policy error

    The VM is deleted from VC and then this call is made. In this case,
    VC must be sending the VM & vnic delete update first to NSX manager
    and the plugin is sending the delete call later to NSX manager.
    This error can be ignored for now, unless we make sure VM is deleted
    only after neutron plugin deletes the port.

    Change-Id: I2e69466e76b3b7339c6854e5c04f1309ede19f56
    Closes-bug: #1486722

Changed in vmware-nsx:
status: New → Fix Committed

Reviewed: https://review.openstack.org/215703
Committed: https://git.openstack.org/cgit/openstack/vmware-nsx/commit/?id=1c846b4304f3fce21755f6a415774013d6619784
Submitter: Jenkins
Branch: stable/kilo

commit 1c846b4304f3fce21755f6a415774013d6619784
Author: Gary Kotton <email address hidden>
Date: Wed Aug 19 12:21:36 2015 -0700

    NSXv: do not fail on spoofgaurd policy error

    The VM is deleted from VC and then this call is made. In this case,
    VC must be sending the VM & vnic delete update first to NSX manager
    and the plugin is sending the delete call later to NSX manager.
    This error can be ignored for now, unless we make sure VM is deleted
    only after neutron plugin deletes the port.

    Change-Id: I2e69466e76b3b7339c6854e5c04f1309ede19f56
    Closes-bug: #1486722
    (cherry picked from commit 636f809f301fb17709ce10bbc198df9828d1ca51)

tags: added: in-stable-kilo
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers