<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Jun 25, 2018 at 8:30 PM Nir Soffer <<a href="mailto:nirsof@gmail.com">nirsof@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">http was missing in emulate_zero, so the code would fail with NameError.<br>
This can happen only when communicating with old imageio versions not<br>
supporting the "zero" feature.<br>
<br>
Testing with qemu-img 2.12 show that we never send emulated zero request<br>
because of the highestwrite mechanism, but it can break with older<br>
qemu-img-rhev used on RHEL.<br>
---<br>
 v2v/rhv-upload-plugin.py | 2 ++<br>
 1 file changed, 2 insertions(+)<br>
<br>
diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py<br>
index 2eec375f7..0f6b31e67 100644<br>
--- a/v2v/rhv-upload-plugin.py<br>
+++ b/v2v/rhv-upload-plugin.py<br>
@@ -338,6 +338,8 @@ def zero(h, count, offset, may_trim):<br>
     r.read()<br>
<br>
 def emulate_zero(h, count, offset):<br>
+    http = h['http']<br></blockquote><div><br></div><div>After some more cleanup, I found that we are missing also "transfer" here.</div><div>I'll send a fixed patch.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
     # qemu-img convert starts by trying to zero/trim the whole device.<br>
     # Since we've just created a new disk it's safe to ignore these<br>
     # requests as long as they are smaller than the highest write seen.<br>
-- <br>
2.17.1<br>
<br>
</blockquote></div></div>