From 33675069345229d0d0b606636689093326f59feb Mon Sep 17 00:00:00 2001 From: motodiary Date: Wed, 19 Jun 2024 13:32:23 +0800 Subject: [PATCH] fix sacctmgr delete error with flags specified --- ...gr-delete-error-with-flags-specified.patch | 31 +++++++++++++++++++ slurm.spec | 6 +++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 0052-fix-sacctmgr-delete-error-with-flags-specified.patch diff --git a/0052-fix-sacctmgr-delete-error-with-flags-specified.patch b/0052-fix-sacctmgr-delete-error-with-flags-specified.patch new file mode 100644 index 0000000..6dab860 --- /dev/null +++ b/0052-fix-sacctmgr-delete-error-with-flags-specified.patch @@ -0,0 +1,31 @@ +From 100d2d82534e52450361ba1cb1fa21026f0fd388 Mon Sep 17 00:00:00 2001 +From: motodiary +Date: Wed, 19 Jun 2024 13:28:49 +0800 +Subject: [PATCH] fix sacctmgr delete error with flags specified + +--- + src/plugins/accounting_storage/pgsql/as_pgsql_cluster.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/plugins/accounting_storage/pgsql/as_pgsql_cluster.c b/src/plugins/accounting_storage/pgsql/as_pgsql_cluster.c +index 1af53fe..2697915 100755 +--- a/src/plugins/accounting_storage/pgsql/as_pgsql_cluster.c ++++ b/src/plugins/accounting_storage/pgsql/as_pgsql_cluster.c +@@ -200,12 +200,12 @@ static int _setup_cluster_cond_limits(slurmdb_cluster_cond_t *cluster_cond, + } + + if (cluster_cond->classification) { +- xstrfmtcat(*extra, " AND (classification & %u)", ++ xstrfmtcat(*extra, " AND ((classification & %u)!=0)", + cluster_cond->classification); + } + + if (cluster_cond->flags != NO_VAL) { +- xstrfmtcat(*extra, " AND (flags & %u)", ++ xstrfmtcat(*extra, " AND ((flags & %u)!=0)", + cluster_cond->flags); + } + +-- +2.33.0 + diff --git a/slurm.spec b/slurm.spec index c084906..3782f71 100644 --- a/slurm.spec +++ b/slurm.spec @@ -1,6 +1,6 @@ Name: slurm Version: 21.08.8 -%define rel 54 +%define rel 55 Release: %{rel}%{?dist} Summary: Slurm Workload Manager @@ -67,6 +67,7 @@ Patch48: 0048-fix-sacct-not-showing-job-information.patch Patch49: 0049-fix-the-preempt-error.patch Patch50: 0050-enable-col_data-empty-check.patch Patch51: 0051-fix-the-archive-error.patch +Patch52: 0052-fix-sacctmgr-delete-error-with-flags-specified.patch # build options .rpmmacros options change to default action # ==================== ==================== ======================== @@ -759,6 +760,9 @@ rm -rf %{buildroot} %systemd_postun_with_restart slurmdbd.service %changelog +* Wed Jun 19 2024 Xing Liu - 21.08.8-55 +- fix sacctmgr delete error with flags specified + * Tue Jun 18 2024 Xing Liu - 21.08.8-54 - fix the archive error -- Gitee