package loading makes repeat API calls

Bug #1334352 reported by Steve McLellan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
Critical
Steve McLellan

Bug Description

When the engine processes a job there are numerous API calls made (this is during an environment deletion, but i think the process is the same for any action):

GET http://localhost:8082/v1/catalog/packages?class_name=io.murano.Object&limit=20
GET http://localhost:8082/v1/catalog/packages/6aa15e97de5d45fd921b8ecd9a0bc173/download

Then, from principal_objects.py

http://localhost:8082/v1/catalog/packages?class_name=io.murano.Object&limit=20
http://localhost:8082/v1/catalog/packages?class_name=io.murano.StackTrace&limit=20
http://localhost:8082/v1/catalog/packages?class_name=io.murano.Exception&limit=20

Then from system_objects, these calls all result in 200 responses followed by "Error loading package %name" (because they're defined in code)

http://localhost:8082/v1/catalog/packages?class_name=io.murano.system.AgentListener&limit=20
http://localhost:8082/v1/catalog/packages?class_name=io.murano.system.Agent&limit=20
http://localhost:8082/v1/catalog/packages?class_name=io.murano.system.NetworkExplorer&limit=20
http://localhost:8082/v1/catalog/packages?class_name=io.murano.system.InstanceNotifier&limit=20
http://localhost:8082/v1/catalog/packages?class_name=io.murano.system.HeatStack&limit=20
http://localhost:8082/v1/catalog/packages?class_name=io.murano.system.StatusReporter&limit=20
http://localhost:8082/v1/catalog/packages?class_name=io.murano.system.Resources&limit=20

These classes are imported from code subsequently.

This results in 12 API calls when only 2 of them (the first two) have any effect. The package loader should be smarter and a) cache package information so it doesn't need to keep going to the API and b) don't make requests for packages that are defined in the engine code itself.

EDIT - this actually happens again once networking components are requested; I think at least 4 more requests are made for networking, then 2 or 3 more for security groups.

Steve McLellan (sjmc7)
description: updated
description: updated
Revision history for this message
Serg Melikyan (smelikyan) wrote :

We need to improve our PackageLoader/PackageClassLoader

Changed in murano:
status: New → Incomplete
status: Incomplete → Confirmed
importance: Undecided → High
milestone: none → juno-3
Changed in murano:
milestone: juno-3 → none
Changed in murano:
milestone: none → juno-3
importance: High → Critical
Stan Lagun (slagun)
Changed in murano:
assignee: nobody → Stan Lagun (slagun)
Revision history for this message
ruhe (ruhe) wrote :
Changed in murano:
assignee: Stan Lagun (slagun) → Steve McLellan (sjmc7)
status: Confirmed → In Progress
Steve McLellan (sjmc7)
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.