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>
This commit is contained in:
Chetan Risbud 2014-02-28 16:39:46 +05:30
parent 369050cb57
commit 47cbf09a22

View File

@ -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.'