Comment 1 for bug 1026908

Revision history for this message
gholt (gholt) wrote :

I'm having a little trouble following but...

1) How did you get past this? Is this a Keystone issue, doesn't seem like a Swift-specific thing (v2.0)?

2) That listing is of containers, so it shows you having two containers: China_Telecom.png and photos. Perhaps you had previously accidentally created a China_Telecom.png container?

Lastly, the stats (X-Account-Container-Count, X-Account-Object-Count, and X-Account-Bytes-Used) are all "delayed" stats, in that they will eventually reflect what is in the account, but it may take some time.

In a very controlled situation:

First, just start up proxy, account, container, and object servers:
$ sudo swift-init main start

Check the account is empty:
$ curl -i http://127.0.0.1:8080/v1/AUTH_test -Hx-auth-token:AUTH_tk8c663f1dd7364e48a5f64ccdc6954cb3
HTTP/1.1 204 No Content
X-Account-Container-Count: 0
X-Account-Object-Count: 0
X-Account-Bytes-Used: 0

Now, create a new container:
$ curl -XPUT http://127.0.0.1:8080/v1/AUTH_test/test_container -Hx-auth-token:AUTH_tk8c663f1dd7364e48a5f64ccdc6954cb3
201 Created

Check what the account's listing of containers shows (this update is *almost* always immediate, but might be delayed):
$ curl -i http://127.0.0.1:8080/v1/AUTH_test -Hx-auth-token:AUTH_tk8c663f1dd7364e48a5f64ccdc6954cb3
HTTP/1.1 200 OK
X-Account-Container-Count: 1
X-Account-Object-Count: 0
X-Account-Bytes-Used: 0

test_container

Next, create an object in that container:
$ curl -XPUT http://127.0.0.1:8080/v1/AUTH_test/test_container/test_object --data-binary test_value -Hx-auth-token:AUTH_tk8c663f1dd7364e48a5f64ccdc6954cb3
201 Created

Check what the account's listing of containers shows again (object stats to the account level are *always* delayed):
$ curl -i http://127.0.0.1:8080/v1/AUTH_test -Hx-auth-token:AUTH_tk8c663f1dd7364e48a5f64ccdc6954cb3
HTTP/1.1 200 OK
X-Account-Container-Count: 1
X-Account-Object-Count: 0
X-Account-Bytes-Used: 0

test_container

Check what the container's listing of objects shows (this is *almost* always immediate, but may be delayed):
$ curl -i http://127.0.0.1:8080/v1/AUTH_test/test_container -Hx-auth-token:AUTH_tk8c663f1dd7364e48a5f64ccdc6954cb3
HTTP/1.1 200 OK
X-Container-Object-Count: 1
X-Container-Bytes-Used: 10

test_object

Run the background updaters manually (these run on set intervals in a production system):
$ sudo swift-init object-updater once
$ sudo swift-init container-updater once

Check what the account's listing of containers shows now (the updaters sent the updated stats):
$ curl -i http://127.0.0.1:8080/v1/AUTH_test -Hx-auth-token:AUTH_tk8c663f1dd7364e48a5f64ccdc6954cb3
HTTP/1.1 200 OK
X-Account-Container-Count: 1
X-Account-Object-Count: 1
X-Account-Bytes-Used: 10

test_container

Hopefully this helps explains things a bit.