<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Sep 13, 2017 at 5:03 PM Matthias Leopold &lt;<a href="mailto:matthias.leopold@meduniwien.ac.at">matthias.leopold@meduniwien.ac.at</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">i tried it again twice:<br>
<br>
when using upload_disk.py from the ovirt engine host itself the disk<br>
upload succeeds (despite an &quot;503 Service Unavailable Completed 100%&quot; in<br>
script output in the end)<br>
<br>
another try was from an ovirt-sdk installation on my ubuntu desktop<br>
itself (yesterday i tried it from a centos VM on my desktop machine).<br>
this failed again, this time with &quot;socket.error: [Errno 32] Broken pipe&quot;<br>
after reaching &quot;200 OK Completed 100%&quot;. in imageio-proxy log i have<br>
again the 403 error in this moment<br>
<br>
what&#39;s the difference between accessing the API from the engine host and<br>
from &quot;outside&quot; in this case?<br></blockquote><div><br></div><div>There should be no difference - did you run the same code for uploading?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
thx<br>
matthias<br>
<br>
Am 2017-09-12 um 16:42 schrieb Matthias Leopold:<br>
&gt; Thanks, i tried this script and it _almost_ worked ;-)<br>
&gt;<br>
&gt; i uploaded two images i created with<br>
&gt; qemu-img create -f qcow2 -o preallocation=full<br>
&gt; and<br>
&gt; qemu-img create -f qcow2 -o preallocation=falloc<br>
&gt;<br>
&gt; for initial_size and provisioned_size i took the value reported by<br>
&gt; &quot;qemu-img info&quot; in &quot;virtual size&quot; (same as &quot;disk size&quot; in this case)<br>
&gt;<br>
&gt; the upload goes to 100% and then fails with<br>
&gt;<br>
&gt; 200 OK Completed 100%<br>
&gt; Traceback (most recent call last):<br>
&gt;    File &quot;./upload_disk.py&quot;, line 157, in &lt;module&gt;<br>
&gt;      headers=upload_headers,<br>
&gt;    File &quot;/usr/lib64/python2.7/httplib.py&quot;, line 1017, in request<br>
&gt;      self._send_request(method, url, body, headers)<br>
&gt;    File &quot;/usr/lib64/python2.7/httplib.py&quot;, line 1051, in _send_request<br>
&gt;      self.endheaders(body)<br>
&gt;    File &quot;/usr/lib64/python2.7/httplib.py&quot;, line 1013, in endheaders<br>
&gt;      self._send_output(message_body)<br>
&gt;    File &quot;/usr/lib64/python2.7/httplib.py&quot;, line 864, in _send_output<br>
&gt;      self.send(msg)<br>
&gt;    File &quot;/usr/lib64/python2.7/httplib.py&quot;, line 840, in send<br>
&gt;      self.sock.sendall(data)<br>
&gt;    File &quot;/usr/lib64/python2.7/ssl.py&quot;, line 746, in sendall<br>
&gt;      v = self.send(data[count:])<br>
&gt;    File &quot;/usr/lib64/python2.7/ssl.py&quot;, line 712, in send<br>
&gt;      v = self._sslobj.write(data)<br>
&gt; socket.error: [Errno 104] Connection reset by peer<br>
&gt;<br>
&gt; in web GUI the disk stays in Status: &quot;Transferring via API&quot;<br>
&gt; it can only be removed when manually unlocking it (unlock_entity.sh)<br>
&gt;<br>
&gt; engine.log tells nothing interesting<br>
&gt;<br>
&gt; i attached the last lines of ovirt-imageio-proxy/image-proxy.log and<br>
&gt; ovirt-imageio-daemon/daemon.log (from the executing node)<br>
&gt;<br>
&gt; the HTTP status 403 in ovirt-imageio-daemon/daemon.log doesn&#39;t look too<br>
&gt; nice to me<br>
&gt;<br>
&gt; can you explain what happens?<br>
&gt;<br>
&gt; ovirt engine is 4.1.5<br>
&gt; ovirt node is 4.1.3 (is that a problem?)<br>
&gt;<br>
&gt; thx<br>
&gt; matthias<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Am 2017-09-12 um 13:15 schrieb Fred Rolland:<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; You can check this example:<br>
&gt;&gt; <a href="https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/upload_disk.py" rel="noreferrer" target="_blank">https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/upload_disk.py</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Fred<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Sep 12, 2017 at 11:49 AM, Matthias Leopold<br>
&gt;&gt; &lt;<a href="mailto:matthias.leopold@meduniwien.ac.at" target="_blank">matthias.leopold@meduniwien.ac.at</a><br>
&gt;&gt; &lt;mailto:<a href="mailto:matthias.leopold@meduniwien.ac.at" target="_blank">matthias.leopold@meduniwien.ac.at</a>&gt;&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;     Hi,<br>
&gt;&gt;<br>
&gt;&gt;     is there a way to upload disk images (not OVF files, not ISO files)<br>
&gt;&gt;     to oVirt storage domains via CLI? I need to upload a 800GB file and<br>
&gt;&gt;     this is not really comfortable via browser. I looked at ovirt-shell<br>
&gt;&gt;     and<br>
&gt;&gt;<br>
&gt;&gt; <a href="https://www.ovirt.org/develop/release-management/features/storage/image-upload/" rel="noreferrer" target="_blank">https://www.ovirt.org/develop/release-management/features/storage/image-upload/</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; &lt;<a href="https://www.ovirt.org/develop/release-management/features/storage/image-upload/" rel="noreferrer" target="_blank">https://www.ovirt.org/develop/release-management/features/storage/image-upload/</a>&gt;,<br>
&gt;&gt;<br>
&gt;&gt;     but i didn&#39;t find an option in either of them.<br>
&gt;&gt;<br>
&gt;&gt;     thx<br>
&gt;&gt;     matthias<br>
&gt;&gt;<br>
&gt;&gt;     _______________________________________________<br>
&gt;&gt;     Users mailing list<br>
&gt;&gt;     <a href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a> &lt;mailto:<a href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a>&gt;<br>
&gt;&gt;     <a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
&gt;&gt;     &lt;<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
<br>
--<br>
Matthias Leopold<br>
IT Systems &amp; Communications<br>
Medizinische Universität Wien<br>
Spitalgasse 23 / BT 88 /Ebene 00<br>
A-1090 Wien<br>
Tel: <a href="tel:+43%201%204016021241" value="+4314016021241" target="_blank">+43 1 40160-21241</a><br>
Fax: <a href="tel:+43%201%2040160921200" value="+43140160921200" target="_blank">+43 1 40160-921200</a><br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
</blockquote></div></div>