[murano+glare] Incorrect filter request for searching Environment class during deployment

Bug #1503224 reported by Anastasia Kuznetsova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-muranoclient
Fix Released
Medium
Alexander Tivelkov
Liberty
Fix Released
Medium
Anastasia Kuznetsova

Bug Description

Steps to reproduce:
1. Enable Murano and Glare interaction
2. Import some app to the Murano
3. Import Core Library to the Murano
4. Create environment
5. Add app to this environment
6. Send it to deploy

Observed result:
Deployment failure

2015-10-0609: 48: 09.7305000INFOmurano.common.engine[
    -
]Finishedprocessingtask: {
    "action": {
        "isException": true,
        "result": {
            "message": "400 Bad Request: The server could not comply with the request since it is either malformed or otherwise incorrect.: Unexpected filter property (HTTP 400)",
            "details": "Traceback (most recent call last):\n
                        File \"/opt/stack/murano/murano/common/engine.py\", line 166, in _execute\n obj = executor.load(self.model)\n
                        File \"/opt/stack/murano/murano/dsl/executor.py\", line 190, in load\n result = self._object_store.load(data.get(constants.DM_OBJECTS), None)\n
                        File \"/opt/stack/murano/murano/dsl/object_store.py\", line 67, in load\n obj_type, version_spec)\n
                        File \"/opt/stack/murano/murano/engine/package_loader.py\", line 318, in load_class_package\n class_name, version_spec)\n
                        File \"/opt/stack/murano/murano/engine/package_loader.py\", line 62, in load_class_package\n package_definition = self._get_definition(filter_opts)\n
                        File \"/opt/stack/murano/murano/engine/package_loader.py\", line 112, in _get_definition\n **filter_opts))\n
                        File \"/usr/local/lib/python2.7/dist-packages/muranoclient/v1/artifact_packages.py\", line 233, in filter\n for pkg in self.glare.list(**kwargs):\n
                        File \"/usr/local/lib/python2.7/dist-packages/muranoclient/glance/artifacts.py\", line 209, in _list\n for artifact in paginate(url, page_size, limit):\n
                        File \"/usr/local/lib/python2.7/dist-packages/muranoclient/glance/artifacts.py\", line 171, in paginate\n resp, body = self.http_client.get(next_url)\n
                        File \"/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py\", line 280, in get\n return self._request('GET', url, **kwargs)\n
                        File \"/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py\", line 272, in _request\n resp, body_iter = self._handle_response(resp)\n
                        File \"/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py\", line 93, in _handle_response\n raise exc.from_response(resp, resp.content)\n
                        HTTPBadRequest: 400 Bad Request: The server could not comply with the request since it is either malformed or otherwise incorrect.: Unexpected filter property (HTTP 400)\n"
        }

It it strange that it try to find environment class using following request: http://127.0.0.1:9292/v3/artifacts/murano/v1?&class_name=io.murano.Environment&limit=20&version=ge%3A0.0.0&version=lt%3A1.0.0-0&enabled=True&sort=name:asc:

because object in artifact repository doesn't have class_name property

Tags: glare
Changed in murano:
assignee: nobody → Alexander Tivelkov (ativelkov)
Changed in murano:
status: New → Triaged
importance: Undecided → Medium
milestone: none → mitaka-1
tags: added: glare
Revision history for this message
Alexander Tivelkov (ativelkov) wrote :
Changed in murano:
status: Triaged → In Progress
affects: murano → python-muranoclient
Changed in python-muranoclient:
milestone: mitaka-1 → none
milestone: none → 0.8.0
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-muranoclient (master)

Reviewed: https://review.openstack.org/251299
Committed: https://git.openstack.org/cgit/openstack/python-muranoclient/commit/?id=4f2336fa382ed18cbdca89bf76eadb213551ada0
Submitter: Jenkins
Branch: master

commit 4f2336fa382ed18cbdca89bf76eadb213551ada0
Author: Alexander Tivelkov <email address hidden>
Date: Mon Nov 30 14:01:08 2015 +0300

    Glare client now properly filters by class name

    Adaptor class which wraps the legacy filtering requests into the
    Glare-compatible ones has got a conversion for class_name ->
    class_definitions attribute.
    This fixes a bug when the engine could not properly fetch the package
    by class name when deploying an app.

    Change-Id: I98846bfad5fc03558dfc2e46fb4dcbfdb40489e8
    Closes-bug: #1503224

Changed in python-muranoclient:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-muranoclient (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/256462

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-muranoclient (stable/liberty)

Reviewed: https://review.openstack.org/256462
Committed: https://git.openstack.org/cgit/openstack/python-muranoclient/commit/?id=4abf10f5289e8d83dae5967a37f29ec15b7c7f7d
Submitter: Jenkins
Branch: stable/liberty

commit 4abf10f5289e8d83dae5967a37f29ec15b7c7f7d
Author: Alexander Tivelkov <email address hidden>
Date: Mon Nov 30 14:01:08 2015 +0300

    Glare client now properly filters by class name

    Adaptor class which wraps the legacy filtering requests into the
    Glare-compatible ones has got a conversion for class_name ->
    class_definitions attribute.
    This fixes a bug when the engine could not properly fetch the package
    by class name when deploying an app.

    Change-Id: I98846bfad5fc03558dfc2e46fb4dcbfdb40489e8
    Closes-bug: #1503224
    (cherry picked from commit 4f2336fa382ed18cbdca89bf76eadb213551ada0)

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.