]> review.fuel-infra Code Review - openstack-build/horizon-build.git/commit
Description: Fixes a Keyerror when displaying Instances & Volumes
authorLoic Dachary <loic@dachary.org>
Fri, 21 Sep 2012 13:20:55 +0000 (15:20 +0200)
committerLoic Dachary <loic@dachary.org>
Fri, 21 Sep 2012 13:20:55 +0000 (15:20 +0200)
commitb79fa7be43cad011f3bb89086993f2cedcf93549
tree9b1c8b931f83fa70e09fe189fa767b8415a3fe24
parent7be40bfabe4d7dc5f8263093b64e1e7f7dcaf692
Description: Fixes a Keyerror when displaying Instances & Volumes
 .
 bug 1053488 prevents the display of the Instances & Volumes page for
 every account with administrative permissions, once a volume has been
 created and attached to an instance. While there are workarounds (
 such as using an unprivileged account to display the same page ), it
 affects almost all admin users deploying the current release of
 horizon in Essex.
 .
 The source of the problem is that the relevant portion of code loops
 over all existing volumes while it only has access to the instances
 that are owned by the current tenant. As a consequence, it fails to
 find the instance to which a volume is attached when it does not
 belong to the current tenant.
 .
 A possible fix would be to change the behaviour of the volume list
 API so that it only returns the volumes of the current tenant even
 when the user has administrative rights. However, this would be a
 user visible change that may have side effects beyond the current
 bug.
 .
 The proposed patch catches the lookup error when the instance is not
 found for a given volume and creates a fake instance object which
 will only be used to display the name "UNKNOWN".
 .
 The associated test re-creates the conditions and derives from
 the class that will give administrative permissions to the test
 user. However, since the data is created from fixed data instead of
 being actually retrieved from the API, this derivation is only
 included to illustrate the purpose of the test.

Rewritten-From: 0ff59d489a66b6dc665cc25fb3a0beb7917e0cf4
xenial/debian/changelog
xenial/debian/patches/keyerror-688254.patch [new file with mode: 0644]
xenial/debian/patches/series