0505bb268942534ad5d6ecd5e34a4d9b0e7f5c04
Recently it was observed that with large numbers of volumes that things like "cinder list" could take extremely long to return. For example, running cinder list on a system with 1000 volumes took greater than 30 seconds to return. It turns out that the cause of this is the addition of visible admin_metadata. There's two problems with this: 1. The original patch probably shouldn't have gone in data is either admin data or it's not, selectively picking pieces of admin data out to provide to the user just creates complications and introduces confusion. 2. The REAL issue here is that since the standar gets are made with the standard user context, the add_visible_admin_metadata would go through and do an elevated context get on every single volume individually. This is what caused the horrible performance issue on cinder list with large numbers of volumes. Running as admin, or removing the second call drops this down to about 3 seconds for the same 1000 volume list. This patch removes the secondary admin context get_call. Instead where we expect to do display the visible admin_meta, we pass in a flag requesting that the volume object we're getting has the appropriate metadata. This way we can elevate the context if needed and avoid iterating through the gets again. This patch also cleans up the get_visible_admin_meta methods, and consolidates both V1 and V2 to use the utils method. Change-Id: I3fb7aefb7d8a5664b0a3fb3958f509b5cd621320 Closes-Bug: 1317606
The Choose Your Own Adventure README for Cinder
You have come across a storage service for an open cloud computing service. It has identified itself as "Cinder." It was abstracted from the Nova project.
To monitor it from a distance: follow @openstack on twitter.
To tame it for use in your own cloud: read http://docs.openstack.org
To study its anatomy: read http://cinder.openstack.org
To dissect it in detail: visit http://github.com/openstack/cinder
To taunt it with its weaknesses: use http://bugs.launchpad.net/cinder
To watch it: http://jenkins.openstack.org
To hack at it: read HACKING.rst
Description
Languages
Python
99.7%
Smarty
0.3%