Hello,
I use the method below to find a VM by its name across 5 vCenters. This morning I ran into an issue where one of the vCenters were not responding and as a result a workflow that was using the Action where this code resides was stalled until the specific vCenter starting responding after a reboot. The workflow was stalled at this point for 3 hours and 20 minutes. I'm assuming it would have stayed in this "stalled" state for longer if it wasn't discovered that a vCenter was not responding.
var vms = VcPlugin.getAllVirtualMachines(null, "xpath:name[translate(.,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')='" + arg_nameToMatch.toUpperCase() + "']");
I'm looking for some advice on how to keep this method from stalling in the event a vCenter stops responding?
I've thought about
- Adding a timer (similar to the WaitTaskEnd) to timeout the action, but once the method below is executed a timer couldn't apply
- Having a workflow on a recurring schedule to validate the vCenter's and if one isn't responding possibly disable it (I haven't looked into the feasibility of this yet)
Thank you!