A status in a container db is not updated when re-putting to a deleted container
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
In Progress
|
Undecided
|
HCLTech-SSW |
Bug Description
Status in container db is set as 'deleted' when we delete the container, but never get updated when we re-put the container.
1) PUT a container
kajinamit@
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> PUT /v1/AUTH_test/test HTTP/1.1
> User-Agent: curl/7.35.0
> Host: 127.0.0.1:8080
> Accept: */*
> X-Storage-
>
< HTTP/1.1 201 Created
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8
< X-Trans-Id: tx480fcda9884a4
< Date: Mon, 26 Jan 2015 13:06:21 GMT
<
* Connection #0 to host 127.0.0.1 left intact
Now, a container db is created.
kajinamit@
AUTH_test|
2) DELETE the container
kajinamit@
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> DELETE /v1/AUTH_test/test HTTP/1.1
> User-Agent: curl/7.35.0
> Host: 127.0.0.1:8080
> Accept: */*
> X-Storage-
>
< HTTP/1.1 204 No Content
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8
< X-Trans-Id: tx86a011aeef724
< Date: Mon, 26 Jan 2015 13:07:09 GMT
<
* Connection #0 to host 127.0.0.1 left intact
Now, a status in the container db is marked as 'DELETED.'
kajinamit@
AUTH_test|
3) Re-PUT the container
kajinamit@
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> PUT /v1/AUTH_test/test HTTP/1.1
> User-Agent: curl/7.35.0
> Host: 127.0.0.1:8080
> Accept: */*
> X-Storage-
>
< HTTP/1.1 201 Created
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8
< X-Trans-Id: txd71c48619def4
< Date: Mon, 26 Jan 2015 13:07:15 GMT
<
* Connection #0 to host 127.0.0.1 left intact
Now, the timestamps in the container db get updated, but its status is still 'DELETED.'
kajinamit@
AUTH_test|
This doesn't matter when we think about swift's behavior, because swift judges deleted containers only by timestamps, but It is confusing that we have an invalid and inappropriate value in db files.
Changed in swift: | |
assignee: | nobody → HCLTech-SSW (hcltech-ssw) |
status: | New → In Progress |
I also found that a status in account/container db is not replicated by db-replicator, and this may cause some problems like the following bug. /bugs.launchpad .net/swift/ +bug/1304755>> containers.
<<https:/
I know this is not in so high priority but I think we have to rethink how to handle deleted status of accounts/