limit_container_types can't/won't filter certain vars

Bug #1662466 reported by Andy McCrae
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-ansible
Confirmed
Wishlist
Nolan Brubaker

Bug Description

limit_container_types works on a var like cinder_backends as follows:

container_vars:
  cinder_backends:
    limit_container_types: cinder_all

It only applies the var to hosts that match the filter.

limit_container_types doesn't get applied to "container_vars" though, so you can't filter all vars in container_vars.

Additionally, some vars can't be filtered, for example "glance_nfs_clients" because it is a list of dicts, so the following won't be filtered:

container_vars:
  limit_container_types: glance_all
  glance_nfs_clients:
    - key1: v1
      key2: v2

And the following is invalid syntactically:
container_vars:
  glance_nfs_clients:
    limit_container_types: glance_all
    - key1: v1
      key2: v2

It seems limit_container_types should apply on the container_vars level - but don't, so it's not possible to filter all vars.

Changed in openstack-ansible:
assignee: nobody → Nolan Brubaker (nolan-brubaker)
Revision history for this message
Nolan Brubaker (nolan-brubaker) wrote :

Ok, so looking at this code, I can confirm that this bug describes the current behavior accurately (see https://github.com/openstack/openstack-ansible/blob/master/lib/generate.py#L305-L306, where it iterates over all entries in `container_vars`).

I think this is a reasonable thing to want, but I believe it is a feature request.

The case for `glance_nfs_clients` and similar may be tricky (3rd example provided), though I think adding limit support for `container_vars` itself (the 2nd example) should be fairly straightforward.

Changed in openstack-ansible:
status: New → Confirmed
importance: Undecided → Wishlist
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.