From: Friedrich Weber <f.weber@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH ceph master 3/3] buildsys: add check for changed ceph-osd sysctl settings
Date: Thu, 15 Feb 2024 10:40:56 +0100 [thread overview]
Message-ID: <20240215094056.66233-4-f.weber@proxmox.com> (raw)
In-Reply-To: <20240215094056.66233-1-f.weber@proxmox.com>
If the ceph-osd sysctl settings template (30-ceph-osd.conf.in) shipped
by upstream changes, our ceph-osd postinst patch will need to be
adapted to apply the new settings on package upgrade. To make sure we
do not forget, store the current checksum of that file in our Makefile
and fail the build early if the checksums do not match.
Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
---
Notes:
- failing the build might be a bit drastic, but a simple warning seems
too easy to overlook
- strictly speaking we'll miss updates of `sysctl_pid_max` [1], but to
catch this, we'd need to check the generated 30-ceph-osd.conf
(without .in) after it is generated during the build process, and
failing then sounds may be too annoying :)
[1] https://github.com/ceph/ceph/blob/main/etc/sysctl/90-ceph-osd.conf.in
Makefile | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Makefile b/Makefile
index 9c23cadc5..e99b3b356 100644
--- a/Makefile
+++ b/Makefile
@@ -69,6 +69,11 @@ DEBS=$(MAIN_DEB) $(DEBS_REST)
DSC=ceph_${PKGVER}.dsc
+# ceph-osd postinst will need to be adjusted if the upstream 90-ceph-osd.conf.in
+# changes to make sure new settings are applied on package upgrade
+SYSCTL_CONF=etc/sysctl/90-ceph-osd.conf.in
+SYSCTL_CONF_CHECKSUM=0e3b515c4a81a5b118dbc9e08baec0dbd2a460b781b655e1e84807ccfb5827b4
+
all: ${DEBS} ${DBG_DEBS}
@echo ${DEBS}
@echo ${DBG_DEBS}
@@ -90,6 +95,8 @@ ${BUILDSRC}: ${SRCDIR} patches
deb: ${DEBS} ${DBG_DEBS}
${DEBS_REST} ${DBG_DEBS}: $(MAIN_DEB)
$(MAIN_DEB): ${BUILDSRC}
+ @echo "${SYSCTL_CONF_CHECKSUM} ${BUILDSRC}/${SYSCTL_CONF}" | sha256sum -c || \
+ (echo "sysctl settings file changed, adjust ceph-osd postinst and Makefile!"; exit 1)
cd ${BUILDSRC}; dpkg-buildpackage -b -uc -us
lintian ${DEBS}
@echo ${DEBS}
--
2.39.2
next prev parent reply other threads:[~2024-02-15 9:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-15 9:40 [pve-devel] [PATCH ceph master+quincy-stable-8 0/3] fix #5213: avoid connection freezes when installing/upgrading ceph-osd Friedrich Weber
2024-02-15 9:40 ` [pve-devel] [PATCH ceph master 1/3] fix #5213: ceph-osd postinst: add patch to avoid connection freezes Friedrich Weber
2024-02-15 13:16 ` [pve-devel] applied: " Thomas Lamprecht
2024-02-16 13:54 ` Friedrich Weber
2024-02-15 9:40 ` [pve-devel] [PATCH ceph quincy-stable-8 2/3] " Friedrich Weber
2024-02-15 13:17 ` [pve-devel] applied: " Thomas Lamprecht
2024-02-15 9:40 ` Friedrich Weber [this message]
2024-02-15 13:20 ` [pve-devel] [PATCH ceph master 3/3] buildsys: add check for changed ceph-osd sysctl settings Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240215094056.66233-4-f.weber@proxmox.com \
--to=f.weber@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox