From bfb41571b23d04c9e8fc74caf3d9f94911b8e414 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Tue, 24 Sep 2019 12:12:35 +0200 Subject: [PATCH] Drop rootwrap.d/ironic-lib.filters file The file is included in the ironic-lib module and there is no difference (beside some comments) in the files. For packagers, this solves the problem that ironic-lib and ironic are currently not installable together given that both packages contain the same file. Story: 2006604 Task: 36772 Depends-On: https://review.opendev.org/684771 Change-Id: I2d800d4c2616ccd9d9f12a2fe59e259def15dc6b --- devstack/lib/ironic | 11 ++++++++ etc/ironic/rootwrap.d/ironic-lib.filters | 28 ------------------- ...lib-rootwrap-filters-f9224173289c1e30.yaml | 6 ++++ 3 files changed, 17 insertions(+), 28 deletions(-) delete mode 100644 etc/ironic/rootwrap.d/ironic-lib.filters create mode 100644 releasenotes/notes/drop-ironic-lib-rootwrap-filters-f9224173289c1e30.yaml diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 9bd81efbe9..bfe408aae6 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -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 diff --git a/etc/ironic/rootwrap.d/ironic-lib.filters b/etc/ironic/rootwrap.d/ironic-lib.filters deleted file mode 100644 index 342ab69eb5..0000000000 --- a/etc/ironic/rootwrap.d/ironic-lib.filters +++ /dev/null @@ -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 diff --git a/releasenotes/notes/drop-ironic-lib-rootwrap-filters-f9224173289c1e30.yaml b/releasenotes/notes/drop-ironic-lib-rootwrap-filters-f9224173289c1e30.yaml new file mode 100644 index 0000000000..b5d796d090 --- /dev/null +++ b/releasenotes/notes/drop-ironic-lib-rootwrap-filters-f9224173289c1e30.yaml @@ -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.