<div dir="ltr"><div>hi<span style="font-weight:bold">,<br><br></span></div><div>we are failing randomly on test 006_migrations.migrate_vm with what seems to be the same issue. <br></div><div><br></div><div>the vm seems to be migrated successfully but engine thinks that it failed and re-calls migration getting a response of vm already exists. <br><br></div><div>I don&#39;t think this is an issue with the test but rather a regression so I opened a bug: <br><br><a href="https://bugzilla.redhat.com/show_bug.cgi?id=1566594">https://bugzilla.redhat.com/show_bug.cgi?id=1566594</a><br><br></div><div>Thanks, <br></div><div>Dafna<br><span style="font-weight:bold"><span style="font-weight:bold"><br></span></span></div><span style="font-weight:bold"></span></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 11, 2018 at 1:52 PM, Milan Zamazal <span dir="ltr">&lt;<a href="mailto:mzamazal@redhat.com" target="_blank">mzamazal@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"><span class="">Arik Hadas &lt;<a href="mailto:ahadas@redhat.com">ahadas@redhat.com</a>&gt; writes:<br>
<br>
&gt; On Wed, Apr 11, 2018 at 12:45 PM, Alona Kaplan &lt;<a href="mailto:alkaplan@redhat.com">alkaplan@redhat.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Apr 10, 2018 at 6:52 PM, Gal Ben Haim &lt;<a href="mailto:gbenhaim@redhat.com">gbenhaim@redhat.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; I&#39;m seeing the same error in [1], during 006_migrations.migrate_vm.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; [1] <a href="http://jenkins.ovirt.org/job/ovirt-4.2_change-queue-tester/1650/" rel="noreferrer" target="_blank">http://jenkins.ovirt.org/job/<wbr>ovirt-4.2_change-queue-tester/<wbr>1650/</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Seems like another bug. The migration failed since for some reason the vm<br>
&gt;&gt; is already defined on the destination host.<br>
&gt;&gt;<br>
&gt;&gt; 2018-04-10 11:08:08,685-0400 ERROR (jsonrpc/0) [api] FINISH create<br>
&gt;&gt; error=Virtual machine already exists (api:129)<br>
&gt;&gt; Traceback (most recent call last):<br>
&gt;&gt; File &quot;/usr/lib/python2.7/site-<wbr>packages/vdsm/common/api.py&quot;, line 122, in<br>
&gt;&gt; method<br>
&gt;&gt; ret = func(*args, **kwargs)<br>
&gt;&gt; File &quot;/usr/lib/python2.7/site-<wbr>packages/vdsm/API.py&quot;, line 191, in create<br>
&gt;&gt; raise exception.VMExists()<br>
&gt;&gt; VMExists: Virtual machine already exists<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt; Milan, Francesco, could it be that because of [1] that appears on the<br>
&gt; destination host right after shutting down the VM, it remained defined on<br>
&gt; that host?<br>
<br>
</span>I can&#39;t see any destroy call in the logs after the successful preceding<br>
migration from the given host.  That would explain “VMExists” error.<br>
<span class=""><br>
&gt; [1] 2018-04-10 11:01:40,005-0400 ERROR (libvirt/events) [vds] Error running<br>
&gt; VM callback (clientIF:683)<br>
&gt;<br>
&gt; Traceback (most recent call last):<br>
&gt;<br>
&gt;   File &quot;/usr/lib/python2.7/site-<wbr>packages/vdsm/clientIF.py&quot;, line 646, in<br>
&gt; dispatchLibvirtEvents<br>
&gt;<br>
&gt;     v.onLibvirtLifecycleEvent(<wbr>event, detail, None)<br>
&gt;<br>
&gt; AttributeError: &#39;NoneType&#39; object has no attribute &#39;onLibvirtLifecycleEvent&#39;<br>
<br>
</span>That means that a life cycle event on an unknown VM has arrived, in this<br>
case apparently destroy event, following the destroy call after the<br>
failed incoming migration.  The reported AttributeError is a minor bug,<br>
already fixed in master.  So it&#39;s most likely unrelated to the discussed<br>
problem.<br>
<span class=""><br>
&gt;&gt;&gt; On Tue, Apr 10, 2018 at 4:14 PM, Alona Kaplan &lt;<a href="mailto:alkaplan@redhat.com">alkaplan@redhat.com</a>&gt;<br>
&gt;&gt;&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Hi all,<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Looking at the log it seems that the new GetCapabilitiesAsync is<br>
&gt;&gt;&gt;&gt; responsible for the mess.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; -<br>
</span>&gt;&gt;&gt;&gt; * 08:29:47 - engine loses connectivity to host &#39;lago-basic-suite-4-2-host-0&#39;.<wbr>*<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; *- Every 3 seconds a getCapabalititiesAsync request is sent to the host (unsuccessfully).*<br>
<span class="">&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;      * before each &quot;getCapabilitiesAsync&quot; the monitoring lock is taken (VdsManager,refreshImpl)<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;      * &quot;getCapabilitiesAsync&quot; immediately fails and throws &#39;VDSNetworkException: java.net.ConnectException: Connection refused&#39;. The exception is caught by &#39;<wbr>GetCapabilitiesAsyncVDSCommand<wbr>.executeVdsBrokerCommand&#39; which calls &#39;onFailure&#39; of the callback and re-throws the exception.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;          catch (Throwable t) {<br>
&gt;&gt;&gt;&gt;             getParameters().getCallback().<wbr>onFailure(t);<br>
&gt;&gt;&gt;&gt;             throw t;<br>
&gt;&gt;&gt;&gt;          }<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;     * The &#39;onFailure&#39; of the callback releases the &quot;monitoringLock&quot; (&#39;postProcessRefresh()-&gt;<wbr>afterRefreshTreatment()-&gt; if (!succeeded) lockManager.releaseLock(<wbr>monitoringLock);&#39;)<br>
&gt;&gt;&gt;&gt;<br>
</span>&gt;&gt;&gt;&gt;     * &#39;VdsManager,refreshImpl&#39; catches the network exception, marks &#39;releaseLock = true&#39; and *tries to release the already released lock*.<br>
<span class="">&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;       The following warning is printed to the log -<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;       WARN  [org.ovirt.engine.core.bll.<wbr>lock.InMemoryLockManager] (EE-ManagedThreadFactory-<wbr>engineScheduled-Thread-53) [] Trying to release exclusive lock which does not exist, lock key: &#39;ecf53d69-eb68-4b11-8df2-<wbr>c4aa4e19bd93VDS_INIT&#39;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
</span>&gt;&gt;&gt;&gt; *- 08:30:51 a successful getCapabilitiesAsync is sent.*<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; *- 08:32:55 - The failing test starts (Setup Networks for setting ipv6).    *<br>
<span class="">&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;     * SetupNetworks takes the monitoring lock.<br>
&gt;&gt;&gt;&gt;<br>
</span>&gt;&gt;&gt;&gt; *- 08:33:00 - ResponseTracker cleans the getCapabilitiesAsync requests from 4 minutes ago from its queue and prints a VDSNetworkException: Vds timeout occured.*<br>
<span class="">&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;       * When the first request is removed from the queue (&#39;ResponseTracker.remove()&#39;), the<br>
</span>&gt;&gt;&gt;&gt; *&#39;Callback.onFailure&#39; is invoked (for the second time) -&gt; monitoring lock is released (the lock taken by the SetupNetworks!).*<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;       * *The other requests removed from the queue also try to release the monitoring lock*, but there is nothing to release.<br>
<span class="">&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;       * The following warning log is printed -<br>
&gt;&gt;&gt;&gt;         WARN  [org.ovirt.engine.core.bll.<wbr>lock.InMemoryLockManager] (EE-ManagedThreadFactory-<wbr>engineScheduled-Thread-14) [] Trying to release exclusive lock which does not exist, lock key: &#39;ecf53d69-eb68-4b11-8df2-<wbr>c4aa4e19bd93VDS_INIT&#39;<br>
&gt;&gt;&gt;&gt;<br>
</span>&gt;&gt;&gt;&gt; - *08:33:00 - SetupNetwork fails on Timeout ~4 seconds after is started*. Why? I&#39;m not 100% sure but I guess the late processing of the &#39;getCapabilitiesAsync&#39; that causes losing of the monitoring lock and the late + mupltiple processing of failure is root cause.<br>
<div><div class="h5">&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Ravi, &#39;getCapabilitiesAsync&#39; failure is treated twice and the lock is trying to be released three times. Please share your opinion regarding how it should be fixed.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Thanks,<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Alona.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On Sun, Apr 8, 2018 at 1:21 PM, Dan Kenigsberg &lt;<a href="mailto:danken@redhat.com">danken@redhat.com</a>&gt;<br>
&gt;&gt;&gt;&gt; wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; On Sun, Apr 8, 2018 at 9:21 AM, Edward Haas &lt;<a href="mailto:ehaas@redhat.com">ehaas@redhat.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; On Sun, Apr 8, 2018 at 9:15 AM, Eyal Edri &lt;<a href="mailto:eedri@redhat.com">eedri@redhat.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Was already done by Yaniv - <a href="https://gerrit.ovirt.org/#/c/89851" rel="noreferrer" target="_blank">https://gerrit.ovirt.org/#/c/<wbr>89851</a>.<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Is it still failing?<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; On Sun, Apr 8, 2018 at 8:59 AM, Barak Korren &lt;<a href="mailto:bkorren@redhat.com">bkorren@redhat.com</a>&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; On 7 April 2018 at 00:30, Dan Kenigsberg &lt;<a href="mailto:danken@redhat.com">danken@redhat.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; &gt; No, I am afraid that we have not managed to understand why setting<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; and<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; &gt; ipv6 address too the host off the grid. We shall continue<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; researching<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; &gt; this next week.<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; &gt; Edy, <a href="https://gerrit.ovirt.org/#/c/88637/" rel="noreferrer" target="_blank">https://gerrit.ovirt.org/#/c/<wbr>88637/</a> is already 4 weeks old,<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; but<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; &gt; could it possibly be related (I really doubt that)?<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Sorry, but I do not see how this problem is related to VDSM.<br>
&gt;&gt;&gt;&gt;&gt;&gt; There is nothing that indicates that there is a VDSM problem.<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Has the RPC connection between Engine and VDSM failed?<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Further up the thread, Piotr noticed that (at least on one failure of<br>
&gt;&gt;&gt;&gt;&gt; this test) that the Vdsm host lost connectivity to its storage, and Vdsm<br>
&gt;&gt;&gt;&gt;&gt; process was restarted. However, this does not seems to happen in all cases<br>
&gt;&gt;&gt;&gt;&gt; where this test fails.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt;&gt;&gt;&gt; Devel mailing list<br>
&gt;&gt;&gt;&gt;&gt; <a href="mailto:Devel@ovirt.org">Devel@ovirt.org</a><br>
&gt;&gt;&gt;&gt;&gt; <a href="http://lists.ovirt.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/devel</a><br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt;&gt;&gt; Devel mailing list<br>
&gt;&gt;&gt;&gt; <a href="mailto:Devel@ovirt.org">Devel@ovirt.org</a><br>
&gt;&gt;&gt;&gt; <a href="http://lists.ovirt.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/devel</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
</div></div>&gt;&gt;&gt; *GAL bEN HAIM*<br>
<span class="im HOEnZb">&gt;&gt;&gt; RHV DEVOPS<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt; Devel mailing list<br>
&gt;&gt; <a href="mailto:Devel@ovirt.org">Devel@ovirt.org</a><br>
&gt;&gt; <a href="http://lists.ovirt.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/devel</a><br>
&gt;&gt;<br>
</span><div class="HOEnZb"><div class="h5">______________________________<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></div></div></blockquote></div><br></div>