I added a host to vcenter and went to select it by browsing the inventory to select a host object when starting my workflow. Host was available to select any everything was fine.
The workflow failed after removing the host from vcenter so I added the host back to vcenter manually so I could retry my workflow.
Now when I try to rerun the workflow the host isn't showing up inventory. In the code I can do a cluster.host and I see the host in there but I can't select it . If I go to the inventory view and drill down i don't see the host their either. If I wait several hours eventually the host will appear.
This is vRO 7.6 (embedded in vra) and the vcenter plugin version is 184.108.40.20699420.
Is there anything i can do to force a refresh (right click > reload doesn't do anything)?
Hmm, sounds like some sort of caching issue.
Here are some system properties you can play with to control various lifetimes / caches in vCenter plug-in (the semantics should be clear from the property names ):
default value: false
default value: 14400 (4 hours)
default value: 14400 (4 hours)
Note that after changing the values of these properties you may need to restart vRO server service for changes to take effect.
I tried the first option, clearOnSessionRefresh, and it seems to help. If the UI isn't updated then I can go to the inventory, right click on vcenter, choose reload and the item appear.
Clicking on the cluster or datacenter and reloading doesn't work. It has to be at vcenter level.
Based on the name I assume there's no extra load placed on the server and this only forces a cache refresh when I do the reload from the inventory view?
If anyone else is interested, clearOnSessionRefresh doesn't work in HTML5 client since there's no option to refresh as far as I can tell which means this won't work in version 8.
I'm on 7.6. My colleague is testing 8.0 and I see there's a little arrow next to the word Inventory at the top of the page. That's the same as the right-click > reload option in the java client? Looks like it reloads everything on that page (my vcenter isn't connected into that instance to test at the moment)
Finally got a chance to try this on 8.0.1 and it doesn't work. The I added the OnSessionRefresh property and when the problem happened again the little refresh icon didn't do anything.
Seems like I can click on different items in the tree and clicking the refresh arrow appears to refresh just that item that is selected but no matter what level of the vcenter plugin i tried, it didn't help.
What did seem to help was setting : com.vmware.vmo.plugin.vi4.cache.main.expirationSeconds to a very low value (120 seconds) and that seems to work but I'm thinking that with a very low value and lots of items this is going to cause a problem.
What seems to make the inventory disappear on me reliably is a failure in my workflow where I select a host object as the an input.
Edit: I forgot to mention I'm triggering my workflow in vRO 7.6 via java client and the inventory disappears in both 7.6 and 8.0.1 after the workflow ends in failure. Both vRO instances are pointed to the same vcenter.
Do you rerun the past successful workflow run?
If yes, rerun will take the same parameters as in the previous run.
As you have removed the host from vCenter and added it back, the host got a new ID in vCenter.
Nothing to do with re-running from a previous token.
I opened a support case and we reproduced the problem on the call by simply running the built-in Remove host workflow.
Take a cluster with 3 hosts and remove one with that workflow.
Run the workflow again to remove another host (in the same cluster) but there's no hosts to select. The local datastores from the hosts can be seen but not the hosts. Other clusters are unaffected, only the cluster where the removed host was has the disappearing problem.
After the timer expires and the cache refreshes (or the forced reload on 7.6) the hosts appear again.