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