<br><br><div class="gmail_quote">On Sat, Oct 6, 2012 at 7:09 PM, Gabriel Hurley <span dir="ltr"><<a href="mailto:Gabriel.Hurley@nebula.com" target="_blank">Gabriel.Hurley@nebula.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">All of what you said is correct. Those filtering issues (which applied to volumes, keypairs, and security groups at least) were tracked in separate tickets
in Nova and all got fixed towards the tail end of Folsom. I don’t have the commits handy, sorry. The proper fix was filtering the results returned from Nova correctly on that end; the fix on the ticket you listed was only a defense against the problem on Horizon’s
end.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p style="margin-left:27.0pt">
<u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><span>-<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Gabriel<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> openstack-bounces+gabriel.hurley=<a href="mailto:nebula.com@lists.launchpad.net" target="_blank">nebula.com@lists.launchpad.net</a> [mailto:<a href="mailto:openstack-bounces%2Bgabriel.hurley" target="_blank">openstack-bounces+gabriel.hurley</a>=<a href="mailto:nebula.com@lists.launchpad.net" target="_blank">nebula.com@lists.launchpad.net</a>]
<b>On Behalf Of </b>Joe Topjian<br>
<b>Sent:</b> Saturday, October 06, 2012 11:19 AM<br>
<b>To:</b> openstack<br>
<b>Subject:</b> [Openstack] Horizon Bug 1004412 Details<u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Hello,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I believe I have found the cause and wanted to discuss what I found vs how it was fixed in the patch.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"> if self.request.user.is_admin():<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"> self._instances_list = api.server_list(self.request, all_tenants=True)<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"> else:<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"> self._instances_list = api.server_list(self.request)<u></u><u></u></span></p>
</div>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222">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" target="_blank">https://github.com/openstack/horizon/commit/155bfb72c1b5f866236928f4ffd0c2567dc556f3</a>). <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222">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? <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222">Thanks,<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222">Joe<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">-- <br>
Joe Topjian<u></u><u></u></p>
<div>
<p class="MsoNormal">Systems Administrator<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Cybera Inc.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="http://www.cybera.ca" target="_blank">www.cybera.ca</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#666666">Cybera 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><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
</div>
<br>_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
<br></blockquote></div>Hi Joe and Gabriel,<div><br></div><div>The changes were in fact merged to Folsom as Gabriel mentioned. The specific patches were:</div><div>Cinder-Volume: <a href="https://review.openstack.org/#q,Ie9d74e9c09fa0c192ab6257b5fb02d65b593cbfb,n,z" style="color:rgb(0,0,170);font-family:'Lucida Console','Lucida Sans Typewriter',Monaco,monospace;font-size:11px;white-space:pre;background-color:rgb(255,255,255)">Ie9d74e9c09fa0c192ab6257b5fb02d65b593cbfb</a></div>
<div>Cinder-Snapshot: <a href="https://review.openstack.org/#q,I2a8338d77badc70201bb315198183f2091df43fb,n,z" style="color:rgb(0,0,170);font-family:'Lucida Console','Lucida Sans Typewriter',Monaco,monospace;font-size:11px;white-space:pre;background-color:rgb(255,255,255)">I2a8338d77badc70201bb315198183f2091df43fb</a></div>
<div><br></div><div>Further details can be viewed (including the Nova-Volume version of the patches) in the bug: <a href="https://bugs.launchpad.net/horizon/+bug/967882">https://bugs.launchpad.net/horizon/+bug/967882</a></div>
<div><br></div><div>Thanks,</div><div>John</div>