<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 8, 2016 at 7:12 PM, Michal Skrivanek <span dir="ltr"><<a href="mailto:mskrivan@redhat.com" target="_blank">mskrivan@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> On 08 Nov 2016, at 17:52, Martin Sivak <<a href="mailto:msivak@redhat.com">msivak@redhat.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> mom-vdsm.service contains:<br>
><br>
> Requires=vdsmd.service<br>
> After=vdsmd.service<br>
><br>
> So when Shira restarted vdsm, mom was also restarted.<br></blockquote><div><br></div><div>What is the reason to restart mom when VDSM is restarted?</div><div>Y.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
><br>
> [journalctl --unit vdsmd]<br>
> Nov 08 18:25:27 RHEL7.2Server systemd[1]: Stopping Virtual Desktop<br>
> Server Manager...<br>
> Nov 08 18:25:27 RHEL7.2Server vdsmd_init_common.sh[3053]: vdsm:<br>
> Running run_final_hooks<br>
> Nov 08 18:25:27 RHEL7.2Server systemd[1]: Starting Virtual Desktop<br>
> Server Manager...<br>
><br>
> [journalctl --unit mom-vdsm]<br>
> Nov 08 18:17:23 RHEL7.2Server systemd[1]: Starting MOM instance<br>
> configured for VDSM purposes...<br>
> Nov 08 18:25:16 RHEL7.2Server systemd[1]: Stopping MOM instance<br>
> configured for VDSM purposes...<br>
> Nov 08 18:25:29 RHEL7.2Server systemd[1]: Started MOM instance<br>
> configured for VDSM purposes.<br>
><br>
><br>
> But mom then immediately failed with:<br>
><br>
> 2016-11-08 18:25:08,008 - mom.RPCServer - INFO - ping()<br>
> 2016-11-08 18:25:08,010 - mom.RPCServer - INFO - getStatistics()<br>
> 2016-11-08 18:25:17,028 - mom.RPCServer - INFO - RPC Server ending<br>
> 2016-11-08 18:25:24,705 - mom.GuestManager - INFO - Guest Manager ending<br>
> 2016-11-08 18:25:26,575 - mom.HostMonitor - INFO - Host Monitor ending<br>
><br>
> 2016-11-08 18:25:29,869 - mom - INFO - MOM starting<br>
> 2016-11-08 18:25:29,905 - mom.HostMonitor - INFO - Host Monitor starting<br>
> 2016-11-08 18:25:29,905 - mom - INFO - hypervisor interface vdsmjsonrpcbulk<br>
> 2016-11-08 18:25:30,029 - mom.vdsmInterface - ERROR - Cannot connect<br>
> to VDSM! [Errno 111] Connection refused<br>
> 2016-11-08 18:25:30,030 - mom - ERROR - Failed to initialize MOM threads<br>
> Traceback (most recent call last):<br>
> File "/usr/lib/python2.7/site-<wbr>packages/mom/__init__.py", line 29, in run<br>
> hypervisor_iface = self.get_hypervisor_interface(<wbr>)<br>
> File "/usr/lib/python2.7/site-<wbr>packages/mom/__init__.py", line 217,<br>
> in get_hypervisor_interface<br>
> return module.instance(self.config)<br>
> File "/usr/lib/python2.7/site-<wbr>packages/mom/<wbr>HypervisorInterfaces/<wbr>vdsmjsonrpcbulkInterface.py",<br>
> line 47, in instance<br>
> return JsonRpcVdsmBulkInterface()<br>
> File "/usr/lib/python2.7/site-<wbr>packages/mom/<wbr>HypervisorInterfaces/<wbr>vdsmjsonrpcbulkInterface.py",<br>
> line 29, in __init__<br>
> super(<wbr>JsonRpcVdsmBulkInterface, self).__init__()<br>
> File "/usr/lib/python2.7/site-<wbr>packages/mom/<wbr>HypervisorInterfaces/<wbr>vdsmjsonrpcInterface.py",<br>
> line 43, in __init__<br>
> .orRaise(RuntimeError, 'No connection to VDSM.')<br>
> File "/usr/lib/python2.7/site-<wbr>packages/mom/optional.py", line 28, in orRaise<br>
> raise exception(*args, **kwargs)<br>
> RuntimeError: No connection to VDSM.<br>
><br>
><br>
> The question here is, how much time does VDSM need to allow jsonrpc to<br>
> connect and request a ping and list of VMs?<br>
<br>
The only correct answer is - when it's ready and responds with success rather than either not respond at all(as in your case) or with "recovering from crash or initializing" code<br>
<br>
><br>
><br>
> Martin<br>
> ______________________________<wbr>_________________<br>
> vdsm-devel mailing list -- <a href="mailto:vdsm-devel@lists.fedorahosted.org">vdsm-devel@lists.fedorahosted.<wbr>org</a><br>
> To unsubscribe send an email to <a href="mailto:vdsm-devel-leave@lists.fedorahosted.org">vdsm-devel-leave@lists.<wbr>fedorahosted.org</a><br>
><br>
><br>
______________________________<wbr>_________________<br>
Devel mailing list<br>
<a href="mailto:Devel@ovirt.org">Devel@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/devel</a><br>
</blockquote></div><br></div></div>