[tests][devstack] Incorrect client creation in murano-dashboard ui tests.

Bug #1611722 reported by Mykola Stolyarenko
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
High
Nikolay Starodubtsev

Bug Description

Actual Behaviour:

The issue was found under murano-dashboard ui tests running.

Run sanity_check.py on last devstack.

(all-plugin) stack@srv161-bud:/opt/stack/tempest$ nosetests -sv /opt/stack/murano-dashboard/muranodashboard/tests/functional/sanity_check.py
ERROR
muranodashboard.tests.functional.sanity_check.TestSuiteAppsPagination.test_apps_pagination ... Waiting for a success message
test_apps_pagination failed
ERROR
ERROR
ERROR
ERROR
ERROR
ERROR
ERROR
ERROR
ERROR
muranodashboard.tests.functional.sanity_check.TestSuiteSmoke.test_smoke_applications_panel ... Waiting for a success message
ok
muranodashboard.tests.functional.sanity_check.TestSuiteSmoke.test_smoke_environments_panel ... Waiting for a success message
ok
keystoneclient.auth.identity.v3.base: DEBUG: Making authentication request to http://172.18.162.191:5000/v3/auth/tokens
requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connection (1): 172.18.162.191
requests.packages.urllib3.connectionpool: DEBUG: "POST /v3/auth/tokens HTTP/1.1" 201 283
keystoneclient.auth.identity.v3.base: DEBUG: {"token": {"issued_at": "2016-08-09T15:01:22.845732Z", "user": {"domain": {"id": "default", "name": "Default"}, "id": "6d835612570e48b382bdd432af4a6e5c", "name": "admin"}, "methods": ["password"], "expires_at": "2016-08-09T16:01:22.845695Z", "audit_ids": ["V8Gm6VKvSGmMkuMFbHnDow"]}}
muranoclient.common.http: DEBUG: curl -i -X POST -H 'X-Auth-Token: {SHA1}cb43dc8691c0c45c81ad69122355d6650dcb5551' -H 'User-Agent: python-muranoclient' -d '{'__metadata__': '{"categories": ["Web"], "tags": ["tag"]}'}' http://172.18.162.191:8082/v1/catalog/packages
requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connection (1): 172.18.162.191
requests.packages.urllib3.connectionpool: DEBUG: "POST /v1/catalog/packages HTTP/1.1" 400 119
muranoclient.common.http: DEBUG:
HTTP/1.1 400 Bad Request
Content-Length: 119
Content-Type: text/plain; charset=UTF-8
X-Openstack-Request-Id: req-a73763c4-66fe-4cb3-b811-e0922566a5f6
Date: Tue, 09 Aug 2016 15:01:22 GMT
Connection: keep-alive

400 Bad Request

The server could not comply with the request since it is either malformed or otherwise incorrect.

in tests:

In [11]: data = {'categories': ['Web'], 'tags': ['tag']}

In [12]: app_name = 'MockApp'

In [13]: archive = '/opt/stack/pak.zip'

In [14]: murano_client.packages.create(data, {app_name: open(archive, 'rb')})
---------------------------------------------------------------------------
HTTPBadRequest Traceback (most recent call last)
<ipython-input-14-1ab9006bf83e> in <module>()
----> 1 murano_client.packages.create(data, {app_name: open(archive, 'rb')})

/usr/local/lib/python2.7/dist-packages/muranoclient/v1/packages.pyc in create(self, data, files)
     56 'POST',
     57 data={'__metadata__': jsonutils.dumps(data)},
---> 58 files=files
     59 )
     60 if not response.ok:

/usr/local/lib/python2.7/dist-packages/muranoclient/common/http.pyc in request(self, url, method, log, **kwargs)
    209 % resp.content)
    210 elif 400 <= resp.status_code < 600:
--> 211 raise exc.from_response(resp)
    212 elif resp.status_code in (301, 302, 305):
    213 # Redirected. Reissue the request to the new location,

HTTPBadRequest: 400 Bad Request
The server could not comply with the request since it is either malformed or otherwise incorrect.
    (HTTP 400)

In UI package uploaded successfully

Expected Behaviour:

Package should uploaded successfully

Environment:
Glare disabled
murano --version 0.9.1
{"version": {"status": "stable", "updated": "2016-04-04T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.6", "links": [{"href": "http://172.18.162.191/identity/v3/", "rel": "self"}]}}

Changed in murano:
milestone: none → newton-3
importance: Undecided → High
Revision history for this message
Kirill Zaitsev (kzaitsev) wrote :

do you have glare installed in your lab? looks like you don't

Changed in murano:
status: New → Opinion
status: Opinion → Incomplete
description: updated
summary: - Can't upload the package by murano cli after keystone update
+ Wrong client creation in murano-dashboard ui tests.
Changed in murano:
status: Incomplete → New
tags: added: dashboard tests
removed: murano
summary: - Wrong client creation in murano-dashboard ui tests.
+ [tests][devstack] Incorrect client creation in murano-dashboard ui
+ tests.
Changed in murano:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano-dashboard (master)

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

Changed in murano:
assignee: nobody → Nikolay Starodubtsev (starodubcevna)
status: Confirmed → In Progress
Changed in murano:
assignee: Nikolay Starodubtsev (starodubcevna) → zhurong (zhu-rong)
Changed in murano:
assignee: zhurong (zhu-rong) → Nikolay Starodubtsev (starodubcevna)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano-dashboard (master)

Reviewed: https://review.openstack.org/356951
Committed: https://git.openstack.org/cgit/openstack/murano-dashboard/commit/?id=41d5a7b82d7ea353a3ecf4c7b5d2b145d98d6a52
Submitter: Jenkins
Branch: master

commit 41d5a7b82d7ea353a3ecf4c7b5d2b145d98d6a52
Author: Nikolay Starodubtsev <email address hidden>
Date: Thu Aug 18 09:09:48 2016 +0300

    Create murano session client in tests

    Previously in dashboard test an old type of murano client was created
    using only keystone token. From now on murano client in tests will be
    constructed using keystone session, so the new (SessionClient) will be
    created.

    Co-Authored-By: Zhu Rong <email address hidden>

    Change-Id: I7bbfd1198f8b9588f294280199f1b12edf762cbf
    Closes-Bug: #1611722

Changed in murano:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/murano-dashboard 3.0.0.0b3

This issue was fixed in the openstack/murano-dashboard 3.0.0.0b3 development milestone.

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.