Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the role of monasca-api memcached #487

Open
zhangjianweibj opened this issue Jan 3, 2019 · 9 comments
Open

the role of monasca-api memcached #487

zhangjianweibj opened this issue Jan 3, 2019 · 9 comments

Comments

@zhangjianweibj
Copy link
Contributor

hello,i install monasca in my docker platform.find memecached no any message.but monasca workds well.i wonder what is the role of monasca memcached.is api get tokens from memcached ,if memcached no token then request to keystone and put token in memcached?very thanks..

@zhangjianweibj
Copy link
Contributor Author

image

memcached no any message

@witekest
Copy link
Member

witekest commented Jan 3, 2019

You're right. Memcached caches Keystone tokens to reduce the number of authorization requests to Keystone.

@matrixik
Copy link
Member

matrixik commented Jan 3, 2019

I just tested it with docker-compose and memcached is used correctly:

STAT cmd_get 443
STAT cmd_set 19
STAT get_misses 20
STAT get_expired 12
STAT curr_items 1
STAT total_items 19
stats items
STAT items:14:number 1
STAT items:14:number_hot 0
STAT items:14:number_warm 0
STAT items:14:number_cold 1
STAT items:14:age_hot 0
STAT items:14:age_warm 0
STAT items:14:age 25
STAT items:14:evicted 0
STAT items:14:evicted_nonzero 0
STAT items:14:evicted_time 0
STAT items:14:outofmemory 0
STAT items:14:tailrepairs 0
STAT items:14:reclaimed 6
STAT items:14:expired_unfetched 0
STAT items:14:evicted_unfetched 0
STAT items:14:evicted_active 0
STAT items:14:crawler_reclaimed 0
STAT items:14:crawler_items_checked 4
STAT items:14:lrutail_reflocked 452
STAT items:14:moves_to_cold 234
STAT items:14:moves_to_warm 215
STAT items:14:moves_within_lru 8
STAT items:14:direct_reclaims 0
STAT items:14:hits_to_hot 16
STAT items:14:hits_to_warm 9
STAT items:14:hits_to_cold 398
STAT items:14:hits_to_temp 0
END

Are you sure monasca-api can connect to memcached? Any warnings/errors in monasca-api logs?

@zhangjianweibj
Copy link
Contributor Author

api error logs show api can not validate token.
image

but keystone logs show token validate success.

image

i think keystone validate token success ,but cached token in memecached failed.then api judge the token validate failed.memcached may encounter some problems.but kubectl logs memcached -n morning say nothing.i find dockerfile no any configuration parameter.

@matrixik
Copy link
Member

matrixik commented Jan 4, 2019

But from memcached stats looks like nothing is send to memcached.
STAT total_items 0
For me it's looks like nothing is send from api to memcached.

@zhangjianweibj
Copy link
Contributor Author

very thanks.i check the api source code(https://github.com/openstack/monasca-api/blob/master/README.rst),but find nothing about memcached operate.en ,i thank memcached is used by keystone,not cached tokens for api.did you find any operation about memcached in api project?

as the picture show,keystone can use memcached cach tokens.

image

@zhangjianweibj
Copy link
Contributor Author

thanks,but i mean the project source code(*.py),not the configuration file.

image

@matrixik
Copy link
Member

matrixik commented Jan 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants