<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Does the new image import process work? Am I missing something?
Uploaded images stay in an intermediate state, either <i>uploading</i>
or <i>importing</i>, and never become <i>active.</i><i> </i>Where
should I look?<i><br>
</i></p>
<p>On a stable/Rocky Devstack, I do:<br>
</p>
<blockquote>
<p><tt>openstack image </tt><tt>create --disk-</tt><tt>format
qcow2 myim</tt><tt>g</tt><br>
</p>
</blockquote>
<p>Image status is <i>queueing</i>, as expected.</p>
<blockquote>
<p><tt>glance image-st</tt><tt>age --file
devstack/files/Fedora...qcow2 </tt><tt>--progress IM</tt><tt>AGE_ID</tt><br>
</p>
</blockquote>
<p>Image status is <i>uploading</i>. A copy of the image is on <tt>/tmp/sta</tt><tt>ging/IMAGE_ID</tt>.<br>
</p>
<blockquote>
<p><tt>glance image-import --import-method glance-direct IMAGE_ID</tt></p>
</blockquote>
<p>Sometimes, the status remains <i>uploading, </i>sometimes it
turns <i>importing, </i>never <i>active.</i></p>
<p>glance-api log grep'd for the image ID:</p>
<p><tt>Nov 07 18:51:36 rocky <a class="moz-txt-link-abbreviated" href="mailto:devstack@g-api.service">devstack@g-api.service</a>[1033]: INFO
glance.common.scripts.image_import.main [None
req-7a747213-c160-4423-b703-c6cad15b9217 admin admin] Task
ec4b36fd-dece-4f41-aa8d-337d01c239f1: Got image data uri
<a class="moz-txt-link-freetext" href="file:///tmp/staging/72a6d7d0-a538-4922-95f2-1649e9702eb2">file:///tmp/staging/72a6d7d0-a538-4922-95f2-1649e9702eb2</a> to be
imported</tt><tt><br>
</tt><tt>Nov 07 18:51:37 rocky <a class="moz-txt-link-abbreviated" href="mailto:devstack@g-api.service">devstack@g-api.service</a>[1033]: DEBUG
glance_store._drivers.swift.store [None
req-7a747213-c160-4423-b703-c6cad15b9217 admin admin] Adding
image object '72a6d7d0-a538-4922-95f2-1649e9702eb2' to Swift
{{(pid=2250) add
/usr/local/lib/python2.7/dist-packages/glance_store/_drivers/swift/store.py:941}}</tt><tt><br>
</tt><tt>Nov 07 18:51:45 rocky <a class="moz-txt-link-abbreviated" href="mailto:devstack@g-api.service">devstack@g-api.service</a>[1033]: DEBUG
swiftclient [None req-7a747213-c160-4423-b703-c6cad15b9217 admin
admin] REQ: curl -i
<a class="moz-txt-link-freetext" href="http://192.168.1.201:8080/v1/AUTH_9495609cff044252965f8c3e5e86f8e0/glance/72a6d7d0-a538-4922-95f2-1649e9702eb2-00001">http://192.168.1.201:8080/v1/AUTH_9495609cff044252965f8c3e5e86f8e0/glance/72a6d7d0-a538-4922-95f2-1649e9702eb2-00001</a>
-X PUT -H "X-Auth-Token: gAAAAABb4rWowjLQ..." {{(pid=2250)
http_log
/usr/local/lib/python2.7/dist-packages/swiftclient/client.py:167}}</tt><tt><br>
</tt><tt>Nov 07 18:51:45 rocky <a class="moz-txt-link-abbreviated" href="mailto:devstack@g-api.service">devstack@g-api.service</a>[1033]: DEBUG
glance_store._drivers.swift.store [None
req-7a747213-c160-4423-b703-c6cad15b9217 admin admin] Wrote
chunk 72a6d7d0-a538-4922-95f2-1649e9702eb2-00001 (1/?) of length
204800000 to Swift returning MD5 of content:
5139500edbb5814a1351100d162db333 {{(pid=2250) add
/usr/local/lib/python2.7/dist-packages/glance_store/_drivers/swift/store.py:1024}}</tt><tt><br>
</tt></p>
<p>And then nothing. So it does send a 200MB chunk to Swift. I can
see it on Swift, too. But it stops after the first chunk and
forgets to send the rest.<br>
</p>
<p>After I tried that a few times, now it doesn't even upload the
first chunk. Nothing in Swift at all. No error in the Glance API
log either.</p>
<p>Same problem with the <i>image-upload-via-import </i>command. I
also tried the <i>web-download </i>import method; same result.<br>
</p>
<p>In all these cases, the image remains in an non-active state
forever, i.e. an hour or so, when I lose patience and delete it.<br>
</p>
<p>"Classic" upload works (<i>openstack image create --file ....</i>).
The log file then shows the expected chunk uploads to Swift. <br>
</p>
</body>
</html>