Hello,<div><br></div><div>I've been aware of Bug 1004412 (<a href="https://bugs.launchpad.net/horizon/+bug/1004412" target="_blank">https://bugs.launchpad.net/horizon/+bug/1004412</a>) in my Essex deployments for a while and finally had some time to look into it in detail.</div>

<div><br></div><div>I believe I have found the cause and wanted to discuss what I found vs how it was fixed in the patch.</div><div><br></div><div>From what I can see, when an admin requests a list of volumes, all volumes in the cloud are returned. But when an admin requests a list of instances, only instances owned by the admin are returned -- unless an option to return all instances is specified.</div>

<div><br></div><div>Because of these two distinct actions, the chances of a KeyError happening when visiting /nova/instances_and_volumes is extremely high once other projects begin working in the OpenStack environment: all volumes from all projects are returned but only admin instances are returned, so any volume attached in another project cannot find its corresponding instance.</div>

<div><br></div><div>I see two proper solutions to this issue: either only return volumes owned by the admin or return all instances in all projects by default. I was unable to figure out (without doing too many changes) how to filter volumes, so I decided on the latter solution. In views.py, I modified the call to get a list of instances to be:</div>
<div><br></div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">            if self.request.user.is_admin():</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
                self._instances_list = api.server_list(self.request, all_tenants=True)</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">            else:</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">                self._instances_list = api.server_list(self.request)</div></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Without looking at the implementation details, but instead what the implementation is trying to achieve, I do not see this same issue being resolved in the patch (<a href="https://github.com/openstack/horizon/commit/155bfb72c1b5f866236928f4ffd0c2567dc556f3">https://github.com/openstack/horizon/commit/155bfb72c1b5f866236928f4ffd0c2567dc556f3</a>). </div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
My question is if I have incorrectly assessed the issue or if the patch is taking other things into account that I'm not aware of? </div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Thanks,</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Joe</div><div><br clear="all"><div><br></div>-- <br>Joe Topjian<div>Systems Administrator</div><div>Cybera Inc.</div><div><br></div><div><a href="http://www.cybera.ca" target="_blank">www.cybera.ca</a></div><div><br>
</div><div><font color="#666666"><span>Cybera</span><span> is a not-for-profit organization that works to spur and support innovation, for the economic benefit of Alberta, through the use of cyberinfrastructure.</span></font></div>

<br>
</div>