Skip to content

Commit

Permalink
Adds resource_filters.json distribution
Browse files Browse the repository at this point in the history
Cinder supposes to see resource_filters.json in
/etc/cinder/resource_filters.json, but role doesn't distribute this file
It implements generalized filters, w/o which non-admins will
experience problems with some operations (i.e in horizon).

Closes-Bug: #1810537
Change-Id: I0f699c9869effc5ccc0d3f79422935975f698134
(cherry picked from commit 5e7e1a7)
  • Loading branch information
Dmitriy Rabotjagov authored and Dmitriy Rabotjagov (noonedeadpunk) committed Jan 8, 2019
1 parent a824d8d commit a4f0db7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Expand Up @@ -371,6 +371,7 @@ cinder_rootwrap_conf_overrides: {}
cinder_api_paste_ini_overrides: {}
cinder_cinder_conf_overrides: {}
cinder_api_uwsgi_ini_overrides: {}
cinder_resource_filters_overrides: {}

## Set default cinder path in service units. The default override sets the
## execution path for the cinder service.
Expand Down
4 changes: 4 additions & 0 deletions tasks/cinder_post_install.yml
Expand Up @@ -31,6 +31,10 @@
dest: "/etc/cinder/api-paste.ini"
config_overrides: "{{ cinder_api_paste_ini_overrides }}"
config_type: "ini"
- src: "resource_filters.json.j2"
dest: "/etc/cinder/resource_filters.json"
config_overrides: "{{ cinder_resource_filters_overrides }}"
config_type: "json"
- src: "rootwrap.conf.j2"
dest: "/etc/cinder/rootwrap.conf"
config_overrides: "{{ cinder_rootwrap_conf_overrides }}"
Expand Down
15 changes: 15 additions & 0 deletions templates/resource_filters.json.j2
@@ -0,0 +1,15 @@
{
"volume": ["name", "status", "metadata",
"bootable", "migration_status", "availability_zone",
"group_id"],
"backup": ["name", "status", "volume_id"],
"snapshot": ["name", "status", "volume_id", "metadata",
"availability_zone"],
"group": [],
"group_snapshot": ["status", "group_id"],
"attachment": ["volume_id", "status", "instance_id", "attach_status"],
"message": ["resource_uuid", "resource_type", "event_id",
"request_id", "message_level"],
"pool": ["name", "volume_type"],
"volume_type": []
}

0 comments on commit a4f0db7

Please sign in to comment.