Ask Your Question
0

heat fetching remote template via proxy

asked 2014-02-07 13:07:44 -0500

brakertech gravatar image

I attempted to create a wordpress stack using a template I had already downloaded, however, during creation a fetch request occurred for another template (and I require a proxy server to download anything).

Does anyone know how to inform heat to use a proxy server to download templates (or where on disk it will look for other templates it might need)?

# heat stack-create wordpress --template-file=WordPress_Composed_Instances.template --parameters="DBUsername=wp;DBPassword=wp;KeyName=braker;LinuxDistribution=F17"
+--------------------------------------+------------+--------------------+----------------------+
| id                                   | stack_name | stack_status       | creation_time        |
+--------------------------------------+------------+--------------------+----------------------+
| 177f45fc-7627-4ddd-bb0d-a79a58b348c5 | wordpress  | CREATE_IN_PROGRESS | 2014-02-07T18:42:11Z |
+--------------------------------------+------------+--------------------+----------------------+

# heat event-list wordpress
+------------------+----+--------------------------------------------------------------------------+
| resource_name    | id | resource_status_reason    | resource_status    | event_time|
+------------------+----+--------------------------------------------------------------------------+
| DatabaseTemplate | 57 | state changed             | CREATE_IN_PROGRESS | 2014-02-07T18:42:11Z |
| DatabaseTemplate | 58 | see below                 | CREATE_FAILED      | 2014-02-07T18:43:14Z |
+------------------+----+--------------------------------------------------------------------------+

Error from id 58:
ValueError: Could not fetch remote template 'https://raw.github.com/openstack/heat-templates/master/cfn/F17/MySQL_Single_Instance.template': Failed to retrieve template: [Errno 110] ETIMEDOUT

Heat log file:

2014-02-07 18:43:14.177 25926 ERROR heat.engine.resource [-] CREATE : NestedStack "DatabaseTemplate"
2014-02-07 18:43:14.177 25926 TRACE heat.engine.resource Traceback (most recent call last):
2014-02-07 18:43:14.177 25926 TRACE heat.engine.resource   File "/usr/lib/python2.6/site-packages/heat/engine/resource.py", line 358, in _do_action
2014-02-07 18:43:14.177 25926 TRACE heat.engine.resource     handle_data = handle()
2014-02-07 18:43:14.177 25926 TRACE heat.engine.resource   File "/usr/lib/python2.6/site-packages/heat/engine/resources/stack.py", line 63, in handle_create
2014-02-07 18:43:14.177 25926 TRACE heat.engine.resource     (self.properties[PROP_TEMPLATE_URL], str(r_exc)))
2014-02-07 18:43:14.177 25926 TRACE heat.engine.resource ValueError: Could not fetch remote template 'https://raw.github.com/openstack/heat-templates/master/cfn/F17/MySQL_Single_Instance.template': Failed to retrieve template: [Errno 110] ETIMEDOUT
2014-02-07 18:43:14.177 25926 TRACE heat.engine.resource
2014-02-07 18:43:14.211 25926 DEBUG heat.engine.scheduler [-] Task resource_action cancelled cancel /usr/lib/python2.6/site-packages/heat/engine/scheduler.py:187
2014-02-07 18:43:14.220 25926 DEBUG heat.engine.scheduler [-] Task stack_task from Stack "wordpress" complete step /usr/lib/python2.6/site-packages/heat/engine/scheduler.py:170
2014-02-07 18:43:14.220 25926 WARNING heat.engine.service [-] Stack create failed, status FAILED
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-02-27 13:18:37 -0500

rmarrine gravatar image

I have no idea if this is the "proper" way or not, but putting your export http_proxy=blah export https_proxy=blah export no_proxy=blah into a file called /etc/sysconfig/openstack-heat-engine and then restarting heat-engine worked for me. I found this by looking at /etc/rc3.d/S98openstack-heat-engine To get it to allow loading of local files (using the file:// scheme in TemplateURL) I had to go and modify /usr/lib/python2.6/site-packages/heat/common/urlfetch.py which for some reason specifically only allows http and https schemes, with a frustrating comment that you can allow file scheme by overriding allowed_schemes. Again I have know idea if that is the "proper" way, but it worked for me.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2014-02-07 13:07:44 -0500

Seen: 872 times

Last updated: Feb 27 '14