VMware Cloud Community
debian01
Contributor
Contributor

Blueprint not passing strings from vRA to vRO in 7.2

Hello,

I have a Blueprint that has the following ExternalWF

ExternalWFStubs.BuildingMachine

ExternalWFStubs.BuildingMachine.fqdn

ExternalWFStubs.BuildingMachine.location

ExternalWFStubs.BuildingMachine.vcacVM

ExternalWFStubs.BuildingMachine.vcacHost

When I run this in vRO it works. When I try to run it from vRA it seems to not pass the variables so it errors out saying the strings are null. Anyone come across this? I did use the "Assign a state change workflow to a blueprint and its virtual machines" workflow to get the Custom Properties above to show in the vRA Blueprint. Any help would be appreciated...

vCAC:VirtualMachine and vCAC:VCACHost both appear Null so the script fails out via vRA..

via vRO

[2017-01-18 14:06:21.128] [I] System info: hostName=P-BLUECAT-101|version=8.1.1-100.GA.bcn|address=172.27.80.60|clusterRole=PRIMARY|replicationRole=PRIMARY|replicationStatus=ON|entityCount=117585|databaseSize=90.46MB|loggedInUsers=6|

[2017-01-18 14:06:21.237] [I] calling API with: 0,IAA-Internal,Configuration

[2017-01-18 14:06:21.268] [I] Configuration,108122

[2017-01-18 14:06:21.296] [I] TagGroup,110728

[2017-01-18 14:06:21.317] [I] Tag,110732

[2017-01-18 14:06:21.339] [I] Tag,110734

[2017-01-18 14:06:21.381] [I] IP4Network,109841

[2017-01-18 14:06:21.431] [I] Netmask: 255.255.255.0

[2017-01-18 14:06:21.436] [I] Free IP: 10.104.1.12

[2017-01-18 14:06:21.466] [I] View: 108204

[2017-01-18 14:06:21.533] [I] IP_id: 118986

[2017-01-18 14:06:22.029] [I] Found property VirtualMachine.Imported.Component = Win2012R2Std64Bit_Prod

[2017-01-18 14:06:22.039] [I] Found property VirtualMachine.Imported.ConvergedBlueprint = SEOnlyServerWin2012R2StdProd

[2017-01-18 14:06:22.047] [I] Found property VirtualMachine.Imported.DeploymentName = CDC01.it.local

[2017-01-18 14:06:22.058] [I] Found property VirtualMachine.Network0.Address = 172.17.65.113

via vRA Blueprint

[2017-01-19 12:13:27.287] [I] System info: hostName=P-BLUECAT-101|version=8.1.1-100.GA.bcn|address=172.27.80.60|clusterRole=PRIMARY|replicationRole=PRIMARY|replicationStatus=ON|entityCount=117585|databaseSize=90.50MB|loggedInUsers=4|

[2017-01-19 12:13:27.409] [I] calling API with: 0,IAA-Internal,Configuration

[2017-01-19 12:13:27.468] [I] Configuration,108122

[2017-01-19 12:13:27.519] [I] TagGroup,110728

[2017-01-19 12:13:27.580] [I] null,0

[2017-01-19 12:13:27.680] [I] null,0

[2017-01-19 12:13:28.022] [I] ERROR: java.lang.reflect.InvocationTargetException (Workflow:GetIP-IPAM / Scriptable task (item0)#35)

[2017-01-19 12:13:28.077] [E] Workflow execution stack:

***

item: 'GetIP-IPAM/item4', state: 'failed', business state: 'null', exception: 'InternalError: java.lang.reflect.InvocationTargetException (Workflow:GetIP-IPAM / Scriptable task (item0)#35) (Workflow:GetIP-IPAM / Scriptable task (item0)#98)'

workflow: 'GetIP-IPAM' (1f293c5b-f7ed-499d-a88f-8112dc28c761)

|  'attribute': name=errorCode type=string value=InternalError: java.lang.reflect.InvocationTargetException (Workflow:GetIP-IPAM / Scriptable task (item0)#35) (Workflow:GetIP-IPAM / Scriptable task (item0)#98)

|  'attribute': name=profileName type=string value=prodipambam

|  'attribute': name=configName type=string value=IAA-Internal

|  'attribute': name=viewName type=string value=IAA

|  'attribute': name=TopTag type=string value=Location

|  'input': name=fqdn type=string value=

|  'input': name=location type=string value=

|  'input': name=vcacVM type=vCAC:VirtualMachine value=null

|  'input': name=vcacHost type=vCAC:VCACHost value=null

|  'output': name=ipaddress type=string value=null

|  'output': name=gateway type=string value=null

|  'output': name=netmask type=string value=null

|  'attribute': name=lifecycleState type=string value={"phase":"POST","state":"VMPSMasterWorkflow32.BuildingMachine"}

|  'attribute': name=componentId type=string value=Windows2016Std64Bit

|  'attribute': name=blueprintName type=string value=Windows2016Std

|  'attribute': name=endpointId type=string value=49ddd3b5-ffec-4d13-a982-b13929c78641

|  'attribute': name=__asd_requestedBy type=string value=me@domain.com

|  'attribute': name=__asd_tenantRef type=string value=vsphere.local

|  'attribute': name=__asd_targetResourceProviderTypeId type=string value=com.vmware.csp.iaas.blueprint.service

|  'attribute': name=__asd_requestInstanceId type=string value=f5418a50-de72-11e6-8492-817107a4417c

|  'attribute': name=__asd_requestInstanceTypeId type=string value=com.vmware.csp.iaas.blueprint.service.machine.lifecycle.provision

|  'attribute': name=__asd_catalogRequestId type=string value=fcc5fc30-a0fd-404d-8f76-33f2776164fb

|  'attribute': name=componentTypeId type=string value=Infrastructure.CatalogItem.Machine.Virtual.vSphere

|  'attribute': name=IaaSTimeoutId type=string value=30731

|  'attribute': name=machine type=string value={"name":"LVRATEST33","externalReference":"vm-19565","owner":"me@domain.com","id":"1e138abc-ae89-4e58-a6db-345ccdec24ce","type":0,"properties":null}

|  'attribute': name=requestId type=string value=4e23d641-1d90-4d6e-bf55-9236fb3a0181

|  'attribute': name=__asd_requestedFor type=string value=me@domain.com

|  'attribute': name=__asd_targetResourceId type=string value=1e138abc-ae89-4e58-a6db-345ccdec24ce

|  'attribute': name=__asd_requestInstanceTimestamp type=string value="2017-01-19T12:13:20.000-06:00"

|  'attribute': name=__asd_targetResourceTypeId type=string value=machine

|  'attribute': name=__asd_correlationId type=string value=76b13dde-c1ba-432b-9459-56fe02c06f38

|  'attribute': name=__asd_requestTraceId type=string value=EvPsSVxr

|  'attribute': name=__asd_targetResourceProviderId type=string value=b5cbdcf8-9d16-464b-9767-edf6bdd5f1c3

*** End of execution stack.

Reply
0 Kudos
7 Replies
SeanKohler
Expert
Expert

I recommend looking into the Event broker subscriptions to run workflows instead of going the ExternalWFStubs route.

vRealize Automation 7.2 Information Center

Reply
0 Kudos
debian01
Contributor
Contributor

Thanks, is that due to past experience? It seems ExternalWFStubs are deprecated but should still work according to documentation.

Is this what you are referring to for Event Broker?

vRealize Automation 7.2 Information Center

Also, would you know of any blog posts that show the process?

Thanks!

Mike

Reply
0 Kudos
SeanKohler
Expert
Expert

You can give Ryan's blog a try....

http://www.vmtocloud.com/vra7-to-vro-extensibility-magic-secrets-revealed-part-1/

The reality is that the Event Subscriptions give you a lot more flexibility running any workflow on a multitude of life cycle states (with conditions).

Deprecated or not,working or not... the stubs don't give you any added value over using subscriptions and the upside to the subscriptions is significant.

Reply
0 Kudos
debian01
Contributor
Contributor

Totally understand but I'm in a bad spot where Bluecat has a plugin that works up to 7.1 and now it doesn't work even though vRA 7.2 claims it should still work. I have no idea how to make the plugin work with Event Brokers and it's not how the Bluecat people designed their plugin to work yet so I basically have a useless IPAM solution now... To add to it, I am new to vRA as our vRA admin left Smiley Sad

Reply
0 Kudos
filosmith
Enthusiast
Enthusiast

I'm pretty sure vRA can only pass strings to vRO. Change the input type to a string, pass the names of the things you need, and then run a little workflow at the start of your other workflow to look up the objects by name.

Reply
0 Kudos
SeanKohler
Expert
Expert

No that isn't necessarily true.  Within property definitions... kinda... though bool, datetime, decimal, integer, string and securestring are all possible.

Using strings in XaaS forms is the method that I prefer.  Strings (and string array lists) are faster in all forms, and look-ups during execution are not hard usually hard to do.

Any resource type, or custom resource type, can be referenced in a form.  You have an AD:User input in a VRO workflow (for example), and front that workflow with an XaaS (or ASD) form and you will get the selector for picking an AD:User.

But what I generally do is have a vRO action created that does a string lookup of the AD:User property I want with the filter criteria I need.  (For example, all AD users that are part of this business group.)  It ends up being a drop-down of user names in the format that I want them to be.  Then when submitted the string fulfills the vRO input for the string user... and then I have an action in the execution of the workflow that finds the AD object I need to do whatever work I am doing.  (like add the user to a group)

Reply
0 Kudos
SeanKohler
Expert
Expert

With regard to the Bluecat plugin (which I do not have on hand but have played with some)... the commands that you use for the plugin can be done in any scripting object.  The challenge is getting the IP through the plugin functions at the right time and injecting it back into vRA to be used during provisioning.  The Event subscriptions allow you to interject information into the build process by running worklfows at just about any phase of the machine lifecycle.

Using the custom property reference (https://pubs.vmware.com/vrealize-automation-72/topic/com.vmware.ICbase/PDF/vrealize-automation-72-cu...), we can see that there are network properties that can be overwritten to provide the network payload on build.

This payload is held in the vCAC:Entity on provisioning, and if we jump in there with a "blocking" subscription... we can get the entiity and overwrite anything in the properties.  (machine name, IP, etc etc)  Since this is done by kicking us out into VRO, we can run the Bluecat plugin commands to get an IP address (subnet, etc are also required). 

Reply
0 Kudos