Merge "Drop rootwrap.d/ironic-lib.filters file"

This commit is contained in:
Zuul 2020-03-17 12:59:00 +00:00 committed by Gerrit Code Review
commit 9dcfa6c388
3 changed files with 17 additions and 28 deletions

@ -1425,6 +1425,17 @@ function configure_ironic_conductor {
configure_rootwrap ironic
# additional rootwrap config from ironic-lib
local ironic_lib_prefix
if use_library_from_git "ironic-lib"; then
ironic_lib_prefix=${GITDIR["ironic-lib"]}
else
# pip uses default python 'data' path
ironic_lib_prefix=$(python -c "import sysconfig; \
print(sysconfig.get_path('data'))")
fi
sudo install -o root -g root -m 644 $ironic_lib_prefix/etc/ironic/rootwrap.d/*.filters /etc/ironic/rootwrap.d
# set up drivers / hardware types
iniset $IRONIC_CONF_FILE DEFAULT enabled_hardware_types $IRONIC_ENABLED_HARDWARE_TYPES

@ -1,28 +0,0 @@
# An ironic-lib.filters to be used with rootwrap command.
# The following commands should be used in filters for disk manipulation.
# This file should be owned by (and only-writable by) the root user.
# NOTE: this file is a copy of ironic-lib.filters from the ironic-lib
# repository that should ultimately be remove. At this point, we still
# need it to avoid gate breakage and preserve compatibily with existing
# installation.
[Filters]
# ironic_lib/disk_utils.py
blkid: CommandFilter, blkid, root
blockdev: CommandFilter, blockdev, root
hexdump: CommandFilter, hexdump, root
lsblk: CommandFilter, lsblk, root
qemu-img: CommandFilter, qemu-img, root
wipefs: CommandFilter, wipefs, root
sgdisk: CommandFilter, sgdisk, root
partprobe: CommandFilter, partprobe, root
# ironic_lib/utils.py
mkswap: CommandFilter, mkswap, root
mkfs: CommandFilter, mkfs, root
dd: CommandFilter, dd, root
# ironic_lib/disk_partitioner.py
fuser: CommandFilter, fuser, root
parted: CommandFilter, parted, root

@ -0,0 +1,6 @@
---
other:
- |
The rootwrap filter file called "ironic-lib.filters" is no longer part
of Ironic. The same file is available from the ironic-lib module which is
already an install requirement.