NoClassFound masks real package import errors

Bug #1348804 reported by Steve McLellan
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Murano
Fix Released
High
Steve McLellan

Bug Description

In engine/package_class_loader.py :

    def load_definition(self, name):
        try:
            package = self.package_loader.get_package_by_class(name)
            return package.get_class(name)
        except Exception:
            raise exceptions.NoClassFound(name)

This effectively masks any exception, and instead gives the user (and logs) a misleading and vague one. A quick win would be merely to log the original exception. Also nice would be to change this exception handler to catch and re-raise any subclass of MuranoPLException (which would be the base class for anything in dsl/exceptions) so that package errors themselves are bubbled up. Any other errors can be treated as a generic server failure to the user, but logged on the server.

Revision history for this message
Lee Calcote (lcalcote) wrote :
Download full text (12.8 KiB)

Here is output from tailing "screen-murano-engine.log"

2014-07-25 15:13:32.637 29401 INFO murano.common.engine [-] Starting processing task: {"action": {"args": {}, "method": "deploy", "object_id": "d42561af9c1f46f6af160fccbed37d9e"}, "tenant_id": "3ecf9435e8a7483989b99413b25e45a1", "model": {"Attributes": [], "Objects": {"defaultNetworks": {"environment": {"name": "Austin-Development-network", "?": {"type": "io.murano.resources.NeutronNetwork", "id": "994b2ce7519246e798b2a622e5b76009"}}, "flat": null}, "name": "Austin-Development", "?": {"type": "io.murano.Environment", "id": "d42561af9c1f46f6af160fccbed37d9e"}, "applications": [{"instance": {"name": "epischy1xhvqa1", "assignFloatingIp": true, "keyname": "clouduser_key", "flavor": "m1.small", "image": "cirros-0.3.2-x86_64-disk", "?": {"type": "io.murano.resources.LinuxMuranoInstance", "id": "d82df757-097c-4a0e-a5e3-191ece3b8f83"}}, "name": "CF", "?": {"_26411a1861294160833743e45d0eaad9": {"name": "Cloud Foundry"}, "type": "io.murano.apps.paas.CloudFoundry", "id": "d0871162-a94d-4e14-9cd6-ff278d2aa3e1"}}, {"instance": {"name": "tomcat-2", "assignFloatingIp": true, "keyname": "clouduser_key", "flavor": "m1.medium", "image": "cirros-0.3.2-x86_64-disk", "?": {"type": "io.murano.resources.LinuxMuranoInstance", "id": "e92634eb-868b-4b45-ade5-6c93c9f191fa"}}, "name": "Tomcat-2", "?": {"_26411a1861294160833743e45d0eaad9": {"name": "Apache Tomcat"}, "type": "io.murano.apps.apache.Tomcat", "id": "d6f4c274-6ac2-4150-94e4-020f8342a427"}}]}}, "token": "*** SANITIZED ***"}
2014-07-25 15:13:32.638 29401 DEBUG murano.engine.package_loader [-] Cache for package loader is located at: /tmp/murano-packages-cache/2a637b0b-4619-4abb-a41a-dc5f533c56d3 _get_cache_directory /opt/stack/murano/murano/engine/package_loader.py:78
2014-07-25 15:13:32.638 29401 DEBUG muranoclient.common.http [-] curl -i -X GET -H 'X-Auth-Token: 0783f26c4eb01535925e6e0d44b1d182' -H 'Content-Type: application/json' -H 'User-Agent: python-muranoclient' http://localhost:8082/v1/catalog/packages?class_name=io.murano.Object&limit=20 log_curl_request /opt/stack/python-muranoclient/muranoclient/common/http.py:158
2014-07-25 15:13:32.639 29401 DEBUG muranoclient.common.http [-] curl -i -X GET -H 'X-Auth-Token: 0783f26c4eb01535925e6e0d44b1d182' -H 'Content-Type: application/json' -H 'User-Agent: python-muranoclient' http://localhost:8082/v1/catalog/packages?class_name=io.murano.StackTrace&limit=20 log_curl_request /opt/stack/python-muranoclient/muranoclient/common/http.py:158
2014-07-25 15:13:32.641 29401 DEBUG muranoclient.common.http [-] curl -i -X GET -H 'X-Auth-Token: 0783f26c4eb01535925e6e0d44b1d182' -H 'Content-Type: application/json' -H 'User-Agent: python-muranoclient' http://localhost:8082/v1/catalog/packages?class_name=io.murano.Exception&limit=20 log_curl_request /opt/stack/python-muranoclient/muranoclient/common/http.py:158
2014-07-25 15:13:32.643 29401 DEBUG muranoclient.common.http [-] curl -i -X GET -H 'X-Auth-Token: 0783f26c4eb01535925e6e0d44b1d182' -H 'Content-Type: application/json' -H 'User-Agent: python-muranoclient' http://localhost:8082/v1/catalog/packages?class_name=io.murano.system.AgentListener&limit=20 log_curl_request /o...

Revision history for this message
Lee Calcote (lcalcote) wrote :
Revision history for this message
Lee Calcote (lcalcote) wrote :
ruhe (ruhe)
Changed in murano:
status: New → Confirmed
importance: Undecided → High
milestone: none → juno-3
Steve McLellan (sjmc7)
Changed in murano:
assignee: nobody → Steve McLellan (sjmc7)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (master)

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

Changed in murano:
status: Confirmed → In Progress
Changed in murano:
assignee: Steve McLellan (sjmc7) → Serg Melikyan (smelikyan)
Changed in murano:
assignee: Serg Melikyan (smelikyan) → Steve McLellan (sjmc7)
Changed in murano:
assignee: Steve McLellan (sjmc7) → Serg Melikyan (smelikyan)
Changed in murano:
assignee: Serg Melikyan (smelikyan) → Steve McLellan (sjmc7)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (master)

Reviewed: https://review.openstack.org/110125
Committed: https://git.openstack.org/cgit/stackforge/murano/commit/?id=03991fa9e126ebb3e35356da93dedbc34de3046e
Submitter: Jenkins
Branch: master

commit 03991fa9e126ebb3e35356da93dedbc34de3046e
Author: Steve McLellan <email address hidden>
Date: Mon Jul 28 14:32:38 2014 -0500

    Don't hide exception messages during package load

    Include the original error message if an error occurs finding the
    package for a class. There may be some improvements that can be made,
    but this makes the logs a little more useful.

    Change-Id: I81b8cbcaea2773539aeabbdef6b2129cd28e28c3
    Closes-Bug: #1348804

Changed in murano:
status: In Progress → Fix Committed
ruhe (ruhe)
Changed in murano:
status: Fix Committed → Fix Released
Changed in murano:
milestone: juno-3 → 2014.2
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.