<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error on Provisioning Workflow in HPE Morpheus Enterprise Software</title>
    <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251814#M4988</link>
    <description>&lt;P&gt;Thanks for that.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Mar 2023 17:41:44 GMT</pubDate>
    <dc:creator />
    <dc:date>2023-03-22T17:41:44Z</dc:date>
    <item>
      <title>Error on Provisioning Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251811#M4985</link>
      <description>&lt;P&gt;Ok Ok…&lt;/P&gt;
&lt;P&gt;So I have a provisioning workflow, and have added a task that keeps bombing out.  The task is very simple (bash):&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Gather Data&lt;/LI&gt;
&lt;LI&gt;Use them in curl calls&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I’ve tried this in both provision and post-provision, but both fail with the error message of:&lt;BR /&gt;
&lt;EM&gt;Task Execution Failed on Attempt 1&lt;BR /&gt;
No such property: user&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;If I run the same workflow as an operational this works just fine.&lt;BR /&gt;
it &lt;EM&gt;seems&lt;/EM&gt; the lines in question are:&lt;/P&gt;
&lt;PRE style="background : #f0f1f2;"&gt;&lt;CODE class="lang-auto"&gt;displayname="&amp;lt;%= user.displayName %&amp;gt;"
email="&amp;lt;%= user.email %&amp;gt;"
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However.  I’ve commented out those two lines, and used static strings.  It still fails with the same error.  This leads me to believe either:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The bash is cached somewhere, and running the old script (it is “Local”)&lt;/LI&gt;
&lt;LI&gt;The error has nothing to do with my bash&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Any ideas would be awesome.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2023 08:26:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251811#M4985</guid>
      <dc:creator />
      <dc:date>2023-02-26T08:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Provisioning Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251812#M4986</link>
      <description>&lt;ASIDE class="quote no-group" data-username="SeditiousSov" data-post="6" data-topic="886"&gt;
SeditiousSov:
&lt;BLOCKQUOTE&gt;
&lt;PRE style="background : #f0f1f2;"&gt;&lt;CODE class="lang-auto"&gt;accesskey="&amp;lt;%= cypher.read('secret/accesskey') %&amp;gt;"
secretkey="&amp;lt;%= cypher.read('secret/secretkey') %&amp;gt;"	 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;/ASIDE&gt;
&lt;P&gt;My only other idea is one of your secrets is breaking the quoting of the rest of your script.  If your access or secret key have a &lt;CODE style="background : #f0f1f2;"&gt;"&lt;/CODE&gt; in it, it may be getting interpreted funky by the wrapping double quotes. If so, you could invert the wrapper like &lt;CODE style="background : #f0f1f2;"&gt;accesskey='&amp;lt;%= cypher.read("secret/accesskey") %&amp;gt;'&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;If you just do the echo user as it’s own task and run it, does that also break?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 16:30:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251812#M4986</guid>
      <dc:creator>cbunge</dc:creator>
      <dc:date>2023-02-27T16:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Provisioning Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251813#M4987</link>
      <description>&lt;P&gt;Correct it works for me.  May need a support case to understand why it’s not available to you. There’s also instance vars for display name and email those may get you past issues.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 22:35:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251813#M4987</guid>
      <dc:creator>cbunge</dc:creator>
      <dc:date>2023-03-02T22:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Provisioning Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251814#M4988</link>
      <description>&lt;P&gt;Thanks for that.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 17:41:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251814#M4988</guid>
      <dc:creator />
      <dc:date>2023-03-22T17:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Provisioning Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251815#M4989</link>
      <description>&lt;P&gt;So this variable was expanded in later versions of 5.4 … 5.4.11 is a very old version and will probably be resolved when you move to 6.0.2+ here in Q2&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 16:31:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251815#M4989</guid>
      <dc:creator />
      <dc:date>2023-03-22T16:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Provisioning Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251816#M4990</link>
      <description>&lt;P&gt;So just a note on that script for the future.  If you comment out a line with a Morpheus variable, we still do a find replace, so the fact that the &amp;lt;%=user.email%&amp;gt; is in there it’s still going to get interpreted by Morpheus.  That said:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;If  you just have a task &lt;CODE style="background : #f0f1f2;"&gt;echo "&amp;lt;%=user%&amp;gt;"&lt;/CODE&gt; and only run that, what do you get?&lt;/LI&gt;
&lt;LI&gt;What version of Morpheus are you on?&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Mon, 27 Feb 2023 13:06:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251816#M4990</guid>
      <dc:creator>cbunge</dc:creator>
      <dc:date>2023-02-27T13:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Provisioning Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251817#M4991</link>
      <description>&lt;P&gt;I can confirm that an owner is set.  It is set before it fails the provisioning workflow.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2023 21:57:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251817#M4991</guid>
      <dc:creator />
      <dc:date>2023-02-26T21:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Provisioning Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251818#M4992</link>
      <description>&lt;P&gt;Can you share the full script? Is this locally defined or pulling from git?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 12:06:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251818#M4992</guid>
      <dc:creator>cbunge</dc:creator>
      <dc:date>2023-02-27T12:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Provisioning Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251819#M4993</link>
      <description>&lt;P&gt;Following up,&lt;/P&gt;
&lt;P&gt;I created a new task, made sure the variables were hard coded names (for displayname and email) and still received the same error.&lt;/P&gt;
&lt;P&gt;Also a point to note, I only seem to get that error when I set the task to run local as the execute target.  If I set it to the “worker system” (remote to a host that handles tasks), I don’t get any output (even my bash echo’s).  It just fails with Task Execution Failed on Attempt.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2023 08:52:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251819#M4993</guid>
      <dc:creator />
      <dc:date>2023-02-26T08:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Provisioning Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251820#M4994</link>
      <description>&lt;ASIDE class="quote no-group" data-username="SeditiousSov" data-post="1" data-topic="886"&gt;
SeditiousSov:
&lt;BLOCKQUOTE&gt;
&lt;PRE style="background : #f0f1f2;"&gt;&lt;CODE class="lang-auto"&gt;displayname="&amp;lt;%= user.displayName %&amp;gt;"
email="&amp;lt;%= user.email %&amp;gt;"
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;/ASIDE&gt;
&lt;P&gt;Can you confirm if the instance has an owner assigned?&lt;/P&gt;
&lt;P&gt;You should see that on the instance summary page&lt;BR /&gt;
&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2023-02-26 at 4.17.03 pm"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/150272i11334ED0C69E32C7/image-size/large?v=v2&amp;amp;px=2000" role="button" title="697718166441f81545679b2e2f82409a21c02fa1.png" alt="697718166441f81545679b2e2f82409a21c02fa1.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;or can edit the instance and check&lt;BR /&gt;
&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2023-02-26 at 4.19.10 pm"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/150120i003CA5836CD278CF/image-size/large?v=v2&amp;amp;px=2000" role="button" title="2831d3d077a5019c6d59492bc19cb4088a502754.png" alt="2831d3d077a5019c6d59492bc19cb4088a502754.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2023 16:19:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251820#M4994</guid>
      <dc:creator>dgaharwar</dc:creator>
      <dc:date>2023-02-26T16:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Provisioning Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251821#M4995</link>
      <description>&lt;P&gt;It’s locally defined:&lt;/P&gt;
&lt;PRE style="background : #f0f1f2;"&gt;&lt;CODE class="lang-auto"&gt;#!/bin/bash
 
accesskey="&amp;lt;%= cypher.read('secret/accesskey') %&amp;gt;"
secretkey="&amp;lt;%= cypher.read('secret/secretkey') %&amp;gt;"	 
#displayname="&amp;lt;%= user.displayName %&amp;gt;"
#email="&amp;lt;%= user.email %&amp;gt;"
displayname="that one guy"
email="somewhere@something.com"
instance_id="&amp;lt;%= instance.id %&amp;gt;"
instance_name="&amp;lt;%= instance.name %&amp;gt;"
hostname="&amp;lt;%= instance.hostname %&amp;gt;"
now=$(date '+%m/%d/%Y')
appname="&amp;lt;%= customOptions.applicationName %&amp;gt;"
appgroup="&amp;lt;%= customOptions.applicationGroup %&amp;gt;"
appgroupcontact="&amp;lt;%= customOptions.applicationGroupContact %&amp;gt;"
environment="&amp;lt;%= customOptions.environment %&amp;gt;"
replication_tool="&amp;lt;%= customOptions.replicationTool %&amp;gt;"
ticket="&amp;lt;%= customOptions.serviceDeskTicket %&amp;gt;"
 
json=$(jq -n --arg instance_id "${instance_id}" --arg request_date "${now}" --arg application "${appname}" --arg application_group "${appgroup}" --arg application_group_contact "${appgroupcontact}" --arg environment "${environment}" --arg hostname "${hostname}" --arg replication_tool "${replication_tool}" --arg requester "${displayname}" --arg ticket "${ticket}" '$ARGS.named')
 
curl pu-cntutils-01.cac.com:8074/log -d 'requesttype=New_Build' -d "requester=${displayname}" -d "notes=${json}" -d "accesskey=${accesskey}" -d "secretkey=${secretkey}"
 
curl pu-cntutils-01.cac.com:8074/newbuild -d "instance_id=${instance_id}" -d "request_date=${now}" -d "application=${appname}" -d "application_group=${appgroup}" -d "application_group_contact=${appgroupcontact}" -d "environment=${environment}" -d "hostname=${hostname}" -d "replication_tool=${replication_tool}" -d "requester=${displayname}" -d "ticket=${ticket}" -d "accesskey=${accesskey}" -d "secretkey=${secretkey}"
 
exit 0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Feb 2023 12:11:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251821#M4995</guid>
      <dc:creator />
      <dc:date>2023-02-27T12:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Provisioning Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251822#M4996</link>
      <description>&lt;P&gt;That’s good to know that comments with morpheus variables are still parsed!  Thanks for that.&lt;BR /&gt;
The version is 5.4.11, we will be upgrading to whatever the latest LTS is at the start of Q2.&lt;/P&gt;
&lt;P&gt;Running the task without any &amp;lt;%=user%&amp;gt; variables in the code at all, works like a champ (but not being able to get the user executing the workflow/provision is problematic).&lt;/P&gt;
&lt;P&gt;Adding back in the user variable with &lt;CODE style="background : #f0f1f2;"&gt;echo "&amp;lt;%=user%&amp;gt;"&lt;/CODE&gt; gives me the failure.&lt;BR /&gt;
Could it be an integration that breaks the available vars?&lt;/P&gt;
&lt;P&gt;We have route 53, shared services, AWX (Ansible Tower) and Bitbucket enabled.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 14:23:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251822#M4996</guid>
      <dc:creator />
      <dc:date>2023-02-27T14:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Provisioning Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251823#M4997</link>
      <description>&lt;P&gt;I’ve got it working by bypassing the use of the user variable.  Now, I have a task that kicks off a routine that polls (every minute) morpheus for the GET instances api, and pulls the necessary data from that.  Not ideal, but it works for now.&lt;/P&gt;
&lt;P&gt;Just so I’m not crazy, using &lt;CODE style="background : #f0f1f2;"&gt;&amp;lt;%= user %&amp;gt;&lt;/CODE&gt; in a provisioning workflow &lt;EM&gt;does work&lt;/EM&gt; for you though right?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 19:58:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251823#M4997</guid>
      <dc:creator />
      <dc:date>2023-03-02T19:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Provisioning Workflow</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251824#M4998</link>
      <description>&lt;P&gt;So a simple task with nothing but:&lt;/P&gt;
&lt;PRE style="background : #f0f1f2;"&gt;&lt;CODE class="lang-auto"&gt;#!/bin/bash
echo "&amp;lt;%= user %&amp;gt;"
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Fails on provision and post provision.   It very clearly does &lt;EM&gt;not&lt;/EM&gt; like the user object.&lt;/P&gt;
&lt;P&gt;It works perfectly fine in an operational workflow.&lt;/P&gt;
&lt;P&gt;I guess I could write some go code that gets called from the provisioning workflow, in a thread (goroutine), so that it can return immediately (so the provisioning workflow completes), wait and then kicks off the workflow as an operational to get all the variables it needs.&lt;/P&gt;
&lt;P&gt;Seems like a bit of an obtuse way to do it.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 10:55:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise-software/error-on-provisioning-workflow/m-p/7251824#M4998</guid>
      <dc:creator />
      <dc:date>2023-02-28T10:55:26Z</dc:date>
    </item>
  </channel>
</rss>

