Add "default" rule when generate policy.yaml.sample

Bug #1703066 reported by Damon Li
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Undecided
Unassigned
OpenStack Dashboard (Horizon)
Fix Released
Medium
Unassigned

Bug Description

When we use tox to generate "policy.yaml.sample", the "default" policy is not included in the file. The default rule is enforced when a requested rule is not found. I think it's necessary for our project.

By the way, I tried to use "policy.yaml" generated by nova in horizon. And horizon can't show the "Admin->Instances" panel. I found this panel need a rule called "compute:get_all". I found the default policy file in horizon called "nova_policy.json" has "default" rule. So it can work well.

So I think we should add this "default" rule when we generate "policy.yaml.sample" in nova.

Damon Li (damonl1)
description: updated
Changed in nova:
assignee: nobody → KaiLi (damonl1)
Revision history for this message
Damon Li (damonl1) wrote :
Changed in nova:
status: New → In Progress
Revision history for this message
Matt Riedemann (mriedem) wrote :

compute:get_all doesn't exist in nova policy anymore:

https://docs.openstack.org/nova/latest/sample_policy.html

So this actually sounds like a Horizon bug.

Revision history for this message
Matt Riedemann (mriedem) wrote :

There is no compute:get_all in horizon's default nova_policy.json either:

https://github.com/openstack/horizon/blob/master/openstack_dashboard/conf/nova_policy.json

Which version of Horizon are you using?

Changed in nova:
status: In Progress → Incomplete
Revision history for this message
Matt Riedemann (mriedem) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/483501

Changed in horizon:
assignee: nobody → Rob Cresswell (robcresswell)
status: New → In Progress
tags: added: ocata-backport-potential
Changed in horizon:
milestone: none → pike-3
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/483501
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=69c81b16e07b67ba0a0bc8e1f55049e7987c5b8c
Submitter: Jenkins
Branch: master

commit 69c81b16e07b67ba0a0bc8e1f55049e7987c5b8c
Author: Rob Cresswell <email address hidden>
Date: Thu Jul 13 19:27:22 2017 +0100

    Fix an incorrect policy rule in Admin > Instances

    Change-Id: I765ae0c36d19c88138fbea9545a2ca4791377ffb
    Closes-Bug: #1703066

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/483531

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/ocata)

Reviewed: https://review.openstack.org/483531
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=9aa0915eb85c6b12676b789741a6964d43a60e28
Submitter: Jenkins
Branch: stable/ocata

commit 9aa0915eb85c6b12676b789741a6964d43a60e28
Author: Rob Cresswell <email address hidden>
Date: Thu Jul 13 19:27:22 2017 +0100

    Fix an incorrect policy rule in Admin > Instances

    Change-Id: I765ae0c36d19c88138fbea9545a2ca4791377ffb
    Closes-Bug: #1703066
    (cherry picked from commit 69c81b16e07b67ba0a0bc8e1f55049e7987c5b8c)

tags: added: in-stable-ocata
Revision history for this message
Sean Dague (sdague) wrote :

Found open reviews for this bug in gerrit, setting to In Progress.

review: https://review.openstack.org/481443 in branch: master

Changed in nova:
status: Incomplete → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 12.0.0.0b3

This issue was fixed in the openstack/horizon 12.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Damon Li (<email address hidden>) on branch: master
Review: https://review.openstack.org/481443

Damon Li (damonl1)
Changed in nova:
assignee: KaiLi (damonl1) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 11.0.4

This issue was fixed in the openstack/horizon 11.0.4 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.