← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1772759] [NEW] Horizon checks wrong policy rule for attach_volume

 

Public bug reported:

The instances table in Horizon checks for policy rule
"os_compute_api:servers:attach_volume" (see:
https://git.openstack.org/cgit/openstack/horizon/tree/openstack_dashboard/dashboards/project/instances/tables.py#n895
), but this rule doesn't exist in the default policy file (
https://git.openstack.org/cgit/openstack/horizon/tree/openstack_dashboard/conf/nova_policy.json?h=master
) or in Novas own source or tests.

Instead, the rule "os_compute_api:servers:create:attach_volume" is
used...

In the policy file:
https://git.openstack.org/cgit/openstack/horizon/tree/openstack_dashboard/conf/nova_policy.json?h=master#n138

And in Novas unit tests:
https://git.openstack.org/cgit/openstack/nova/tree/nova/tests/unit/api/openstack/compute/test_serversV21.py#n5414

Generating a policy file from Nova using the oslo policy generator (
https://docs.openstack.org/horizon/latest/contributor/topics/policy.html
) has the same results, the output file includes a rule of
"os_compute_api:servers:create:attach_volume"  but *NOT* of
"os_compute_api:servers:attach_volume" . The net result is that using
the default policy file, or an unmodified generated policy file, results
in the "attach volume" option missing from the Compute Instances menu.

** Affects: horizon
     Importance: Undecided
     Assignee: Jeremy Moffitt (jeremy-moffitt)
         Status: In Progress

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1772759

Title:
  Horizon checks wrong policy rule for attach_volume

Status in OpenStack Dashboard (Horizon):
  In Progress

Bug description:
  The instances table in Horizon checks for policy rule
  "os_compute_api:servers:attach_volume" (see:
  https://git.openstack.org/cgit/openstack/horizon/tree/openstack_dashboard/dashboards/project/instances/tables.py#n895
  ), but this rule doesn't exist in the default policy file (
  https://git.openstack.org/cgit/openstack/horizon/tree/openstack_dashboard/conf/nova_policy.json?h=master
  ) or in Novas own source or tests.

  Instead, the rule "os_compute_api:servers:create:attach_volume" is
  used...

  In the policy file:
  https://git.openstack.org/cgit/openstack/horizon/tree/openstack_dashboard/conf/nova_policy.json?h=master#n138

  And in Novas unit tests:
  https://git.openstack.org/cgit/openstack/nova/tree/nova/tests/unit/api/openstack/compute/test_serversV21.py#n5414

  Generating a policy file from Nova using the oslo policy generator (
  https://docs.openstack.org/horizon/latest/contributor/topics/policy.html
  ) has the same results, the output file includes a rule of
  "os_compute_api:servers:create:attach_volume"  but *NOT* of
  "os_compute_api:servers:attach_volume" . The net result is that using
  the default policy file, or an unmodified generated policy file,
  results in the "attach volume" option missing from the Compute
  Instances menu.

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1772759/+subscriptions


Follow ups