commit btrfsmaintenance for openSUSE:Factory
Hello community, here is the log from the commit of package btrfsmaintenance for openSUSE:Factory checked in at 2019-03-20 13:17:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/btrfsmaintenance (Old) and /work/SRC/openSUSE:Factory/.btrfsmaintenance.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "btrfsmaintenance" Wed Mar 20 13:17:32 2019 rev:20 rq:686180 version:0.4.2 Changes: -------- --- /work/SRC/openSUSE:Factory/btrfsmaintenance/btrfsmaintenance.changes 2018-09-26 14:23:31.941911238 +0200 +++ /work/SRC/openSUSE:Factory/.btrfsmaintenance.new.28833/btrfsmaintenance.changes 2019-03-20 13:17:35.981366989 +0100 @@ -1,0 +2,21 @@ +Tue Mar 12 20:37:45 UTC 2019 - jeffm@suse.com + +- Document and adjust balance thresholds and periods (FATE#325529 jsc#SLE-3188). + * README: document impact of balance + quota groups + * sysconfig: reduce default balance usage thresholds + * sysconfig: document using systemd.time(7) for frequency of operations + * btrfsmaintenance-refresh-cron.sh: validate periods for cron-based systems +- Remove python dependency (FATE#326736 jsc#SLE-4130). + * btrfs-defrag-plugin: remove dependency on zypp-plugin-python +- Added patches: + * 0001-README-document-impact-of-balance-quota-groups.patch + * 0002-sysconfig-reduce-default-balance-usage-thresholds-fa.patch + * 0003-sysconfig-document-using-systemd.time-7-for-frequenc.patch + * 0004-btrfsmaintenance-refresh-cron.sh-validate-periods-fo.patch + * 0005-btrfs-defrag-plugin-remove-dependency-on-zypp-plugin.patch +- Added source: + * btrfs-defrag-plugin.sh +- Removed patch: + * python3-support-bsc1070322.diff + +------------------------------------------------------------------- Old: ---- python3-support-bsc1070322.diff New: ---- 0001-README-document-impact-of-balance-quota-groups.patch 0002-sysconfig-reduce-default-balance-usage-thresholds-fa.patch 0003-sysconfig-document-using-systemd.time-7-for-frequenc.patch 0004-btrfsmaintenance-refresh-cron.sh-validate-periods-fo.patch 0005-btrfs-defrag-plugin-remove-dependency-on-zypp-plugin.patch btrfs-defrag-plugin.sh ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ btrfsmaintenance.spec ++++++ --- /var/tmp/diff_new_pack.DlnVvk/_old 2019-03-20 13:17:36.473366880 +0100 +++ /var/tmp/diff_new_pack.DlnVvk/_new 2019-03-20 13:17:36.473366880 +0100 @@ -1,7 +1,7 @@ # # spec file for package btrfsmaintenance # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -29,10 +29,14 @@ Group: System/Base Url: https://github.com/kdave/btrfsmaintenance Source0: %{name}-%{version}.tar.bz2 -Patch0: python3-support-bsc1070322.diff +Source1: btrfs-defrag-plugin.sh +Patch1: 0001-README-document-impact-of-balance-quota-groups.patch +Patch2: 0002-sysconfig-reduce-default-balance-usage-thresholds-fa.patch +Patch3: 0003-sysconfig-document-using-systemd.time-7-for-frequenc.patch +Patch4: 0004-btrfsmaintenance-refresh-cron.sh-validate-periods-fo.patch +Patch5: 0005-btrfs-defrag-plugin-remove-dependency-on-zypp-plugin.patch BuildRequires: systemd Requires: btrfsprogs -Requires: python3-zypp-plugin Requires: libzypp(plugin:commit) Supplements: btrfsprogs BuildArch: noarch @@ -45,7 +49,12 @@ %prep %setup -q -%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +cp %{SOURCE1} . %build @@ -76,7 +85,7 @@ # zypp plugin install -m 755 -d %{buildroot}%{_libexecdir}/zypp/plugins/commit -install -m 755 -D btrfs-defrag-plugin.py %{buildroot}%{_libexecdir}/zypp/plugins/commit +install -m 755 -D btrfs-defrag-plugin.sh %{buildroot}%{_libexecdir}/zypp/plugins/commit # config install -m 755 -d %{buildroot}%{_fillupdir} @@ -107,7 +116,7 @@ %dir %{_libexecdir}/zypp/ %dir %{_libexecdir}/zypp/plugins %dir %{_libexecdir}/zypp/plugins/commit -%{_libexecdir}/zypp/plugins/commit/btrfs-defrag-plugin.py +%{_libexecdir}/zypp/plugins/commit/btrfs-defrag-plugin.sh %{_unitdir}/btrfsmaintenance-refresh.path %{_unitdir}/btrfsmaintenance-refresh.service %{_unitdir}/btrfs-balance.service ++++++ 0001-README-document-impact-of-balance-quota-groups.patch ++++++
From 3e8ae32c961f0a3a6ba32881e88a49d5cbf656cd Mon Sep 17 00:00:00 2001 From: Jeff Mahoney
Date: Fri, 11 Jan 2019 09:57:48 -0500 Subject: README: document impact of balance + quota groups References: fate#325529 jsc#SLE-3188
The combination of balance and quota groups as the number of references
to extents rises (either via snapshots, dedupe, or reflink copies) can
be extreme.
The file system performs quota group accounting for every extent relocated
and the result can be the appearance of stalled system as the
transaction commit can take a very long time.
Signed-off-by: Jeff Mahoney
From 194fd3a02f686737ae7d266d72d35a3418a5903b Mon Sep 17 00:00:00 2001 From: Jeff Mahoney
Date: Fri, 25 Jan 2019 13:29:20 -0500 Subject: sysconfig: reduce default balance usage thresholds References: fate#325529 jsc#SLE-3188
In the early days of btrfs, the only way to clean up empty block groups was to perform a balance operation to coalesce block groups that were mostly free and release the newly empty block groups. Since then, btrfs cleans up empty block groups automatically so the need for regular aggressive balancing has been reduced substantially. Since workload shifts could still produce ENOSPC issues, we still want to perform a periodic balance but we can do it much less aggressively. --- sysconfig.btrfsmaintenance | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysconfig.btrfsmaintenance b/sysconfig.btrfsmaintenance index 4088254..5a34c83 100644 --- a/sysconfig.btrfsmaintenance +++ b/sysconfig.btrfsmaintenance @@ -52,18 +52,18 @@ BTRFS_BALANCE_PERIOD="weekly" ## Path: System/File systems/btrfs ## Type: string -## Default: "1 5 10 20 30 40 50" +## Default: "5 10" # # The usage percent for balancing data block groups. # # Note: default values should not disturb normal work but may not reclaim # enough block groups. If you observe that, add higher values but beware that # this will increase IO load on the system. -BTRFS_BALANCE_DUSAGE="1 5 10 20 30 40 50" +BTRFS_BALANCE_DUSAGE="5 10" ## Path: System/File systems/btrfs ## Type: string -## Default: "1 5 10 20 30" +## Default: "3" # # The usage percent for balancing metadata block groups. The values are also # used in case the filesystem has mixed blockgroups. @@ -71,7 +71,7 @@ BTRFS_BALANCE_DUSAGE="1 5 10 20 30 40 50" # Note: default values should not disturb normal work but may not reclaim # enough block groups. If you observe that, add higher values but beware that # this will increase IO load on the system. -BTRFS_BALANCE_MUSAGE="1 5 10 20 30" +BTRFS_BALANCE_MUSAGE="3" ## Path: System/File systems/btrfs ## Type: string -- 2.16.4 ++++++ 0003-sysconfig-document-using-systemd.time-7-for-frequenc.patch ++++++
From 0302324b7a824741a39e3928dc7a8617485e03ce Mon Sep 17 00:00:00 2001 From: Jeff Mahoney
Date: Fri, 25 Jan 2019 13:35:54 -0500 Subject: sysconfig: document using systemd.time(7) for frequency of operations References: fate#325529 jsc#SLE-3188
On systems using systemd timers, the calendar event format documented in systemd.time(7) may be used to specify when to run balance, defrag, scrub, or trim events. This commit documents that validity. --- sysconfig.btrfsmaintenance | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sysconfig.btrfsmaintenance b/sysconfig.btrfsmaintenance index 5a34c83..b35e2cf 100644 --- a/sysconfig.btrfsmaintenance +++ b/sysconfig.btrfsmaintenance @@ -48,6 +48,10 @@ BTRFS_BALANCE_MOUNTPOINTS="/" ## ServiceRestart: btrfsmaintenance-refresh # # Frequency of periodic balance. +# +# The frequency may be specified using one of the listed values or +# in the format documented in the "Calendar Events" section of systemd.time(7), +# if available. BTRFS_BALANCE_PERIOD="weekly" ## Path: System/File systems/btrfs @@ -89,6 +93,10 @@ BTRFS_SCRUB_MOUNTPOINTS="/" ## ServiceRestart: btrfsmaintenance-refresh # # Frequency of periodic scrub. +# +# The frequency may be specified using one of the listed values or +# in the format documented in the "Calendar Events" section of systemd.time(7), +# if available. BTRFS_SCRUB_PERIOD="monthly" ## Path: System/File systems/btrfs @@ -115,6 +123,10 @@ BTRFS_SCRUB_READ_ONLY="false" # Frequency of periodic trim. Off by default so it does not collide with # fstrim.timer . If you do not use the timer, turn it on here. The recommended # period is 'weekly'. +# +# The frequency may be specified using one of the listed values or +# in the format documented in the "Calendar Events" section of systemd.time(7), +# if available. BTRFS_TRIM_PERIOD="none" ## Path: System/File systems/btrfs -- 2.16.4 ++++++ 0004-btrfsmaintenance-refresh-cron.sh-validate-periods-fo.patch ++++++
From 7851de9a30610885f7fc2f8238128f1c4f2d3593 Mon Sep 17 00:00:00 2001 From: Jeff Mahoney
Date: Fri, 25 Jan 2019 14:08:13 -0500 Subject: btrfsmaintenance-refresh-cron.sh: validate periods for cron-based systems References: fate#325529 jsc#SLE-3188
Now that we accept systemd.time(7) calendar events, ensure that we don't try to use them on cron-based systems. Instead of removing all existing jobs silently, refuse to change the period and print an error. --- btrfsmaintenance-refresh-cron.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/btrfsmaintenance-refresh-cron.sh b/btrfsmaintenance-refresh-cron.sh index 2bf5f8e..10db054 100755 --- a/btrfsmaintenance-refresh-cron.sh +++ b/btrfsmaintenance-refresh-cron.sh @@ -35,6 +35,18 @@ refresh_cron() { SCRIPT="$2" echo "Refresh script $SCRIPT for $EXPECTED" + valid=false + for PERIOD in daily weekly monthly none uninstall; do + if [ "$PERIOD" = "$EXPECTED" ]; then + valid=true + fi + done + + if ! $valid; then + echo "$EXPECTED is not a valid period for cron. Not changing." + return + fi + for PERIOD in daily weekly monthly; do # NOTE: debian does not allow filenames with dots in /etc/cron.* LINK="${SCRIPT%.*}" -- 2.16.4 ++++++ 0005-btrfs-defrag-plugin-remove-dependency-on-zypp-plugin.patch ++++++
From a1fdf5f2502ead429fe6ea6b44a63ad35aae7242 Mon Sep 17 00:00:00 2001 From: Jeff Mahoney
Date: Tue, 12 Mar 2019 16:22:08 -0400 Subject: btrfs-defrag-plugin: remove dependency on zypp-plugin-python References: FATE#326736 jsc#SLE-4130 Notes: The script is included separately since rpm can't use git binary diffs
Requiring zypp-plugin-python means that we need to pull in 150 MB of
python dependencies. It's present already on many systems but on
JeOS systems, it won't be by default. We still want to defrag
the RPM database on those systems.
This commit replaces the python script with a shell script that provides
the same functionality and drops the python dependency entirely.
Signed-off-by: Jeff Mahoney
participants (1)
-
root