Quantum client should refresh keystone token

Bug #1034212 reported by Nachi Ueno
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Akihiro Motoki

Bug Description

Quantum client should refresh keystone token
We need to initiate client for each method, because quantum client didn't refresh keystone token.

Revision history for this message
dan wendlandt (danwent) wrote :

right now we work around this by recreating a quantumclient each time we need to use it... but that is clunky, and probably puts more load on keystone.

Changed in quantum:
milestone: none → folsom-3
importance: Undecided → Medium
status: New → Confirmed
Nachi Ueno (nati-ueno)
Changed in quantum:
assignee: nobody → Nachi Ueno (nati-ueno)
Revision history for this message
Akihiro Motoki (amotoki) wrote :

Nachi,
I have a fix for this.
If you have not worked on it, I would like to post the patch.

Revision history for this message
Nachi Ueno (nati-ueno) wrote :

Awesome!
I got it.

Changed in quantum:
assignee: Nachi Ueno (nati-ueno) → Akihiro Motoki (amotoki)
Revision history for this message
yong sheng gong (gongysh) wrote :

What env or cases are you talking about? I am confused.

Revision history for this message
Nachi Ueno (nati-ueno) wrote :

In the Quantum or Nova code, we are initializing quantum client on each method call.
This bug addresses that problem.

Revision history for this message
yong sheng gong (gongysh) wrote :

Most of the methods called in a nova context will get the token from it. Only that methods called in periodic tasks need to auth and then get the token.

We can improve later case by a cache.

Revision history for this message
Nachi Ueno (nati-ueno) wrote :

This bug is not for that case.
There are some use case we need admin token of Quantum in the Quantum and Nova.
L3 or DHCP agent are one of usecase.
In nova, quantumv2 network api is another example.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

As Nachi wrote, L3 agent, DHCP agent or Meta Plugin's proxy agent use quantum client inside. They initialize quantumclient at the startup sequence and reuse the quantumclient object.

In the current implementation, once keystone authN is done, the keystone token is not refreshed even after the token is expired. quantumclient.client.HTTPClient check only self.endpoint_url and if self.endpoint_url is set the client never do keystone authN, so the token expired is never refreshed. It is the reason.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

Gerrit Review is available: https://review.openstack.org/#/c/11206/

Revision history for this message
dan wendlandt (danwent) wrote :

Yes, I run into this with l3-agent. It will be nice to have this fix.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

The patch has been merged into the mainline.

Changed in quantum:
status: Confirmed → Fix Committed
Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: folsom-3 → 2012.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.