Stack files dict missing from within resource plugin

Bug #1374042 reported by Joe D'Andrea
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Incomplete
Undecided
Unassigned

Bug Description

Calling heat.engine.stack_resource.StackResource.preview() from within a resource plugin (e.g., during a create) throws an exception if there are nested templates referenced as local files.

ValueError: Could not fetch remote template 'include.yaml': Invalid URL scheme

The same exception is thrown when calling heat.engine.parser.preview_resources() from within a resource plugin (as this calls each resource's preview() method).

When http/s URLs are specified, the preview succeeds.

Full info: http://paste.openstack.org/show/115354/

Joe D'Andrea (jdandrea)
description: updated
Revision history for this message
Steve Baker (steve-stevebaker) wrote :

You really shouldn't be calling heat.engine.stack_resource.StackResource.preview() from within a resource plugin at all ever.

Could you describe why your resource wants to do this?

Changed in heat:
status: New → Incomplete
Revision history for this message
Joe D'Andrea (jdandrea) wrote :

I'm starting to discover that previewing from within a plugin is frowned upon, yes.

I was experimenting with dynamically adding metadata to resources that are included as a nested template. preview() lets me resolve intrinsics (to a point, since not everything is instantiated yet), made decisions, and then amend resource metadata. (... he said matter-of-factly as Steve went into shock. <!>)

Perhaps this is best handled outside of Heat. (I was originally looking to avoid a separate process.)

Meanwhile, I also saw the proposed change to deprecate HARestarter, which raises a sobering point: Heat Resources ultimately *orchestrate*. OpenStack resources *perform*. My resource experience is, in essence, performing. Moreover, resource isolation is the new reality in a convergence architecture: https://blueprints.launchpad.net/heat/+spec/convergence

Even so, apart from my own motivation, is it ok that nested file resolution does *not* work at the resource level, while http/s resolution does?

Revision history for this message
Joe D'Andrea (jdandrea) wrote :

Turns out it is/was a bug, fixed in time for Juno RC1:

https://bugs.launchpad.net/heat/+bug/1357433

Revision history for this message
Joe D'Andrea (jdandrea) wrote :

Q: Should the status of this be changed to closed/resolved because it is a duplicate? (I can't edit the status.)

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.