cinder/etc/cinder/rootwrap.d
John Griffith 005ba243d6 Fix secondary lvm cmds rootwrap filters
When using LVM the various cmds have a number of potential formats due
to options like LVM_SUPPRESS_FD_WARNINGS and LVM_SYSTEM_DIR
specifications.  The volume.filters were set up to provide each
combination by having a second, third and fourth version of the filter:

  # LVM related show commands
  pvs: EnvFilter, env, root, LC_ALL=C, pvs
  vgs: EnvFilter, env, root, LC_ALL=C, vgs
  lvs: EnvFilter, env, root, LC_ALL=C, lvs
  lvdisplay: EnvFilter, env, root, LC_ALL=C, lvdisplay

  # -LVM related show commands with suppress fd warnings
  pvs_fdwarn: EnvFilter, env, root, LC_ALL=C, LVM_SUPPRESS_FD_WARNINGS=, pvs
  vgs_fdwarn: EnvFilter, env, root, LC_ALL=C, LVM_SUPPRESS_FD_WARNINGS=, vgs
  lvs_fdwarn: EnvFilter, env, root, LC_ALL=C, LVM_SUPPRESS_FD_WARNINGS=, lvs
  lvs_fdwarn: EnvFilter, env, root, LC_ALL=C, LVM_SUPPRESS_FD_WARNINGS=, lvdisplay

This no longer works, the first pvs/vgs/lvs filters will always get picked up
and the cmds for any special configs will fail.  We used to use regexs for this
sort of thing, but then we switched to just adding unique filters.  I'm not sure
how this was working or why it doesn't seem to work as of Newton, but regardless,
replacing the _xxxx with just an integer seems to work fine, rootwrap apparantly
just doesn't like '_' or '-' in the filter name, so we'll change it to just use
a digit appended to the filter name.  There are some other filters that may need
checked here as well.

Change-Id: I1a7c3048841c095a8e92795d7dfa0cb5c2a96645
Close-Bug: #1646053
2016-12-02 04:11:53 +00:00
..
volume.filters Fix secondary lvm cmds rootwrap filters 2016-12-02 04:11:53 +00:00