Bug #15779
closedrgw: account/container metadata not actually present in a request are deleted during POST through Swift API
0%
Description
RadosGW:
$ curl -i -X POST -H "X-Account-Meta-Test: OK" -H "X-Auth-Token: $token" "$publicURL"
HTTP/1.1 204 No Content
X-Trans-Id: tx00000000000000000000c-0057308b1f-1019-default
Content-Type: text/plain; charset=utf-8
Date: Mon, 09 May 2016 13:05:35 GMT
$ curl -i -X HEAD -H "X-Auth-Token: $token" "$publicURL"
HTTP/1.1 204 No Content
X-Timestamp: 1462799154.19351
X-Account-Container-Count: 0
X-Account-Object-Count: 0
X-Account-Bytes-Used: 0
X-Account-Bytes-Used-Actual: 0
X-Account-Meta-test: OK
X-Trans-Id: tx00000000000000000000d-0057308b32-1019-default
Content-Length: 0
Accept-Ranges: bytes
Content-Type: text/plain; charset=utf-8
Date: Mon, 09 May 2016 13:05:54 GMT
$ curl -i -X POST -H "X-Account-Meta-Test2: OK" -H "X-Auth-Token: $token" "$publicURL"
HTTP/1.1 204 No Content
X-Trans-Id: tx00000000000000000000e-0057308b3f-1019-default
Content-Type: text/plain; charset=utf-8
Date: Mon, 09 May 2016 13:06:07 GMT
$ curl -i -X HEAD -H "X-Auth-Token: $token" "$publicURL"
HTTP/1.1 204 No Content
X-Timestamp: 1462799170.56030
X-Account-Container-Count: 0
X-Account-Object-Count: 0
X-Account-Bytes-Used: 0
X-Account-Bytes-Used-Actual: 0
X-Account-Meta-test2: OK
X-Trans-Id: tx00000000000000000000f-0057308b42-1019-default
Content-Length: 0
Accept-Ranges: bytes
Content-Type: text/plain; charset=utf-8
Date: Mon, 09 May 2016 13:06:10 GMT
As we can see the X-Account-Meta-test disappeared.
Swift:
$ curl -i -X POST -H "X-Account-Meta-Test: OK" -H "X-Auth-Token: $token" "$publicURL"
HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: txe88c3da149d64daaa6f5e-0057308ad5
Date: Mon, 09 May 2016 13:04:21 GMT
$ curl -i -X HEAD -H "X-Auth-Token: $token" "$publicURL"
HTTP/1.1 204 No Content
Content-Length: 0
Accept-Ranges: bytes
X-Account-Object-Count: 14
X-Timestamp: 1444053537.48538
X-Account-Bytes-Used: 565
X-Account-Container-Count: 13
Content-Type: text/plain; charset=utf-8
X-Account-Meta-Test: OK
X-Trans-Id: tx3b2f09a2a175495db74b3-0057308ae4
Date: Mon, 09 May 2016 13:04:36 GMT
$ curl -i -X POST -H "X-Account-Meta-Test2: OK" -H "X-Auth-Token: $token" "$publicURL"
HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx192000e6cd4d4ac693cf2-0057308aef
Date: Mon, 09 May 2016 13:04:47 GMT
$ curl -i -X HEAD -H "X-Auth-Token: $token" "$publicURL"
HTTP/1.1 204 No Content
Content-Length: 0
Accept-Ranges: bytes
X-Account-Object-Count: 14
X-Account-Meta-Test2: OK
X-Timestamp: 1444053537.48538
X-Account-Meta-Test: OK
X-Account-Container-Count: 13
Content-Type: text/plain; charset=utf-8
X-Account-Bytes-Used: 565
X-Trans-Id: tx76180ce7b4eb4b64bde09-0057308af1
Date: Mon, 09 May 2016 13:04:49 GMT
Introduced in: 4d494d5b05a1dc6b41b858eeb293394592abf60c.