summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChetan Risbud <crisbud@redhat.com>2014-02-28 16:39:46 +0530
committerChetan Risbud <crisbud@redhat.com>2014-03-11 04:24:30 -0700
commit47cbf09a228040ea33918a472481f464ef9ad261 (patch)
tree1cf2a0416f8a02116ef263c2ca452f234402b958
parent369050cb57e26a21d59ec4dabca215ffad55dafd (diff)
Restart memcached after clean-up-token --purge-all
Bug: https://bugs.launchpad.net/gluster-swift/+bug/1269444 Recommended way is to flush the cached tokens from memcached after gswauth-clean-up-token. As currently there is no way to flush only those tokens from memcached. So a debug message recommending restart of the memcached. A quick fix. Bigger fix would come in later. Older cached tokens should be flushed/invalidated to let access path work correctly with valid and new tokens. Change-Id: Ic7a820eb3c60bac4829d5c5230cb3a5241b77957 Signed-off-by: Chetan Risbud <crisbud@redhat.com> Reviewed-on: http://review.gluster.org/7168 Reviewed-by: Prashanth Pai <ppai@redhat.com> Tested-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: pushpesh sharma <psharma@redhat.com> Tested-by: pushpesh sharma <psharma@redhat.com>
-rwxr-xr-xgluster/swift/common/middleware/gswauth/bin/gswauth-cleanup-tokens10
1 files changed, 8 insertions, 2 deletions
diff --git a/gluster/swift/common/middleware/gswauth/bin/gswauth-cleanup-tokens b/gluster/swift/common/middleware/gswauth/bin/gswauth-cleanup-tokens
index ce18501..f73c8b1 100755
--- a/gluster/swift/common/middleware/gswauth/bin/gswauth-cleanup-tokens
+++ b/gluster/swift/common/middleware/gswauth/bin/gswauth-cleanup-tokens
@@ -48,10 +48,14 @@ if __name__ == '__main__':
parser.add_option('-K', '--admin-key', dest='admin_key',
help='The key for .super_admin is required.')
parser.add_option('', '--purge', dest='purge_account', help='Purges all '
- 'tokens for a given account whether the tokens have expired or not.')
+ 'tokens for a given account whether the tokens have expired or not.'
+ ' Memcached restart is recommended. Old tokens may still persist in'
+ ' memcached.')
parser.add_option('', '--purge-all', dest='purge_all', action='store_true',
default=False, help='Purges all tokens for all accounts and users '
- 'whether the tokens have expired or not.')
+ 'whether the tokens have expired or not.'
+ ' Memcached restart is recommended. Old tokens may still persist in'
+ ' memcached.')
args = argv[1:]
if not args:
args.append('-h')
@@ -194,3 +198,5 @@ if __name__ == '__main__':
sleep(options.sleep)
if options.verbose:
print 'Done.'
+ print 'Recommended to restart memcached as old invalid tokens may' \
+ ' still persist in memcached.'