Czernobog
Expert
Expert

vRA 8.4 - changing constraint tag / network assignments on network resource during deployment?

I know updating of the deployment object itself is possible - you can edit some deployment properties or custom properties by returning them in the correct schema by triggering a ABX/vRO action on a relevant extensibility event.
As far as I understand it, all properties that are not listed as "read only" in the relevant event topic description can be modified this way.
Changing some of those properties, even though that the value change itself works, does not seem to have an impact on the deployment process.

There approach I have tried so far is to create an event subscription (blocking) on the "Network Configure" event and use a vRO workflow to change the content of the "networkSelectionIds" array. This variable is mentioned in the event topic schema and includes networks that will be attached the the vms' network adapters. The output of the vRO workflow is a array/string variable "networkSelectionIds".
I first parse the inputProperties payload and the modify the above mentioned array, for example by putting completely different networks or just removing one element from it, in the end passing it as a workflow output. The workflow runs without issues, but there is nothing changed - the configuration that is done in the user form is applied without change.
The Network Configure event runs during the allocation phase, that is, before the objects are provisioned - so why is the change not applied?
Using this method (event subscription) to modify other components, like changing the resource names or deployment descritpion works fine. No idea why I cannot change the network assignemnts.
I wanted to try this by triggering a REST call by vRO workflow, that would be triggered on one of the configuration events however there is no query that would allow me to PATCH a deployment resource - only deployments themselves can be changed it seems.

An ideal solution would be to be able to modify the constraint tags on the requested resources, based on user inputs or some other factors. It seems logical to me for the constraint tags to be modifiable during allocation phase, however I could not find a way to modify those, there is no PATCH or POST method in the API documentation mentioned that would allow you to modify a resource directly.

I know all possible configuration changes could be simply done by triggering vRO workflows and modifying the resources directly in vSphere, but that would mean the changes would not be reflected in vRA, which in turn would lead to the need for workarounds for reconfiguring the resource in vRA. Or so I understand it.

Does anyone know if there is a way to modify a network selection during the allocation phase?

0 Kudos
2 Replies
emacintosh
Enthusiast
Enthusiast

There's a lot to parse there, so sorry if I misunderstand any/all of it.

I think I've seen others out here also complaining about networkSelectionIds - maybe not the same issue, but issues with that field as well.  We don't use it currently, but your problem sounds worthy of an SR?

If I understand the API correctly, which I may not, the resources in a deployment are also part of the IaaS API.  It seems like the objects in the IaaS API represent the actual resource, which is then also referenced in the Deployment API.  That said, maybe something modifying tags at an endpoint like this might help:  /iaas/api/fabric-networks/{id}.  I think you can find the ID you need here somehwere in the resource in your deployment through that API.  That said, modifying tags during deployment could maybe negatively affect other deployments?  Not sure, just wanted to mention.

Finally, it's my understanding (could be wrong) that vRA does all of its placement logic prior to handing off to us in the allocation phase.  Meaning, it's already found the matching resources based on the tags.  It hasn't actually done the placement yet, but it has narrowed it down.  So we can still modify that placement during allocation, but we're only going to "see" those resources vRA has already found.  

For example, we manually pick the cluster from the array hostSelectionIds that vRA passes to us during the allocation phase.  So our constraint tags allow vRA to limit it down to specific clusters, and then we choose one ourself, by replacing that array with a single item - similar to what you were trying to with networkSelectionIds.

In general, I would love to see more details about how all of these fields work and what all of the various algorithms that vRA uses.  But I think most of their documentation is really high-level and not super helpful.

 

Czernobog
Expert
Expert


@emacintosh wrote:

Finally, it's my understanding (could be wrong) that vRA does all of its placement logic prior to handing off to us in the allocation phase.  Meaning, it's already found the matching resources based on the tags.  It hasn't actually done the placement yet, but it has narrowed it down.  So we can still modify that placement during allocation, but we're only going to "see" those resources vRA has already found.  


This is exactly what I have an issue with. My understanding is that, before the allocation phase, there is the request phase (Deployment Request), similar in how it was in vRA 7. I would like to still be able to have influence on the constraints during that phase, but it seems that those are applied before the first lifecycle event is triggered.

As for the network settings specificly - the "Network Configure" event schema contains a "networkSelectionIds" property, which is an array of network IDs, that could get attached to the provisioned systems' network interfaces. The property is writeable. I have tried to write modified values back to vRA during this event, but this has no effect, but also throws no error. I'm not sure if this is my fault, or a bug.

0 Kudos