On Wed, 2016-04-13 at 09:19 +0300, Yedidyah Bar David wrote: > On Wed, Apr 13, 2016 at 12:03 AM, Brett I. Holcomb > com> wrote: > > > > snipped > > > > One question I have as I read this. In a hosted-engine environment how > > do I use the SDK to tell if the Engine VM is running. I could dump a > > hosted-engine --vm-status and parse it's output but is there a better > > way. Assuming that since the host is running the Engine is does not > > always hold true. > >
> > > You can simply try to connect to the api. If you succeed, the engine is up. > > You can also use this url, which is what hosted-engine > --deploy uses: > > http://{fqdn}/ovirt-engine/services/health > {fqdn}/ovirt-engine/services/health > > Not sure why we keep using it, as it was considered deprecated at some point, > see this: > > https://bugzilla.redhat.com/show_bug.cgi?id=1026723> https://gerrit.ovirt.org/20846 > > > If you want more, you can write something and start from the file implementing > --vm-status, ovirt_hosted_engine_setup/vm_status.py . It uses > ovirt_hosted_engine_ha.client to get the data and does rather shallow > massaging > around that. Not sure ovirt_hosted_engine_ha.client is an official API, IIRC > no > other project uses it, and even if it is, it's still not part of the engine > API. > > Another option is to add an option to --vm-status to output machine-readable > info. patches are welcome :-) > > Best, > Thanks. I'll go with the if api connects engine running if not engine down method. I don't want to use a deprecated method and I'll stick with whats part of the API.
_______________________________________________ Users mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/users

