[swarm 10.0] tests on network templates failed with http400

Bug #1632332 reported by ElenaRossokhina
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Sergey Novikov
Newton
Fix Released
High
Sergey Novikov
Ocata
Fix Committed
High
Sergey Novikov

Bug Description

Detailed bug description:
Found on ci:
https://product-ci.infra.mirantis.net/job/10.0.system_test.ubuntu.network_templates/144/testReport/junit/(root)/deploy_cinder_net_tmpl/deploy_cinder_net_tmpl/
https://product-ci.infra.mirantis.net/job/10.0.system_test.ubuntu.network_templates/144/testReport/junit/(root)/deploy_ceph_net_tmpl/deploy_ceph_net_tmpl/
Steps to reproduce (cinder):
1. Revert snapshot with 3 slaves
2. Create cluster (HA) with Neutron VLAN/VXLAN/GRE
3. Add 1 controller + cinder nodes
4. Add 2 compute + cinder nodes
5. Upload 'cinder' network template'
6. Create custom network groups basing
     on template endpoints assignments
7. Run network verification
8. Deploy cluster
9. Run network verification
10. Run health checks (OSTF)
11. Check L3 network configuration on slaves
12. Check that services are listening on their networks only

Expected results:
Tests passed
Actual result:
Stack trace:
...
  File "/home/jenkins/workspace/10.0.system_test.ubuntu.network_templates/fuelweb_test/tests/test_net_templates_base.py", line 123, in create_custom_networks
    self.fuel_web.client.add_network_group(custom_net)
  File "/home/jenkins/workspace/10.0.system_test.ubuntu.network_templates/core/helpers/log_helpers.py", line 204, in wrapped
    result = func(*args, **kwargs)
  File "/home/jenkins/workspace/10.0.system_test.ubuntu.network_templates/fuelweb_test/models/nailgun_client.py", line 563, in add_network_group
    return self._post(url='/networks/', json=network_data).json()
  File "/home/jenkins/workspace/10.0.system_test.ubuntu.network_templates/fuelweb_test/models/nailgun_client.py", line 56, in _post
    return self.session.post(url=url, connect_retries=1, **kwargs)
  File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/keystoneauth1/session.py", line 675, in post
    return self.request(url, 'POST', **kwargs)
  File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/positional/__init__.py", line 101, in inner
    return wrapped(*args, **kwargs)
  File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/keystoneauth1/session.py", line 570, in request
    raise exceptions.from_response(resp, method, url)
BadRequest: Bad Request (HTTP 400)

in api.log:
2016-10-10 11:08:39.084 DEBUG [7f790c203880] (logger) Request POST /api/networks/ from 10.109.7.1:47386 {"name": "mongo", "meta": {"ip_range": ["10.200.255.1", "10.200.255.254"], "unmovable": false, "use_gateway": false, "notation": "ip_ranges", "render_addr_mask": null, "render_type": null, "map_priority": 0, "configurable": true}, "interface": "br-mongo", "cidr": "10.200.255.0/24", "group_id": 1, "gateway": null}
2016-10-10 11:08:39.128 DEBUG [7f790c203880] (logger) Response code '400 Bad Request' for POST /api/networks/ from 10.109.7.1:47386

When I've tried to run POST request maunually with data {"name": "mongo", "meta": {"ip_range": ["10.200.255.1", "10.200.255.254"], "unmovable": false, "use_gateway": false, "notation": "ip_ranges", "render_addr_mask": null, "render_type": null, "map_priority": 0, "configurable": true}, "interface": "br-mongo", "cidr": "10.200.255.0/24", "group_id": 1, "gateway": null} I've got Bad request message with point "Additional properties are not allowed" for 'interface' key. When request does not contain <"interface": "br-mongo">, it does not initiate http 400 error.
Unfortunately, env is unavailable for reverting now.

Revision history for this message
ElenaRossokhina (esolomina) wrote :
Changed in fuel:
milestone: none → 10.0
assignee: nobody → Fuel Sustaining (fuel-sustaining-team)
Changed in fuel:
status: New → Confirmed
importance: Undecided → High
tags: added: swarm-fail
tags: added: swarm-blocker
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 10.0 → 10.1
Changed in fuel:
assignee: Fuel Sustaining (fuel-sustaining-team) → Georgy Kibardin (gkibardin)
Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
Georgy Kibardin (gkibardin) wrote :

NetworkGroup never had "interface" property - it must be removed from the request.

Changed in fuel:
assignee: Georgy Kibardin (gkibardin) → Fuel QA Team (fuel-qa)
status: In Progress → Confirmed
Changed in fuel:
assignee: Fuel QA Team (fuel-qa) → Sergey Novikov (snovikov)
Revision history for this message
Aleksey Kasatkin (alekseyk-ru) wrote :

@snovikov, Georgy is right, "interface" property should not be there at all. Seems, that validator works properly now and it declines such requests.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-qa (stable/newton)

Reviewed: https://review.openstack.org/445503
Committed: https://git.openstack.org/cgit/openstack/fuel-qa/commit/?id=e26d83beef9ca396d82b13d8ca81b7f8ba464eb9
Submitter: Jenkins
Branch: stable/newton

commit e26d83beef9ca396d82b13d8ca81b7f8ba464eb9
Author: Sergey Novikov <email address hidden>
Date: Tue Mar 14 17:23:47 2017 +0400

    Update tests for network templates

    Closes-Bug: 1632332
    Change-Id: I8ebac9d95de2a86bc9ddcbf2287b81ec9ff6fa06

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-qa (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/446351

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-qa (master)

Fix proposed to branch: master
Review: https://review.openstack.org/446352

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-qa (master)

Reviewed: https://review.openstack.org/446352
Committed: https://git.openstack.org/cgit/openstack/fuel-qa/commit/?id=c57e5fe33b9cd0c8ee108a78cc6f099c62f60c79
Submitter: Jenkins
Branch: master

commit c57e5fe33b9cd0c8ee108a78cc6f099c62f60c79
Author: Sergey Novikov <email address hidden>
Date: Tue Mar 14 17:23:47 2017 +0400

    Update tests for network templates

    Closes-Bug: 1632332
    Change-Id: I8ebac9d95de2a86bc9ddcbf2287b81ec9ff6fa06
    (cherry picked from commit e26d83beef9ca396d82b13d8ca81b7f8ba464eb9)

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-qa (stable/ocata)

Reviewed: https://review.openstack.org/446351
Committed: https://git.openstack.org/cgit/openstack/fuel-qa/commit/?id=9a1d0694cc53dcf2dc069be315a6d258d44e587f
Submitter: Jenkins
Branch: stable/ocata

commit 9a1d0694cc53dcf2dc069be315a6d258d44e587f
Author: Sergey Novikov <email address hidden>
Date: Tue Mar 14 17:23:47 2017 +0400

    Update tests for network templates

    Closes-Bug: 1632332
    Change-Id: I8ebac9d95de2a86bc9ddcbf2287b81ec9ff6fa06
    (cherry picked from commit e26d83beef9ca396d82b13d8ca81b7f8ba464eb9)

Revision history for this message
Dmitry Belyaninov (dbelyaninov) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/fuel-qa ocata-eol

This issue was fixed in the openstack/fuel-qa ocata-eol release.

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.