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
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
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
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: 127.0.0. 1:8080/ v1/AUTH_ test -Hx-auth- token:AUTH_ tk8c663f1dd7364 e48a5f64ccdc695 4cb3 Container- Count: 0 Object- Count: 0 Bytes-Used: 0
$ curl -i http://
HTTP/1.1 204 No Content
X-Account-
X-Account-
X-Account-
Now, create a new container: 127.0.0. 1:8080/ v1/AUTH_ test/test_ container -Hx-auth- token:AUTH_ tk8c663f1dd7364 e48a5f64ccdc695 4cb3
$ curl -XPUT http://
201 Created
Check what the account's listing of containers shows (this update is *almost* always immediate, but might be delayed): 127.0.0. 1:8080/ v1/AUTH_ test -Hx-auth- token:AUTH_ tk8c663f1dd7364 e48a5f64ccdc695 4cb3 Container- Count: 1 Object- Count: 0 Bytes-Used: 0
$ curl -i http://
HTTP/1.1 200 OK
X-Account-
X-Account-
X-Account-
test_container
Next, create an object in that container: 127.0.0. 1:8080/ v1/AUTH_ test/test_ container/ test_object --data-binary test_value -Hx-auth- token:AUTH_ tk8c663f1dd7364 e48a5f64ccdc695 4cb3
$ curl -XPUT http://
201 Created
Check what the account's listing of containers shows again (object stats to the account level are *always* delayed): 127.0.0. 1:8080/ v1/AUTH_ test -Hx-auth- token:AUTH_ tk8c663f1dd7364 e48a5f64ccdc695 4cb3 Container- Count: 1 Object- Count: 0 Bytes-Used: 0
$ curl -i http://
HTTP/1.1 200 OK
X-Account-
X-Account-
X-Account-
test_container
Check what the container's listing of objects shows (this is *almost* always immediate, but may be delayed): 127.0.0. 1:8080/ v1/AUTH_ test/test_ container -Hx-auth- token:AUTH_ tk8c663f1dd7364 e48a5f64ccdc695 4cb3 Object- Count: 1 Bytes-Used: 10
$ curl -i http://
HTTP/1.1 200 OK
X-Container-
X-Container-
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): 127.0.0. 1:8080/ v1/AUTH_ test -Hx-auth- token:AUTH_ tk8c663f1dd7364 e48a5f64ccdc695 4cb3 Container- Count: 1 Object- Count: 1 Bytes-Used: 10
$ curl -i http://
HTTP/1.1 200 OK
X-Account-
X-Account-
X-Account-
test_container
Hopefully this helps explains things a bit.