VMware Cloud Community
draymond10
Enthusiast
Enthusiast

Infoblox plugin - Allocate workflow input

Just having issues with incorrect hostnames being registered in Infoblox.

We customize the host name in a vRO workflow triggered by  VMPS32.Requested lifecycle state PRE; and update the vcac:Entity with the new hostname.  Shows up in vRA fine new hostname.  Registers original hostname generated via machine prefix in Infoblox. 

For a while I was trying to figure out exactly how the "Allocate" Infoblox workflow was being triggered; seems when you register the endpoint during plugin setup, a hard-coded vRO Workflow ID is being set (which is the Allocate workflow)  What I don't understand is how this actually gets triggered by vRA since we dont set a subscription  event.  It just fires somehow during provisioning

2nd thing I noticed is that the Allocate workflow is being passed  a few variables; one of which is Resource (CompositeType).  The 'Name' key in this Resource has a value of the 'machinePrefix_name'.  When I rerun this allocation by changing that value to a custom hostname, registration in NIOS completes successfully. I just need to know where / how that 'Resource' input value is being passed from vRA to vRO to the 'Allocate' workflow; and potentially how to update what values it's passing Any help greatly appreciated Happy Thanksgiving!

0 Kudos
3 Replies
xian_
Expert
Expert

If you check the History tab of a VM provisioning deployment, you'll see the following tasks:

Submitted

Pre-approval

     (any approval levels show up here)

Provisioning

     Allocate

     Provision

Post-approval

Completed

The IPAM plugin triggered in the Allocate tasks, before Provision begins. This is hard-coded so you don't see any EBS in the GUI.

Just because this happens before your normal EBS subscriptions, you won't be able to modify the input it receives by a workflow. (Actually, there is a way to do that with an approval workflow, but this is a hacky way and has to be enabled on each business group by an entitlement, plus the approval can be switched off by the BG manager). The Resource input does include the hostname (Name field) plus all the custom properties defined at request time.

This hostname is set at request time: either by vRA using the machine prefix, or an action triggered on the form itself.

In our case we generate unique hostname for each VM based on the inputs (function, location, OS) and register the names in a table. Running this action on the request form has a few disadvantages: makes the form slower to respond and we cannot detect if the user hits Cancel, so the hostname remains registered even if it was never used.

So we implemented a different approach: we update the hostname before the provision starts by an EBS (just like you), and when the machine provisioning is completed, we update the hostname in the IPAM system with a REST api call (as the IP is already registered with the vRA machine prefix). We don't use Infoblox, but I'm pretty sure the same is possible with it.

I'm not sure if the Infoblox workflows can be modified, but if you are interested, check the IPAM SDK and you can dump all the inputs vRA sends to the workflow by registering the SDK sample implementation as an IPAM provider.

0 Kudos
stevedrummond
Hot Shot
Hot Shot

It's a known issue with the Infoblox implementation. I actually thought it got fixed a while ago? People had to update the record in Infoblox after the fact (identifying the record via IP Address).

What version of vRA and Infoblox?

0 Kudos
draymond10
Enthusiast
Enthusiast

Very helpful...thanks both of you Version: 8.2.2-363203 – infoblox Version: 7.6.0 (Build: 13027133) - vRA

0 Kudos