From 563811f386e79dab14a56e2be343dcd1ea6bd5bf Mon Sep 17 00:00:00 2001 From: Dan Voiculeasa Date: Thu, 2 Jun 2022 18:04:50 +0300 Subject: [PATCH] debian: Create /drbd directory This work affects only Debian. This is part of a fix for a bootstrap issue. /drbd directory is currently created during bootstrap by puppet. Ostree doesn't allow changes to root mountpoint / at runtime. Create /drbd with correct permissions at package install time. Tests on AIO-SX: PASS: build-pkgs, build-image, install PASS: bootstrap without ostree unlock goes past the issue Story: 2009964 Task: 45533 Signed-off-by: Dan Voiculeasa Change-Id: Ic22ff6650c7f46b25e1079c237028b5572383a56 --- .../0003-Ensure-drbd-is-present.patch | 42 +++++++++++++++++++ .../drbd/drbd-tools/debian/deb_patches/series | 1 + 2 files changed, 43 insertions(+) create mode 100644 filesystem/drbd/drbd-tools/debian/deb_patches/0003-Ensure-drbd-is-present.patch diff --git a/filesystem/drbd/drbd-tools/debian/deb_patches/0003-Ensure-drbd-is-present.patch b/filesystem/drbd/drbd-tools/debian/deb_patches/0003-Ensure-drbd-is-present.patch new file mode 100644 index 000000000..703ed3a23 --- /dev/null +++ b/filesystem/drbd/drbd-tools/debian/deb_patches/0003-Ensure-drbd-is-present.patch @@ -0,0 +1,42 @@ +From 93f3735fd991886409fad1200507c6423a1fd0b1 Mon Sep 17 00:00:00 2001 +From: Dan Voiculeasa +Date: Thu, 2 Jun 2022 18:01:41 +0300 +Subject: [PATCH 3/3] Ensure /drbd is present + +Puppet cannot create /drbd on because ostree doesn't allow changes +in root mountpoint. +Create /drbd during package install time. Keep perms 750 as on CentOS. + +Signed-off-by: Dan Voiculeasa +--- + debian/drbd-utils.dirs | 1 + + debian/drbd-utils.postinst | 4 ++++ + 2 files changed, 5 insertions(+) + +diff --git a/debian/drbd-utils.dirs b/debian/drbd-utils.dirs +index 10a4e40..340da51 100644 +--- a/debian/drbd-utils.dirs ++++ b/debian/drbd-utils.dirs +@@ -1,3 +1,4 @@ ++drbd + etc + etc/init.d + etc/ha.d/resource.d +diff --git a/debian/drbd-utils.postinst b/debian/drbd-utils.postinst +index bfb81eb..7066703 100644 +--- a/debian/drbd-utils.postinst ++++ b/debian/drbd-utils.postinst +@@ -2,6 +2,10 @@ + + set -e + ++if [ "$1" = "configure" ] ; then ++ chmod 750 /drbd ++fi ++ + # Cleanup the old systemd unit state, if applicable + if dpkg --compare-versions "$2" lt-nl "8.9.5-1~"; then + if deb-systemd-helper debian-installed drbd.service; then +-- +2.34.1 + diff --git a/filesystem/drbd/drbd-tools/debian/deb_patches/series b/filesystem/drbd/drbd-tools/debian/deb_patches/series index ac7c49493..65ad9c223 100644 --- a/filesystem/drbd/drbd-tools/debian/deb_patches/series +++ b/filesystem/drbd/drbd-tools/debian/deb_patches/series @@ -1,2 +1,3 @@ 0001-Add-lintian-overrides-for-StarlingX-build-env.patch 0002-Add-drbd.service-file.patch +0003-Ensure-drbd-is-present.patch