lb-member-delete with junk id , deletes the actual member

Bug #1540733 reported by Vinoth Kannan Ganapathy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0
Fix Committed
Medium
Yuvaraja Mariappan
R3.1
Fix Committed
Medium
Yuvaraja Mariappan
Trunk
Fix Committed
Medium
Yuvaraja Mariappan

Bug Description

with one lb-member, if you do lb-member-delete with some junk id, still it deletes the actual lb-member..

root@a5s10:~# source /etc/contrail/openstackrc
root@a5s10:~# export OS_USERNAME=falcon
root@a5s10:~# export OS_TENANT_NAME=spacex
root@a5s10:~# export OS_PASSWORD=c0ntrail123
root@a5s10:~# neutron lb-member-create --tenant-id 1abc95cb660342e1ada20fecb6b1ec5b --address 192.168.1.7 --protocol-port 80 mypool
Created a new member:
+----------------+--------------------------------------+
| Field | Value |
+----------------+--------------------------------------+
| address | 192.168.1.7 |
| admin_state_up | True |
| id | 46989032-76ea-4d55-9355-d578263d7227 |
| pool_id | c1652c8b-a155-4e69-8fd7-dc792a62cb6e |
| protocol_port | 80 |
| status | ACTIVE |
| tenant_id | 1abc95cb660342e1ada20fecb6b1ec5b |
| weight | 1 |
+----------------+--------------------------------------+
root@a5s10:~# neutron lb-member-list
+--------------------------------------+-------------+---------------+--------+----------------+--------+
| id | address | protocol_port | weight | admin_state_up | status |
+--------------------------------------+-------------+---------------+--------+----------------+--------+
| 46989032-76ea-4d55-9355-d578263d7227 | 192.168.1.7 | 80 | 1 | True | ACTIVE |
+--------------------------------------+-------------+---------------+--------+----------------+--------+
root@a5s10:~# neutron --debug lb-member-delete sending_some_junk_id
DEBUG: keystoneclient.session REQ: curl -g -i -X GET http://10.84.14.10:5000/v2.0/ -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
DEBUG: urllib3.util.retry Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=0)
DEBUG: keystoneclient.session RESP: [200] content-length: 337 vary: X-Auth-Token x-distribution: Ubuntu date: Tue, 02 Feb 2016 02:50:36 GMT content-type: application/json x-openstack-request-id: req-6d299080-2654-4a98-a2a5-a43555b4af6d
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "http://10.84.14.10:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}

DEBUG: neutronclient.neutron.v2_0.lb.member.DeleteMember run(Namespace(id=u'sending_some_junk_id', request_format='json'))
DEBUG: keystoneclient.auth.identity.v2 Making authentication request to http://10.84.14.10:5000/v2.0/tokens
DEBUG: urllib3.util.retry Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=0)
DEBUG: keystoneclient.session REQ: curl -g -i -X GET http://10.84.14.9:9696/v2.0/lb/members.json?fields=id&name=sending_some_junk_id -H "User-Agent: python-neutronclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}dc7f67899b112fd4e4287c90b9921ab0cea4a800"
DEBUG: urllib3.util.retry Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=0)
DEBUG: keystoneclient.session RESP: [200] date: Tue, 02 Feb 2016 02:50:36 GMT content-length: 61 content-type: application/json; charset=UTF-8 x-openstack-request-id: req-11dc1f58-358f-4675-86c5-2a9bbed5296a
RESP BODY: {"members": [{"id": "46989032-76ea-4d55-9355-d578263d7227"}]}

DEBUG: keystoneclient.session REQ: curl -g -i -X DELETE http://10.84.14.9:9696/v2.0/lb/members/46989032-76ea-4d55-9355-d578263d7227.json -H "User-Agent: python-neutronclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}dc7f67899b112fd4e4287c90b9921ab0cea4a800"
DEBUG: urllib3.util.retry Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=0)
DEBUG: keystoneclient.session RESP: [204] date: Tue, 02 Feb 2016 02:50:36 GMT content-length: 0 x-openstack-request-id: req-09d0a0b3-4952-46cb-909c-4e9bdef74ced
Deleted member: sending_some_junk_id
root@a5s10:~# neutron lb-member-list

root@a5s10:~#

Tags: lbaas
Changed in juniperopenstack:
importance: Undecided → High
Changed in juniperopenstack:
assignee: nobody → Rudra Rugge (rudrarugge)
information type: Proprietary → Public
tags: added: lbaas
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Bug update]

bug update...

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.1

Review in progress for https://review.opencontrail.org/22788
Submitter: Yuvaraja Mariappan

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/22789
Submitter: Yuvaraja Mariappan

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/22790
Submitter: Yuvaraja Mariappan

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/22788
Committed: http://github.org/Juniper/contrail-neutron-plugin/commit/cea1d29ebf6cf098499c18af333deab63013c3b0
Submitter: Zuul
Branch: R3.1

commit cea1d29ebf6cf098499c18af333deab63013c3b0
Author: Yuvaraja Mariappan <email address hidden>
Date: Tue Aug 2 23:20:31 2016 -0700

lb-member-delete with wrong id issue is fixed

since 'name' key is missed in the dictionary,
filter is failing which causes loadbalancer member delete
works for any name

Change-Id: I240aa7e833d163e75c7b72702b1c58e274cc3dea
Closes-bug: 1540733

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/22789
Committed: http://github.org/Juniper/contrail-neutron-plugin/commit/74e13641b4678b40e5026543e915d2842503c592
Submitter: Zuul
Branch: master

commit 74e13641b4678b40e5026543e915d2842503c592
Author: Yuvaraja Mariappan <email address hidden>
Date: Tue Aug 2 23:20:31 2016 -0700

lb-member-delete with wrong id issue is fixed

since 'name' key is missed in the dictionary,
filter is failing which causes loadbalancer member delete
works for any name

Change-Id: I240aa7e833d163e75c7b72702b1c58e274cc3dea
Closes-bug: 1540733

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/22790
Committed: http://github.org/Juniper/contrail-neutron-plugin/commit/1fd76cf9f0f382cd4b2007301c7166eb6d22b643
Submitter: Zuul
Branch: R3.0

commit 1fd76cf9f0f382cd4b2007301c7166eb6d22b643
Author: Yuvaraja Mariappan <email address hidden>
Date: Tue Aug 2 23:20:31 2016 -0700

lb-member-delete with wrong id issue is fixed

since 'name' key is missed in the dictionary,
filter is failing which causes loadbalancer member delete
works for any name

Change-Id: I240aa7e833d163e75c7b72702b1c58e274cc3dea
Closes-bug: 1540733

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.