<!DOCTYPE html>
<html><head>
    <meta charset="UTF-8">
</head><body style=""><div>Thank you Rami,<br>so, if I got it, looking at the code, the suggested process for a sw deployment in our case is a task series (maybe realized using python-celery) like this:<br><br>1) Create a swift temp_url for the signaling dedicated to the deployment<br>2) Pass this url, and all the necessary parameters, to the software config as inputs<br>3) Create a deploy with an intitial state IN_PROGRESS<br>4) Monitor the swift_url state for a signal received (or a timeout occurred)<br>5) Update the deploy status in SUCCES/FAILED<br>6) Remove the swift temp_url.<br><br>Am I right?</div>
<div> </div>
<div>Regards,<br>Pasquale Lepera<br><br></div>
<p style="margin: 0;"> </p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  _________________________________________________________________________</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
<blockquote type="cite" style="position: relative; margin-left: 0px; padding-left: 10px; border-left: solid 1px blue;">Il 1 dicembre 2016 alle 11.29 Rabi Mishra <ramishra@redhat.com> ha scritto:
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
<div dir="ltr">
<div>
<div>
<div>Moving to openstack-dev for more visibility and discussion.
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
</div>
We currently have signal API for heat resources(not for standalone software config/deployment). However, you can probably use a workaround with swift temp_url like tripleo[1] to achieve your use case.
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  We do have rpc api[2] for signalling deployments. It would probably not be that difficult to add REST API support for native/cfn signalling, though I don't know if there are more reasons for it not being added yet.</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
</div>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
</div>
<div>Steve Baker(original author) would probably know more about it and can give you a better answer:)
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
</div>
<div>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
</div>
<div>
<div>
<div>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  [1] <a href="https://github.com/openstack/tripleo-common/blob/master/tripleo_common/actions/deployment.py">https://github.com/openstack/tripleo-common/blob/master/tripleo_common/actions/deployment.py</a></p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  [2] <a href="https://github.com/openstack/heat/blob/master/heat/engine/service_software_config.py#L262">https://github.com/openstack/heat/blob/master/heat/engine/service_software_config.py#L262</a></p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
<div>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  On Wed, Nov 30, 2016 at 5:54 PM, Pasquale Lepera <span><<a href="mailto:pasquale.lepera@csi.it" target="_blank">pasquale.lepera@csi.it</a>></span> wrote:</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
<div>
<div>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;"><span style="text-decoration: underline;"></span>
<div>
<div>Hi,
<p style="margin: 0;"> <span style="opacity: 0;">></span>  we're trying to use the Heat Software configuration APIs, but we're facing a problem with the signaling.</p>
</div>
<div>We quite well know how to use Software config/deployment inside stack Templates, and in that case what we got on the target VM is something like this:
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
</div>
<div>#os-collect-config --print
<p style="margin: 0;"> <span style="opacity: 0;">></span>  inputs:[</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  …</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>       {</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>        "type": "String",</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>        "name": "deploy_signal_transport",</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>        "value": "CFN_SIGNAL",</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>        "description": "How the server should signal to heat with the deployment output values."</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>       },</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>       {</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>        "type": "String",</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>        "name": "deploy_signal_id",</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>        "value": "<a href="http://ctrl-liberty.nuvolacsi.it:8000/v1/signal/arn%3Aopenstack%3Aheat%3A%3Ab570fe9ea2c94cb8ba72fe07fa034b62%3Astacks%2FStack_test_from_view_galera-53040%2F15d0e95a-e422-4994-9f17-bb2f543952f7%2Fresources%2Fdeployment_sw_mariadb2?Timestamp=2016-11-24T16%3A35%3A12Z&SignatureMethod=HmacSHA256&AWSAccessKeyId=72ef8cef2e174926b74252754617f347&SignatureVersion=2&Signature=H5QcAv7yIZgBQzhztb4%2B0NJi7Z3qO%2BmwToqINUiKbvw%3D" target="_blank">http://ctrl-liberty.nuvolacsi.it:8000/v1/signal/arn%3Aopenstack%3Aheat%3A%3Ab570fe9ea2c94cb8ba72fe07fa034b62%3Astacks%2FStack_test_from_view_galera-53040%2F15d0e95a-e422-4994-9f17-bb2f543952f7%2Fresources%2Fdeployment_sw_mariadb2?Timestamp=2016-11-24T16%3A35%3A12Z&SignatureMethod=HmacSHA256&AWSAccessKeyId=72ef8cef2e174926b74252754617f347&SignatureVersion=2&Signature=H5QcAv7yIZgBQzhztb4%2B0NJi7Z3qO%2BmwToqINUiKbvw%3D</a>",</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>        "description": "ID of signal to use for signaling output values"</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>       },</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>       {</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>        "type": "String",</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>        "name": "deploy_signal_verb",</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>        "value": "POST",</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>        "description": "HTTP verb to use for signaling output values"</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>       }</p>
</div>
<div>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  This part, we suppose, is generated by heat during the Template processing and is pushed to the target so that, when the deployment is finished, the os-apply-config uses CFN to signal to the orchestrator the SUCCESS/FAILED job.</p>
</div>
<div> </div>
<div>The problem is that, when we try to use directly the software config creation API and the deployment one, what we got in the target VM is something like this:</div>
<div> </div>
<div>#os-collect-config --print
<p style="margin: 0;"> <span style="opacity: 0;">></span>  ...</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>     {</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>      "inputs": [],</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>      "group": null,</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>      "name": "test_key_gen_9aznXZ7DE9",</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>      "outputs": [],</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>      "creation_time": "2016-11-24T15:50:50",</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>      "options": {},</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>      "config": "#!/bin/bash\ntouch /tmp/test \nhostname > /tmp/test \n",</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>      "id": "d9395163-4238-4e94-902f-1e8abdbfa2bb"</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>     }</p>
</div>
<div>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  This appens because we pass to the create SW config API no explicit parameter in the “inputs” key.</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  Of course, this config causes no signaling back to Heat.</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  So the questions are:</p>
</div>
<div> </div>
<div>Is it possible to use the cfn signaling with the software configuration/deployment creation APIs?
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  How?</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  Is it possible to have a signaling back to the orchestration without passing manually a deploy_signal_id inside the API's configuration parameters?</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  If not, another way to give a signal back to Orchestrator, could be a workaround creating a self-standing stack containing only “OS::Heat::WaitCondition” and “OS::Heat::WaitConditionHandlewaitsignals” resources, but before using this workaround we want to be sure that is not possible in other ways.</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  Thanks<span class="gmail-m_4116170331787236954HOEnZb"><span style="color: #888888;"></span></span></p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  Pasquale</p>
</div>
</div>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  _______________________________________________</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>   OpenStack-operators mailing list</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>   <a href="mailto:OpenStack-operators@lists.openstack.org" target="_blank">OpenStack-operators@lists.openstack.org</a></p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>   <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</a></p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
</blockquote>
</div>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  --</p>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
<div class="gmail-m_4116170331787236954gmail_signature">
<div dir="ltr">
<div>Regards,</div>
Rabi Misra
<div>
<p style="margin: 0;"> <span style="opacity: 0;">></span>  </p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote></body></html>