VMware Cloud Community
LukasWe
Enthusiast
Enthusiast

vRO 7.3: Object cannot be passed to sub-workflow

Hi guys,

recently we upgraded from vRO 7.2. to 7.3 and we noticed a strange behavior in one of our workflows.

During cloning of a VM we are using the VMware Workflow "Get a VirtualEthernetCard to change the network" as a sub-workflow which takes a source virtual Ethernet card and a network as input parameter.

Since we are cloning it from a template VM we are passing the first NIC of the clone as source virtual Ethernet card to this workflow.

With 7.2 this worked without any problems, but with 7.3. the sub-workflow is not executing any code at all. It immediately stops with following error:

[2018-03-20 13:42:14.639] [E] Workflow:Get a VirtualEthernetCard to change the network / Get key (item3) : java.util.NoSuchElementException: No value present
[2018-03-20 13:42:14.651] [E] Workflow execution stack:
***
item: 'Get a VirtualEthernetCard to changthe network/item3', state: 'failed', business state: 'null', exception: 'No value present'
workflow: 'Virtual Ethernet Card Test' (5e6ba5b9-a8c9-4261-bbda-ef57386b4626)
|  'attribute': name=sourceVirtualEthernetCard type=Any value=pojo#+AAJMAApleHRlcm5hbElkcQB+AAJMAAptYWNBZGRyZXNzcQB=
|  'input': name=cloneVm type=VC:VirtualMachine value=dunes://service.dunes.ch/CustomSDKObject?id='myvcenter.domain.com%2Cid:vm-12345'&dunesName='VC:VirtualMachine'
|  'output': name=virtuaEthernetCard type=Any value=null
--workflow: 'Get a VirtualEthernetCard to change the network' (BD8080808080808080808080808080808AC280800122528313869552e41805bb1)
  |  'attribute': name=key type=number value=0.0
  |  'attribute': name=backing type=Any value=__NULL__
  |  'attribute': name=deviceName type=string value=
  |  'attribute': name=notSupportedDeviceType type=string value=The device type is not supported
  |  'input': name=sourceVirtualEthernetCard type=Any value=pojo#+AAJMAApleHRlcm5hbElkcQB+AAJMAAptYWNBZGRyZXNzcQB[...]=
  |  'input': name=network type=Any value=null
  |  'output': name=virtualEthernetCard type=Any value=null
*** End of execution stack.

I noticed in general following difference between 7.2. and 7.3.:

  • Objects are always referenced via an Wrapper object e.g.
    • [VcVirtualMachine]-[class com.vmware.o11n.plugin.vsphere_gen.VirtualMachine_Wrapper]
    • instead of previously [VcVirtualMachine]-[class com.vmware.vmo.plugin.vi4.model.VimVirtualMachine]

I am not sure if this is related to the error above but I guess so because I've never seen before that an object is referenced in the error details as a POJO. The object is in reality a VcVirtualVmxnet3 - maybe this is not passable/serializable anymore... For other objects, e.g. VcDistributedVirtualPortgroup, VcClusterComputeResource it is working so it think for objects which cannot be used as a type in parameters this happens.

I attached a simplified workflow which throws this error (at least on my vRO Smiley Happy).

Does anybody noticed a same behavior?

Regards,

Lukas

Reply
0 Kudos
6 Replies
iiliev
VMware Employee
VMware Employee

The differences between 7.2 and 7.3 you are observing are because in 7.3 there is a completely new implementation of vCenter plug-in.

As for the error itself, I'll try to reproduce it in my environment. Which version of vCenter server do you use?

Meantime, if you have a test environment, could you check if updating the vCenter plug-in with a newer technical preview build (available for download here in the forums) makes any difference?

Reply
0 Kudos
LukasWe
Enthusiast
Enthusiast

Hi Ilian,

we are using vCenter Server 6.5.0 Build 780151.

Good idea to check if it is working with the latest preview.

Reply
0 Kudos
iiliev
VMware Employee
VMware Employee

I wasn't able the reproduce the same error in my 7.3 environmant. I got a diffrent error ("network cannot be null"), but it is expected as you don't provide a value for the input parameter 'network'.

'sourceVirtualEthernetCard' is also serialized as POJO, although the serialized value in my environment is quite a bit longer than the value shown on your error dump.

Reply
0 Kudos
LukasWe
Enthusiast
Enthusiast

Thanks for trying to reproduce the error. Yes it is working if the "network cannot be null" error appears, but on my system it just doesn't because no line is executed at all (tested it with log statements in the beginning of the first script block).

Ok thanks for the information that the 'sourceVirtualEthernetCard' is also a POJO. My serialized value was also a bit longer but I shortened it to improve the readability.

Reply
0 Kudos
virtualbailey
Contributor
Contributor

I am encountering this exact issue on 7.3.  Older vCO version is not exhibiting it.  Did you have any success?

Reply
0 Kudos
LukasWe
Enthusiast
Enthusiast

Unfortunately not. I implemented a workaround by copying the original "Get a VirtualEthernetCard to change the network" workflow and adapting the input parameters. As the workflow is just using the Key (number) and Classname (string) of the sourceVirtualEthernetCard (Any) object I removed the sourceVirtualEthernetCard parameter and added the two parameters for the key and the classname and adapted the workflow code to use the new parameters.

I attached the workflow if you need it.

Reply
0 Kudos