Hello,
We have an OpenStack provider in which we create new instances also outside of ManageIQ.
We would like to create a service which would be launched after these instances creation.
The purpose of this service is search for these new VM’s (using their ems_ref attribute) and apply some tags and other stuff via automate engine.
We think that the way to discover new instances is through EMS refresh (please, correct me if I am wrong).
It’s very probable that this service is requested several times at the same time so we have the doubt about how to manage these refresh tasks.
We don’t want to saturate ManageIQ with several refresh tasks so we think that a proper way to achieve this could be with the following steps:
Check if there is some refresh task active or queued for this provider:
if true: wait for finish and search for the VM. If the VM is not found, launch another refresh task.
if false: launch a refresh task.
So, after all, my question is: how could we check if a provider is running a refresh task or it has this task queued?
Another option that occurs to us is: is there some way to send an event, task or something similar to search for an instance in the provider using the ems_ref attribute and if it’s found, register it in vmdb?
Thanks a lot,
Regards