[Tempest] Creating a port with empty SG list does not result in empty SG list

Bug #1476503 reported by Vedamurthy Joshi
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Fix Committed
Medium
Unassigned
R2.21.x
Fix Committed
Medium
Unassigned
R2.22.x
Fix Committed
Medium
Unassigned
Trunk
Fix Committed
Medium
Unassigned

Bug Description

R2.20 Build 64

http://anamika.englab.juniper.net:8080/job/VeduTempest/14/testReport/tempest.api.network.test_ports/PortsTestJSON/test_create_port_with_no_securitygroups_id_4179dcb9_1382_4ced_84fe_1b91c54f5735_smoke_/

In this test, a port is created with empty SG list. It is seen that in contrail, we bind the port to SG "default-domain:default-project:__no_rule__"

This is causing the test to fail : tempest.api.network.test_ports.PortsTestJSON.test_create_port_with_no_securitygroups

pythonlogging:'': {{{
2015-07-20 16:09:45,750 6082 INFO [tempest_lib.common.rest_client] Request (PortsTestJSON:test_create_port_with_no_securitygroups): 201 POST http://10.204.217.143:9696/v2.0/networks 0.086s
2015-07-20 16:09:45,751 6082 DEBUG [tempest_lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: {"network": {"name": "tempest-test-network--613431055"}}
    Response - Headers: {'status': '201', 'content-length': '393', 'connection': 'close', 'date': 'Mon, 20 Jul 2015 10:18:33 GMT', 'content-type': 'application/json; charset=UTF-8', 'x-openstack-request-id': 'req-1a3e337f-5ba6-4671-a613-ce7e39ca0f57'}
        Body: {"network": {"status": "ACTIVE", "router:external": false, "subnets": [], "name": "tempest-test-network--613431055", "admin_state_up": true, "tenant_id": "1b5a1b13fc9d4377b25c169d003f6a29", "shared": false, "contrail:instance_count": 0, "id": "be1a14ed-23d9-4084-aee3-a227fe1626b2", "contrail:fq_name": ["default-domain", "tempest-PortsTestJSON-646346082", "tempest-test-network--613431055"]}}
2015-07-20 16:09:46,042 6082 INFO [tempest_lib.common.rest_client] Request (PortsTestJSON:test_create_port_with_no_securitygroups): 201 POST http://10.204.217.143:9696/v2.0/subnets 0.288s
2015-07-20 16:09:46,043 6082 DEBUG [tempest_lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: {"subnet": {"ip_version": 4, "network_id": "be1a14ed-23d9-4084-aee3-a227fe1626b2", "cidr": "10.100.0.0/28", "gateway_ip": "10.100.0.1"}}
    Response - Headers: {'status': '201', 'content-length': '375', 'connection': 'close', 'date': 'Mon, 20 Jul 2015 10:18:34 GMT', 'content-type': 'application/json; charset=UTF-8', 'x-openstack-request-id': 'req-f10cb1a2-452e-4587-928e-c8717460dcee'}
        Body: {"subnet": {"name": "", "enable_dhcp": true, "network_id": "be1a14ed-23d9-4084-aee3-a227fe1626b2", "tenant_id": "1b5a1b13fc9d4377b25c169d003f6a29", "dns_nameservers": [], "allocation_pools": [{"start": "10.100.0.2", "end": "10.100.0.14"}], "gateway_ip": "10.100.0.1", "ip_version": 4, "host_routes": [], "cidr": "10.100.0.0/28", "id": "1c052293-8591-42ca-8217-ffda76328de9"}}
2015-07-20 16:09:46,347 6082 INFO [tempest_lib.common.rest_client] Request (PortsTestJSON:test_create_port_with_no_securitygroups): 201 POST http://10.204.217.143:9696/v2.0/ports 0.302s
2015-07-20 16:09:46,348 6082 DEBUG [tempest_lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: {"port": {"network_id": "be1a14ed-23d9-4084-aee3-a227fe1626b2", "security_groups": []}}
    Response - Headers: {'status': '201', 'content-length': '481', 'connection': 'close', 'date': 'Mon, 20 Jul 2015 10:18:34 GMT', 'content-type': 'application/json; charset=UTF-8', 'x-openstack-request-id': 'req-58a56f69-cf27-4aa0-b1f1-b37c5c0e0601'}
        Body: {"port": {"status": "DOWN", "name": "31b014cd-7d9e-44fa-a11e-ef8f7ec12573", "admin_state_up": true, "network_id": "be1a14ed-23d9-4084-aee3-a227fe1626b2", "tenant_id": "1b5a1b13fc9d4377b25c169d003f6a29", "device_owner": "", "mac_address": "02:31:b0:14:cd:7d", "fixed_ips": [{"subnet_id": "1c052293-8591-42ca-8217-ffda76328de9", "ip_address": "10.100.0.3"}], "id": "31b014cd-7d9e-44fa-a11e-ef8f7ec12573", "security_groups": ["16d934b0-fbb3-4e90-ad34-5ef1cb6a5137"], "device_id": ""}}
2015-07-20 16:09:46,523 6082 INFO [tempest_lib.common.rest_client] Request (PortsTestJSON:_run_cleanups): 204 DELETE http://10.204.217.143:9696/v2.0/ports/31b014cd-7d9e-44fa-a11e-ef8f7ec12573 0.170s
2015-07-20 16:09:46,524 6082 DEBUG [tempest_lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: None
    Response - Headers: {'date': 'Mon, 20 Jul 2015 10:18:34 GMT', 'status': '204', 'connection': 'close', 'content-length': '0', 'x-openstack-request-id': 'req-29dc428f-24e8-48b0-a320-48480c800eb4'}
        Body:
2015-07-20 16:09:46,686 6082 INFO [tempest_lib.common.rest_client] Request (PortsTestJSON:_run_cleanups): 204 DELETE http://10.204.217.143:9696/v2.0/subnets/1c052293-8591-42ca-8217-ffda76328de9 0.160s
2015-07-20 16:09:46,687 6082 DEBUG [tempest_lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: None
    Response - Headers: {'date': 'Mon, 20 Jul 2015 10:18:34 GMT', 'status': '204', 'connection': 'close', 'content-length': '0', 'x-openstack-request-id': 'req-5ca98a6a-df96-4b1e-9d8b-7b28090d058e'}
        Body:
2015-07-20 16:09:46,792 6082 INFO [tempest_lib.common.rest_client] Request (PortsTestJSON:_run_cleanups): 204 DELETE http://10.204.217.143:9696/v2.0/networks/be1a14ed-23d9-4084-aee3-a227fe1626b2 0.103s
2015-07-20 16:09:46,793 6082 DEBUG [tempest_lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: None
    Response - Headers: {'date': 'Mon, 20 Jul 2015 10:18:34 GMT', 'status': '204', 'connection': 'close', 'content-length': '0', 'x-openstack-request-id': 'req-a9cacc80-fd8d-41dd-8173-62d4d68158b8'}
        Body:
}}}

Traceback (most recent call last):
  File "/home/ubuntu/jenkins/workspace/VeduTempest/tempest/tempest/api/network/test_ports.py", line 332, in test_create_port_with_no_securitygroups
    self.assertEmpty(port['security_groups'])
  File "/home/ubuntu/jenkins/workspace/VeduTempest/tempest/tempest/test.py", line 585, in assertEmpty
    self.assertTrue(len(list) == 0, msg)
  File "/home/ubuntu/jenkins/workspace/VeduTempest/tempest/.venv/local/lib/python2.7/site-packages/unittest2/case.py", line 702, in assertTrue
    raise self.failureException(msg)
AssertionError: False is not true

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

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

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

Reviewed: https://review.opencontrail.org/14233
Committed: http://github.org/Juniper/contrail-controller/commit/d11ab28ad8b38f95dc9bfba8dc3f65283ea085b4
Submitter: Zuul
Branch: master

commit d11ab28ad8b38f95dc9bfba8dc3f65283ea085b4
Author: Sachin Bansal <email address hidden>
Date: Mon Oct 5 11:49:01 2015 -0700

Do not return no-rule SG to neutron

When neutron creates a port with no SG specified, we assign an internal SG
called '__no_rule__'. This should not be returned to neutron when the port is
read.

Change-Id: I91125f46db227b5f10acc26fd74e4556476431ee
Closes-Bug: 1476503

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

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

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

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

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

Reviewed: https://review.opencontrail.org/17061
Committed: http://github.org/Juniper/contrail-controller/commit/d841840eba3db8bd778fc0f82675645da6c485ce
Submitter: Zuul
Branch: R2.22.x

commit d841840eba3db8bd778fc0f82675645da6c485ce
Author: Sachin Bansal <email address hidden>
Date: Mon Oct 5 11:49:01 2015 -0700

Do not return no-rule SG to neutron

When neutron creates a port with no SG specified, we assign an internal SG
called '__no_rule__'. This should not be returned to neutron when the port is
read.

Change-Id: I91125f46db227b5f10acc26fd74e4556476431ee
Closes-Bug: 1476503
(cherry picked from commit d11ab28ad8b38f95dc9bfba8dc3f65283ea085b4)
(cherry picked from commit 37b5769de20a1c5c65d931134833d9b7a1476c17)

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

Reviewed: https://review.opencontrail.org/17060
Committed: http://github.org/Juniper/contrail-controller/commit/37b5769de20a1c5c65d931134833d9b7a1476c17
Submitter: Zuul
Branch: R2.20

commit 37b5769de20a1c5c65d931134833d9b7a1476c17
Author: Sachin Bansal <email address hidden>
Date: Mon Oct 5 11:49:01 2015 -0700

Do not return no-rule SG to neutron

When neutron creates a port with no SG specified, we assign an internal SG
called '__no_rule__'. This should not be returned to neutron when the port is
read.

Change-Id: I91125f46db227b5f10acc26fd74e4556476431ee
Closes-Bug: 1476503
(cherry picked from commit d11ab28ad8b38f95dc9bfba8dc3f65283ea085b4)

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

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

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

Reviewed: https://review.opencontrail.org/21694
Committed: http://github.org/Juniper/contrail-controller/commit/89142dbc8125c8e912a79cf2673814229711c0e0
Submitter: Zuul
Branch: R2.21.x

commit 89142dbc8125c8e912a79cf2673814229711c0e0
Author: Sachin Bansal <email address hidden>
Date: Mon Oct 5 11:49:01 2015 -0700

Do not return no-rule SG to neutron

When neutron creates a port with no SG specified, we assign an internal SG
called '__no_rule__'. This should not be returned to neutron when the port is
read.

Change-Id: I91125f46db227b5f10acc26fd74e4556476431ee
Closes-Bug: 1476503
(cherry picked from commit d11ab28ad8b38f95dc9bfba8dc3f65283ea085b4)
(cherry picked from commit 37b5769de20a1c5c65d931134833d9b7a1476c17)

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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