Tempest test test_create_security_group_rule_wrong_ip_prefix_version fails

Bug #1604935 reported by Vedamurthy Joshi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0.2.x
Won't Fix
Undecided
Unassigned
R3.0.3.x
Won't Fix
Undecided
Unassigned
R3.1
Fix Committed
High
Sahil Sabharwal
R3.2
Fix Committed
High
Sahil Sabharwal
Trunk
Fix Committed
High
Sahil Sabharwal

Bug Description

R3.0.2.0 Build 52 Liberty

tempest.api.network.test_security_groups_negative.NegativeSecGroupIPv6Test.test_create_security_group_rule_wrong_ip_prefix_version fails

The test tries to update a SG with ethertype IPv6 but prefix being a v4 IP and vice versa.
It is looking for a BadRequest exception to be thrown with message "Conflicting value ethertype"

Error seen :
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/tempest/api/network/test_security_groups_negative.py", line 237, in test_create_security_group_rule_wrong_ip_prefix_version
    remote_ip_prefix=pair['ip_prefix'])
  File "/usr/lib/python2.7/dist-packages/unittest2/case.py", line 1278, in assertRaisesRegex
    return context.handle('assertRaisesRegex', args, kwargs)
  File "/usr/lib/python2.7/dist-packages/unittest2/case.py", line 194, in handle
    callable_obj(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/tempest/lib/services/network/security_group_rules_client.py", line 21, in create_security_group_rule
    return self.create_resource(uri, post_data)
  File "/usr/local/lib/python2.7/dist-packages/tempest/lib/services/network/base.py", line 60, in create_resource
    resp, body = self.post(req_uri, req_post_data)
  File "/usr/local/lib/python2.7/dist-packages/tempest/lib/common/rest_client.py", line 270, in post
    return self.request('POST', url, extra_headers, headers, body, chunked)
  File "/usr/local/lib/python2.7/dist-packages/tempest/lib/common/rest_client.py", line 664, in request
    resp, resp_body)
  File "/usr/local/lib/python2.7/dist-packages/tempest/lib/common/rest_client.py", line 828, in _error_checker
    message=message)
ServerFault: Got server fault
Details: An unknown exception occurred.
=======

contrail-api log :

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/__init__.py", line 1002, in handler_trap_exception
    response = handler(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_interface.py", line 722, in plugin_http_post_securitygrouprule
    return self.plugin_create_sec_group_rule(context, sg_rule)
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_interface.py", line 678, in plugin_create_sec_group_rule
    sg_rule_info = cfgdb.security_group_rule_create(sg_rule['resource'])
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py", line 2333, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py", line 3977, in security_group_rule_create
    self._security_group_rule_create(sg_id, sg_rule)
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py", line 211, in _security_group_rule_create
    self._vnc_lib.security_group_update(sg_vnc)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 39, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 442, in _object_update
    content = self._request_server(rest.OP_PUT, uri, data=json_body)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 712, in _request_server
    retry_count=retry_count)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 771, in _request
    raise BadRequest(status, content)
BadRequest: HTTP Status: 400 Content: Rule subnet 10.100.0.0/16 doesn't match ethertype IPv6

tags: added: neutron tempest
removed: net
Sachin Bansal (sbansal)
Changed in juniperopenstack:
assignee: nobody → ssabharwal@juniper.net (ssabharwal)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Review in progress for https://review.opencontrail.org/22525
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/22567
Committed: http://github.org/Juniper/contrail-controller/commit/bb1c4e3ac1b75260bba5bad1c3cd83aa8d01188a
Submitter: Zuul
Branch: R3.1

commit bb1c4e3ac1b75260bba5bad1c3cd83aa8d01188a
Author: Sahil Sabharwal <email address hidden>
Date: Wed Jul 27 19:45:42 2016 -0700

1.Modified vnc_openstack to catch proper error from the api-server and pass it to the neutron.
2.Added config option 'strict_compliance" for enabling port create of with IP of service address

Closes-Bug: 1604373
Closes-Bug: 1604556
Closes-Bug: 1604578
Closes-Bug: 1604935
Closes-Bug: 1604354
Change-Id: Ibd66e36d57a1079fb8a3032ea117d0a7c7f7b634
(cherry picked from commit 44c1853511982806d8ed144bf6ad266e5c9b6dfb)

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

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

commit 555039cf7aa212a80b4b4aef1b1954c763d69106
Author: Sahil Sabharwal <email address hidden>
Date: Wed Jul 27 19:45:42 2016 -0700

1.Modified vnc_openstack to catch proper error from the api-server and pass it to the neutron.
2.Added config option 'strict_compliance" for enabling port create of with IP of service address

Closes-Bug: 1604373
Closes-Bug: 1604556
Closes-Bug: 1604578
Closes-Bug: 1604935
Closes-Bug: 1604354
Change-Id: Ibd66e36d57a1079fb8a3032ea117d0a7c7f7b634
(cherry picked from commit 44c1853511982806d8ed144bf6ad266e5c9b6dfb)

tags: added: osp7-cert osp8-cert rhosp-tempest
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.