]> 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)
commit718f59b643142585a8d2aa3314c3d1c1be98c3c4
treef907e1b7e432a9b4ce19bc5d0901197af4b127a7
parentb49b0b300686e8b9d9f1796d1576a12acf7ba18b
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
trusty/debian/changelog
trusty/debian/patches/keyerror-688254.patch [new file with mode: 0644]
trusty/debian/patches/series