Bug #1686496 “Tempest-RHOSP10:Updating default security group na...” : Bugs : Juniper Openstack

Tempest-RHOSP10:Updating default security group name, expected Conflict error but got Mismatch error

Bug #1686496 reported by shajuvk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.2
Fix Committed
Low
Sahil Sabharwal
R3.2.3.x
Fix Committed
Low
Sahil Sabharwal
R4.0
Fix Committed
Low
Sahil Sabharwal
Trunk
Fix Committed
Low
Sahil Sabharwal

Bug Description

tempest test case expecting Conflict error but received mismatch error from contrail neutron plugin.

30 @test.idempotent_id('55100aa8-b24f-333c-0bef-64eefd85f15c')
 31 def test_update_default_security_group_name(self):
 32 sg_list = self.client.list_security_groups(name='default')
 33 sg = sg_list['security_groups'][0]
 34 import pdb; pdb.set_trace()
 35 -> self.assertRaises(lib_exc.Conflict, self.client.update_security_group,
 36 sg['id'], name='test')
 37

(Pdb) print sg
{u'description': u'Default security group', u'contrail:fq_name': [u'default-domain', u'tempest-NegativeSecGroupTest-634125556', u'default'], u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'security_group_rules': [{u'remote_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'direction': u'ingress', u'remote_ip_prefix': None, u'protocol': u'any', u'ethertype': u'IPv4', u'port_range_max': 65535, u'security_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'port_range_min': 0, u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'id': u'42033bef-730c-43c3-88ff-8d7cb679258e'}, {u'remote_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'direction': u'ingress', u'remote_ip_prefix': None, u'protocol': u'any', u'ethertype': u'IPv6', u'port_range_max': 65535, u'security_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'port_range_min': 0, u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'id': u'2ea6bac0-af2f-4e7e-b7e6-2c24447bc83e'}, {u'remote_group_id': None, u'direction': u'egress', u'remote_ip_prefix': u'0.0.0.0/0', u'protocol': u'any', u'ethertype': u'IPv4', u'port_range_max': 65535, u'security_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'port_range_min': 0, u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'id': u'140ed5d3-d810-4ede-9a8a-ad1cb518db69'}, {u'remote_group_id': None, u'direction': u'egress', u'remote_ip_prefix': u'::/0', u'protocol': u'any', u'ethertype': u'IPv6', u'port_range_max': 65535, u'security_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'port_range_min': 0, u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'id': u'59d92d8a-95f3-45c9-bb8f-80a7db421302'}], u'id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'name': u'default'}

(Pdb) self.assertRaises(lib_exc.Conflict, self.client.update_security_group,sg['id'], name='test')

*** MismatchError: <function _update at 0x4b930c8> returned {u'security_group': {u'description': u'Default security group', u'contrail:fq_name': [u'default-domain', u'tempest-NegativeSecGroupTest-634125556', u'default'], u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'security_group_rules': [{u'remote_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'direction': u'ingress', u'remote_ip_prefix': None, u'protocol': u'any', u'ethertype': u'IPv4', u'port_range_max': 65535, u'security_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'port_range_min': 0, u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'id': u'42033bef-730c-43c3-88ff-8d7cb679258e'}, {u'remote_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'direction': u'ingress', u'remote_ip_prefix': None, u'protocol': u'any', u'ethertype': u'IPv6', u'port_range_max': 65535, u'security_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'port_range_min': 0, u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'id': u'2ea6bac0-af2f-4e7e-b7e6-2c24447bc83e'}, {u'remote_group_id': None, u'direction': u'egress', u'remote_ip_prefix': u'0.0.0.0/0', u'protocol': u'any', u'ethertype': u'IPv4', u'port_range_max': 65535, u'security_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'port_range_min': 0, u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'id': u'140ed5d3-d810-4ede-9a8a-ad1cb518db69'}, {u'remote_group_id': None, u'direction': u'egress', u'remote_ip_prefix': u'::/0', u'protocol': u'any', u'ethertype': u'IPv6', u'port_range_max': 65535, u'security_group_id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'port_range_min': 0, u'tenant_id': u'1fde395126584fafa6398d31105f1d3a', u'id': u'59d92d8a-95f3-45c9-bb8f-80a7db421302'}], u'id': u'0edc4958-000c-44c4-bb8e-1125a7ec25ad', u'name': u'test'}}
(Pdb)

shajuvk (shajuvk)
information type: Proprietary → Public
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/31209
Submitter: <email address hidden> (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/31254
Submitter: <email address hidden> (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/31255
Submitter: <email address hidden> (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/31209
Committed: http://github.com/Juniper/contrail-controller/commit/94a485dde4f05ada93040ebf912d8691ae9250be
Submitter: Zuul (<email address hidden>)
Branch: master

commit 94a485dde4f05ada93040ebf912d8691ae9250be
Author: Sahil <email address hidden>
Date: Mon May 8 18:13:17 2017 -0700

Fix to raise exception for default SG update

Updating default SG should not be allowed and should raise
a 'SecurityGroupCannotUpdateDefault' neutron exception.

We are only checking for this in neutron_plugin_db.py and
will still allow the update to default SG from vnc_api.

Closes-Bug: 1686496

Change-Id: I7eab47b0047dd2e35ec270572d75d38eac3d90bc

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

Reviewed: https://review.opencontrail.org/31254
Committed: http://github.com/Juniper/contrail-controller/commit/64022b4eba8457b29282ae96495d2348cfb1b305
Submitter: Zuul (<email address hidden>)
Branch: R3.2

commit 64022b4eba8457b29282ae96495d2348cfb1b305
Author: Sahil <email address hidden>
Date: Mon May 8 18:13:17 2017 -0700

Fix to raise exception for default SG update

Updating default SG should not be allowed and should raise
a 'SecurityGroupCannotUpdateDefault' neutron exception.

We are only checking for this in neutron_plugin_db.py and
will still allow the update to default SG from vnc_api.

Closes-Bug: 1686496

Change-Id: I7eab47b0047dd2e35ec270572d75d38eac3d90bc

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

Reviewed: https://review.opencontrail.org/31255
Committed: http://github.com/Juniper/contrail-controller/commit/faafa7b249c15394076efcf4272ee1c0c5edf1b4
Submitter: Zuul (<email address hidden>)
Branch: R4.0

commit faafa7b249c15394076efcf4272ee1c0c5edf1b4
Author: Sahil <email address hidden>
Date: Mon May 8 18:13:17 2017 -0700

Fix to raise exception for default SG update

Updating default SG should not be allowed and should raise
a 'SecurityGroupCannotUpdateDefault' neutron exception.

We are only checking for this in neutron_plugin_db.py and
will still allow the update to default SG from vnc_api.

Closes-Bug: 1686496

Change-Id: I7eab47b0047dd2e35ec270572d75d38eac3d90bc

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

Review in progress for https://review.opencontrail.org/32575
Submitter: Vinay Vithal Mahuli (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/32575
Committed: http://github.com/Juniper/contrail-controller/commit/32b7c298e5a255817092b4c69c522f47d6efe44a
Submitter: Zuul (<email address hidden>)
Branch: R3.2.3.x

commit 32b7c298e5a255817092b4c69c522f47d6efe44a
Author: Sahil <email address hidden>
Date: Mon May 8 18:13:17 2017 -0700

Fix to raise exception for default SG update

Updating default SG should not be allowed and should raise
a 'SecurityGroupCannotUpdateDefault' neutron exception.

We are only checking for this in neutron_plugin_db.py and
will still allow the update to default SG from vnc_api.

Closes-Bug: 1686496

Change-Id: I7eab47b0047dd2e35ec270572d75d38eac3d90bc

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Loading subscribers...

Remote bug watches

Bug watches keep track of this bug in other bug trackers.