<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Jan 11, 2018 at 8:31 PM Barak Korren &lt;<a href="mailto:bkorren@redhat.com">bkorren@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">I thought I explained this before.<div dir="auto"><br></div><div dir="auto">Writing to losetup from inside mock gets you a device outside mock that is invisible inside.</div></div></blockquote><div><br></div><div>How the tests work 99.9% of the time?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="auto">The way to solve this is to run mknod a few times to get the needed device files.</div><div dir="auto"><br></div><div dir="auto">You can see examples of this in the ovirt-node build scripts.<br></div></div></blockquote><div><br></div><div>&quot;git grep mknod&quot; in ovirt-node source does not show anything.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="auto"><br><div data-smartmail="gmail_signature" dir="auto">Barak Korren<br><a href="mailto:bkorren@redhat.com" target="_blank">bkorren@redhat.com</a><br>RHCE, RHCi, RHV-DevOps Team<br><a href="https://ifireball.wordpress.com/" target="_blank">https://ifireball.wordpress.com/</a></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">בתאריך 11 בינו׳ 2018 04:35 PM,‏ &quot;Nir Soffer&quot; &lt;<a href="mailto:nsoffer@redhat.com" target="_blank">nsoffer@redhat.com</a>&gt; כתב:</div></div><div class="gmail_extra"><div class="gmail_quote"><br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">We have random failures of loop device tests on jenkins (see example bellow).<div><br></div><div>Barak commented that losetup -f /path does not work sometimes in the CI</div><div>but I don&#39;t recall what it the alternative way to get a loop device.</div><div><br></div><div>We need a reliable way to create a loop device for vdsm tests. What</div><div>is the recommended way to do this?</div><div><br></div><div>Until we have a reliable solution I&#39;m going to mark this test as broken</div><div>on ovirt CI:</div><div><a href="https://gerrit.ovirt.org/#/c/86241/" target="_blank">https://gerrit.ovirt.org/#/c/86241/</a></div><div><br></div><div>Please report if you see other tests fail with this error - typically:</div><div><br></div><div><pre class="m_4841878169758019470m_8753117825359359080inbox-inbox-inbox-inbox-console-output" style="box-sizing:border-box;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51);font-size:14px">Error: Command [&#39;losetup&#39;, &#39;--find&#39;, &#39;--show&#39;, &#39;/tmp/tmp17Wqri/file&#39;] failed with rc=1 out=&#39;&#39; err=&#39;losetup: /tmp/tmp17Wqri/file: failed to set up loop device: No such file or directory\n&#39;</pre></div><div><br></div><div><a href="http://jenkins.ovirt.org/job/vdsm_master_check-patch-el7-x86_64/20862/consoleFull" target="_blank">http://jenkins.ovirt.org/job/vdsm_master_check-patch-el7-x86_64/20862/consoleFull</a><br></div><div><br></div><div><pre class="m_4841878169758019470m_8753117825359359080inbox-inbox-console-output" style="box-sizing:border-box;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51);font-size:14px"><span class="m_4841878169758019470m_8753117825359359080inbox-inbox-timestamp" style="box-sizing:border-box"><b style="box-sizing:border-box">00:05:48.766</b> </span>======================================================================
<span class="m_4841878169758019470m_8753117825359359080inbox-inbox-timestamp" style="box-sizing:border-box"><b style="box-sizing:border-box">00:05:48.766</b> </span>ERROR: test_attach_detach_manually (loopback_test.TestDevice)
<span class="m_4841878169758019470m_8753117825359359080inbox-inbox-timestamp" style="box-sizing:border-box"><b style="box-sizing:border-box">00:05:48.767</b> </span>----------------------------------------------------------------------
<span class="m_4841878169758019470m_8753117825359359080inbox-inbox-timestamp" style="box-sizing:border-box"><b style="box-sizing:border-box">00:05:48.767</b> </span>Traceback (most recent call last):
<span class="m_4841878169758019470m_8753117825359359080inbox-inbox-timestamp" style="box-sizing:border-box"><b style="box-sizing:border-box">00:05:48.767</b> </span>  File &quot;/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/testValidation.py&quot;, line 191, in wrapper
<span class="m_4841878169758019470m_8753117825359359080inbox-inbox-timestamp" style="box-sizing:border-box"><b style="box-sizing:border-box">00:05:48.768</b> </span>    return f(*args, **kwargs)
<span class="m_4841878169758019470m_8753117825359359080inbox-inbox-timestamp" style="box-sizing:border-box"><b style="box-sizing:border-box">00:05:48.768</b> </span>  File &quot;/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/loopback_test.py&quot;, line 56, in test_attach_detach_manually
<span class="m_4841878169758019470m_8753117825359359080inbox-inbox-timestamp" style="box-sizing:border-box"><b style="box-sizing:border-box">00:05:48.768</b> </span>    device.attach()
<span class="m_4841878169758019470m_8753117825359359080inbox-inbox-timestamp" style="box-sizing:border-box"><b style="box-sizing:border-box">00:05:48.768</b> </span>  File &quot;/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/loopback.py&quot;, line 56, in attach
<span class="m_4841878169758019470m_8753117825359359080inbox-inbox-timestamp" style="box-sizing:border-box"><b style="box-sizing:border-box">00:05:48.769</b> </span>    raise cmdutils.Error(cmd, rc, out, err)
<span class="m_4841878169758019470m_8753117825359359080inbox-inbox-timestamp" style="box-sizing:border-box"><b style="box-sizing:border-box">00:05:48.769</b> </span>Error: Command [&#39;losetup&#39;, &#39;--find&#39;, &#39;--show&#39;, &#39;/tmp/tmp17Wqri/file&#39;] failed with rc=1 out=&#39;&#39; err=&#39;losetup: /tmp/tmp17Wqri/file: failed to set up loop device: No such file or directory\n&#39;
<span class="m_4841878169758019470m_8753117825359359080inbox-inbox-timestamp" style="box-sizing:border-box"><b style="box-sizing:border-box">00:05:48.770</b> </span>-------------------- &gt;&gt; begin captured logging &lt;&lt; --------------------
<span class="m_4841878169758019470m_8753117825359359080inbox-inbox-timestamp" style="box-sizing:border-box"><b style="box-sizing:border-box">00:05:48.770</b> </span>2018-01-11 13:42:45,676 DEBUG (MainThread) [root] /usr/bin/taskset --cpu-list 0-1 losetup --find --show /tmp/tmp17Wqri/file (cwd None) (commands:65)
<span class="m_4841878169758019470m_8753117825359359080inbox-inbox-timestamp" style="box-sizing:border-box"><b style="box-sizing:border-box">00:05:48.771</b> </span>2018-01-11 13:42:45,733 DEBUG (MainThread) [root] FAILED: &lt;err&gt; = &#39;losetup: /tmp/tmp17Wqri/file: failed to set up loop device: No such file or directory\n&#39;; &lt;rc&gt; = 1 (commands:86)
<span class="m_4841878169758019470m_8753117825359359080inbox-inbox-timestamp" style="box-sizing:border-box"><b style="box-sizing:border-box">00:05:48.772</b> </span>--------------------- &gt;&gt; end captured logging &lt;&lt; ---------------------
</pre><br class="m_4841878169758019470m_8753117825359359080inbox-inbox-Apple-interchange-newline"></div></div>
</blockquote></div></div></blockquote></div></div>