From 47cbf09a228040ea33918a472481f464ef9ad261 Mon Sep 17 00:00:00 2001 From: Chetan Risbud Date: Fri, 28 Feb 2014 16:39:46 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/7168 Reviewed-by: Prashanth Pai Tested-by: Prashanth Pai Reviewed-by: pushpesh sharma Tested-by: pushpesh sharma --- .../swift/common/middleware/gswauth/bin/gswauth-cleanup-tokens | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gluster') 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.' -- cgit