> It has 10 obects in Swift, but should has only one (size is less than 5G)
The v2 client doesn't seem to send the size to the server at all:
PUT /v2/images/36e7def9-f734-4e09-9feb-872e58648a01/file HTTP/1.1. Host: 10.0.0.100:9292. Accept-Encoding: gzip, deflate. Transfer-Encoding: chunked. Accept: */*. X-Auth-Token: xxx Connection: keep-alive. User-Agent: python-glanceclient. Content-Type: application/octet-stream.
so the server, not having anyway to know the amount of bytes it's going to receive will segment the upload. (This may be a client bug.)
I haven't been able to reproduce this on devstack (so far):
$ glance image-create --file /tmp/dd.1476395008 --name bug1537721 --container-format bare --disk-format raw +------------------+--------------------------------------+ | Property | Value | +------------------+--------------------------------------+ | checksum | a9db0ed9b9e467089c5bbc6c5bd1a305 | | container_format | bare | | created_at | 2016-01-25T12:29:03Z | | disk_format | raw | | id | 94a15b66-1b78-462b-93a0-dbf3a66d26b2 | | min_disk | 0 | | min_ram | 0 | | name | bug1537721 | | owner | a03febe481094927a96fe367c15c347b | | protected | False | | size | 1476395008 | | status | active | | tags | [] | | updated_at | 2016-01-25T12:29:23Z | | virtual_size | None | | visibility | private | +------------------+--------------------------------------+
$ glance image-download 94a15b66-1b78-462b-93a0-dbf3a66d26b2 --file /tmp/download.1476395008
$ md5sum /tmp/download.1476395008 a9db0ed9b9e467089c5bbc6c5bd1a305 /tmp/download.1476395008
94a15b66-1b78-462b-93a0-dbf3a66d26b2
Account: AUTH_30514a9dd11f4ed3970e46bfeb0b47ee Container: glance Object: 94a15b66-1b78-462b-93a0-dbf3a66d26b2 Content Type: application/octet-stream Content Length: 1476395008 Last Modified: Mon, 25 Jan 2016 12:29:24 GMT ETag: "c5c28ea692acc7aa9aa658f991cdc108" Manifest: glance/94a15b66-1b78-462b-93a0-dbf3a66d26b2- Accept-Ranges: bytes X-Timestamp: 1453724963.57836 X-Trans-Id: tx9e7e24de2cc344c988ebd-0056a6169c
94a15b66-1b78-462b-93a0-dbf3a66d26b2-00001
Account: AUTH_30514a9dd11f4ed3970e46bfeb0b47ee Container: glance Object: 94a15b66-1b78-462b-93a0-dbf3a66d26b2-00001 Content Type: application/octet-stream Content Length: 204800000 Last Modified: Mon, 25 Jan 2016 12:29:04 GMT ETag: eda9a9889837ac4bc81d6387d92c1bec Accept-Ranges: bytes X-Timestamp: 1453724943.43825 X-Trans-Id: txd8aa4dc200bc405fabb5d-0056a6169d
94a15b66-1b78-462b-93a0-dbf3a66d26b2-00002
Account: AUTH_30514a9dd11f4ed3970e46bfeb0b47ee Container: glance Object: 94a15b66-1b78-462b-93a0-dbf3a66d26b2-00002 Content Type: application/octet-stream Content Length: 204800000 Last Modified: Mon, 25 Jan 2016 12:29:07 GMT ETag: eda9a9889837ac4bc81d6387d92c1bec Accept-Ranges: bytes X-Timestamp: 1453724946.24933 X-Trans-Id: tx117a5f9a8c444ee6b2a39-0056a6169d
94a15b66-1b78-462b-93a0-dbf3a66d26b2-00003
Account: AUTH_30514a9dd11f4ed3970e46bfeb0b47ee Container: glance Object: 94a15b66-1b78-462b-93a0-dbf3a66d26b2-00003 Content Type: application/octet-stream Content Length: 204800000 Last Modified: Mon, 25 Jan 2016 12:29:09 GMT ETag: eda9a9889837ac4bc81d6387d92c1bec Accept-Ranges: bytes X-Timestamp: 1453724948.71423 X-Trans-Id: tx8541c99b04b94ee898c64-0056a6169e
94a15b66-1b78-462b-93a0-dbf3a66d26b2-00004
Account: AUTH_30514a9dd11f4ed3970e46bfeb0b47ee Container: glance Object: 94a15b66-1b78-462b-93a0-dbf3a66d26b2-00004 Content Type: application/octet-stream Content Length: 204800000 Last Modified: Mon, 25 Jan 2016 12:29:12 GMT ETag: eda9a9889837ac4bc81d6387d92c1bec Accept-Ranges: bytes X-Timestamp: 1453724951.26306 X-Trans-Id: txc8b9822ea3fa42629a458-0056a6169f
94a15b66-1b78-462b-93a0-dbf3a66d26b2-00005
Account: AUTH_30514a9dd11f4ed3970e46bfeb0b47ee Container: glance Object: 94a15b66-1b78-462b-93a0-dbf3a66d26b2-00005 Content Type: application/octet-stream Content Length: 204800000 Last Modified: Mon, 25 Jan 2016 12:29:15 GMT ETag: eda9a9889837ac4bc81d6387d92c1bec Accept-Ranges: bytes X-Timestamp: 1453724954.73780 X-Trans-Id: tx2f499bd4735e44fb8bc5f-0056a6169f
94a15b66-1b78-462b-93a0-dbf3a66d26b2-00006
Account: AUTH_30514a9dd11f4ed3970e46bfeb0b47ee Container: glance Object: 94a15b66-1b78-462b-93a0-dbf3a66d26b2-00006 Content Type: application/octet-stream Content Length: 204800000 Last Modified: Mon, 25 Jan 2016 12:29:18 GMT ETag: eda9a9889837ac4bc81d6387d92c1bec Accept-Ranges: bytes X-Timestamp: 1453724957.02947 X-Trans-Id: tx254f5f9430bf4b4680265-0056a616a0
94a15b66-1b78-462b-93a0-dbf3a66d26b2-00007
Account: AUTH_30514a9dd11f4ed3970e46bfeb0b47ee Container: glance Object: 94a15b66-1b78-462b-93a0-dbf3a66d26b2-00007 Content Type: application/octet-stream Content Length: 204800000 Last Modified: Mon, 25 Jan 2016 12:29:20 GMT ETag: eda9a9889837ac4bc81d6387d92c1bec Accept-Ranges: bytes X-Timestamp: 1453724959.94013 X-Trans-Id: tx5bd0728fc3874c0eac9d7-0056a616a1
94a15b66-1b78-462b-93a0-dbf3a66d26b2-00008
Account: AUTH_30514a9dd11f4ed3970e46bfeb0b47ee Container: glance Object: 94a15b66-1b78-462b-93a0-dbf3a66d26b2-00008 Content Type: application/octet-stream Content Length: 42795008 Last Modified: Mon, 25 Jan 2016 12:29:24 GMT ETag: f3c9b36eceea8d2192996ca931f1fa55 Accept-Ranges: bytes X-Timestamp: 1453724963.03247 X-Trans-Id: txa7ea46e363274b5dbdc99-0056a616a2
> It has 10 obects in Swift, but should has only one (size is less than 5G)
The v2 client doesn't seem to send the size to the server at all:
PUT /v2/images/ 36e7def9- f734-4e09- 9feb-872e58648a 01/file HTTP/1.1. glanceclient. octet-stream.
Host: 10.0.0.100:9292.
Accept-Encoding: gzip, deflate.
Transfer-Encoding: chunked.
Accept: */*.
X-Auth-Token: xxx
Connection: keep-alive.
User-Agent: python-
Content-Type: application/
so the server, not having anyway to know the amount of bytes it's going to receive will segment the upload.
(This may be a client bug.)
I haven't been able to reproduce this on devstack (so far):
$ glance image-create --file /tmp/dd.1476395008 --name bug1537721 --container-format bare --disk-format raw ------- ------+ ------- ------- ------- ------- ------- ---+ ------- ------+ ------- ------- ------- ------- ------- ---+ 89c5bbc6c5bd1a3 05 | 25T12:29: 03Z | 1b78-462b- 93a0-dbf3a66d26 b2 | 7a96fe367c15c34 7b | 25T12:29: 23Z | ------- ------+ ------- ------- ------- ------- ------- ---+
+-----
| Property | Value |
+-----
| checksum | a9db0ed9b9e4670
| container_format | bare |
| created_at | 2016-01-
| disk_format | raw |
| id | 94a15b66-
| min_disk | 0 |
| min_ram | 0 |
| name | bug1537721 |
| owner | a03febe48109492
| protected | False |
| size | 1476395008 |
| status | active |
| tags | [] |
| updated_at | 2016-01-
| virtual_size | None |
| visibility | private |
+-----
$ glance image-download 94a15b66- 1b78-462b- 93a0-dbf3a66d26 b2 --file /tmp/download. 1476395008
$ md5sum /tmp/download. 1476395008 089c5bbc6c5bd1a 305 /tmp/download. 1476395008
a9db0ed9b9e467
94a15b66- 1b78-462b- 93a0-dbf3a66d26 b2
Account: AUTH_30514a9dd1 1f4ed3970e46bfe b0b47ee 1b78-462b- 93a0-dbf3a66d26 b2 octet-stream aa9aa658f991cdc 108" 94a15b66- 1b78-462b- 93a0-dbf3a66d26 b2- 4c988ebd- 0056a6169c
Container: glance
Object: 94a15b66-
Content Type: application/
Content Length: 1476395008
Last Modified: Mon, 25 Jan 2016 12:29:24 GMT
ETag: "c5c28ea692acc7
Manifest: glance/
Accept-Ranges: bytes
X-Timestamp: 1453724963.57836
X-Trans-Id: tx9e7e24de2cc34
94a15b66- 1b78-462b- 93a0-dbf3a66d26 b2-00001
Account: AUTH_30514a9dd1 1f4ed3970e46bfe b0b47ee 1b78-462b- 93a0-dbf3a66d26 b2-00001 octet-stream bc81d6387d92c1b ec 05fabb5d- 0056a6169d
Container: glance
Object: 94a15b66-
Content Type: application/
Content Length: 204800000
Last Modified: Mon, 25 Jan 2016 12:29:04 GMT
ETag: eda9a9889837ac4
Accept-Ranges: bytes
X-Timestamp: 1453724943.43825
X-Trans-Id: txd8aa4dc200bc4
94a15b66- 1b78-462b- 93a0-dbf3a66d26 b2-00002
Account: AUTH_30514a9dd1 1f4ed3970e46bfe b0b47ee 1b78-462b- 93a0-dbf3a66d26 b2-00002 octet-stream bc81d6387d92c1b ec ee6b2a39- 0056a6169d
Container: glance
Object: 94a15b66-
Content Type: application/
Content Length: 204800000
Last Modified: Mon, 25 Jan 2016 12:29:07 GMT
ETag: eda9a9889837ac4
Accept-Ranges: bytes
X-Timestamp: 1453724946.24933
X-Trans-Id: tx117a5f9a8c444
94a15b66- 1b78-462b- 93a0-dbf3a66d26 b2-00003
Account: AUTH_30514a9dd1 1f4ed3970e46bfe b0b47ee 1b78-462b- 93a0-dbf3a66d26 b2-00003 octet-stream bc81d6387d92c1b ec ee898c64- 0056a6169e
Container: glance
Object: 94a15b66-
Content Type: application/
Content Length: 204800000
Last Modified: Mon, 25 Jan 2016 12:29:09 GMT
ETag: eda9a9889837ac4
Accept-Ranges: bytes
X-Timestamp: 1453724948.71423
X-Trans-Id: tx8541c99b04b94
94a15b66- 1b78-462b- 93a0-dbf3a66d26 b2-00004
Account: AUTH_30514a9dd1 1f4ed3970e46bfe b0b47ee 1b78-462b- 93a0-dbf3a66d26 b2-00004 octet-stream bc81d6387d92c1b ec 2629a458- 0056a6169f
Container: glance
Object: 94a15b66-
Content Type: application/
Content Length: 204800000
Last Modified: Mon, 25 Jan 2016 12:29:12 GMT
ETag: eda9a9889837ac4
Accept-Ranges: bytes
X-Timestamp: 1453724951.26306
X-Trans-Id: txc8b9822ea3fa4
94a15b66- 1b78-462b- 93a0-dbf3a66d26 b2-00005
Account: AUTH_30514a9dd1 1f4ed3970e46bfe b0b47ee 1b78-462b- 93a0-dbf3a66d26 b2-00005 octet-stream bc81d6387d92c1b ec 4fb8bc5f- 0056a6169f
Container: glance
Object: 94a15b66-
Content Type: application/
Content Length: 204800000
Last Modified: Mon, 25 Jan 2016 12:29:15 GMT
ETag: eda9a9889837ac4
Accept-Ranges: bytes
X-Timestamp: 1453724954.73780
X-Trans-Id: tx2f499bd4735e4
94a15b66- 1b78-462b- 93a0-dbf3a66d26 b2-00006
Account: AUTH_30514a9dd1 1f4ed3970e46bfe b0b47ee 1b78-462b- 93a0-dbf3a66d26 b2-00006 octet-stream bc81d6387d92c1b ec b4680265- 0056a616a0
Container: glance
Object: 94a15b66-
Content Type: application/
Content Length: 204800000
Last Modified: Mon, 25 Jan 2016 12:29:18 GMT
ETag: eda9a9889837ac4
Accept-Ranges: bytes
X-Timestamp: 1453724957.02947
X-Trans-Id: tx254f5f9430bf4
94a15b66- 1b78-462b- 93a0-dbf3a66d26 b2-00007
Account: AUTH_30514a9dd1 1f4ed3970e46bfe b0b47ee 1b78-462b- 93a0-dbf3a66d26 b2-00007 octet-stream bc81d6387d92c1b ec c0eac9d7- 0056a616a1
Container: glance
Object: 94a15b66-
Content Type: application/
Content Length: 204800000
Last Modified: Mon, 25 Jan 2016 12:29:20 GMT
ETag: eda9a9889837ac4
Accept-Ranges: bytes
X-Timestamp: 1453724959.94013
X-Trans-Id: tx5bd0728fc3874
94a15b66- 1b78-462b- 93a0-dbf3a66d26 b2-00008
Account: AUTH_30514a9dd1 1f4ed3970e46bfe b0b47ee 1b78-462b- 93a0-dbf3a66d26 b2-00008 octet-stream 192996ca931f1fa 55 b5dbdc99- 0056a616a2
Container: glance
Object: 94a15b66-
Content Type: application/
Content Length: 42795008
Last Modified: Mon, 25 Jan 2016 12:29:24 GMT
ETag: f3c9b36eceea8d2
Accept-Ranges: bytes
X-Timestamp: 1453724963.03247
X-Trans-Id: txa7ea46e363274