Memcached needs a restart after 'clean-up-token --purge-all'
Steps to Reproduce:
# rm -rf /mnt/gluster-
# rm -rf /mnt/gluster-
rm: cannot remove directory: `/mnt/gluster-
rm: cannot remove directory: `/mnt/gluster-
# gswauth-prep -K gswauthkey
# gswauth-add-account test -K gswauthkey
# gswauth-add-user -a test admin testing -K gswauthkey
# curl -X GET -H 'X-Auth-User: test:admin' -H 'X-Auth-Key: testing' http://
* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /auth/v1.0 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-
> Host: localhost:8080
> Accept: */*
> X-Auth-User: test:admin
> X-Auth-Key: testing
>
< HTTP/1.1 200 OK
< Content-Length: 80
< X-Auth-
< X-Auth-Token: AUTH_tkd4d2a5c8
< X-Storage-Token: AUTH_tkd4d2a5c8
< X-Storage-Url: http://
< Content-Type: text/html; charset=UTF-8
< X-Trans-Id: txb825308e2a734
< Date: Wed, 15 Jan 2014 01:42:23 GMT
<
* Connection #0 to host localhost left intact
* Closing connection #0
{"storage": {"default": "local", "local": "http://
# curl -X PUT -H 'X-Auth-Token: AUTH_tkd4d2a5c8
* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
> PUT /v1/AUTH_test/dir11 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-
> Host: localhost:8080
> Accept: */*
> X-Auth-Token: AUTH_tkd4d2a5c8
>
< HTTP/1.1 201 Created
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8
< X-Trans-Id: tx2048995796dd4
< Date: Wed, 15 Jan 2014 01:48:52 GMT
<
* Connection #0 to host localhost left intact
* Closing connection #0
# gswauth-
HEAD test/.services
HEAD test/admin
.token_
DELETE .token_
GET test?marker=admin
No more objects in test
Done.
# curl -X PUT -H 'X-Auth-Token: AUTH_tkd4d2a5c8
* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
> PUT /v1/AUTH_test/dir12 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-
> Host: localhost:8080
> Accept: */*
> X-Auth-Token: AUTH_tkd4d2a5c8
>
< HTTP/1.1 201 Created
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8
< X-Trans-Id: txaa2683c6995b4
< Date: Wed, 15 Jan 2014 01:50:03 GMT
<
* Connection #0 to host localhost left intact
* Closing connection #0
# service memcached restart
Stopping memcached: [ OK ]
Starting memcached: [ OK ]
# curl -X PUT -H 'X-Auth-Token: AUTH_tkd4d2a5c8
* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
> PUT /v1/AUTH_test/dir12 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-
> Host: localhost:8080
> Accept: */*
> X-Auth-Token: AUTH_tkd4d2a5c8
>
< HTTP/1.1 401 Unauthorized
< Content-Length: 131
< Content-Type: text/html; charset=UTF-8
< X-Trans-Id: txcc7cc0c52a2c4
< Date: Wed, 15 Jan 2014 01:50:17 GMT
<
* Connection #0 to host localhost left intact
* Closing connection #0
<html><
Add tags Tag help
Chetan Risbud (chetan-risbud) wrote on 2014-01-20: #1
Thanks Pushpesh for bringing this up. But it would be gr8 if we could have blueprint for this issue. IMO, this is an issue across all the authentication systems or perhaps any subsystem leveraged with memcache for performance reason. Some call back mechanism is required to make sure cache is flushed whenever call back is invoked.
Above said is just one of the approaches to solve the issue. blue print would help discuss other approaches.
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- pushpesh
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- New
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by