From f7ff19cb18c36c4b03e01bd0d2d581bd6ec95a45 Mon Sep 17 00:00:00 2001 From: jiuker <2818723467@qq.com> Date: Mon, 1 Jul 2024 22:38:46 +0800 Subject: [PATCH] fix: warning for decommissioned pool while start (#20019) --- cmd/erasure-server-pool-decom.go | 2 +- cmd/erasure-server-pool-decom_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/erasure-server-pool-decom.go b/cmd/erasure-server-pool-decom.go index a7d5cc1e7..5e758d848 100644 --- a/cmd/erasure-server-pool-decom.go +++ b/cmd/erasure-server-pool-decom.go @@ -358,7 +358,7 @@ func (p *poolMeta) validate(pools []*erasureSets) (bool, error) { update = true } if ok && pi.completed { - return false, fmt.Errorf("pool(%s) = %s is decommissioned, please remove from server command line", humanize.Ordinal(pi.position+1), k) + logger.LogIf(GlobalContext, "decommission", fmt.Errorf("pool(%s) = %s is decommissioned, please remove from server command line", humanize.Ordinal(pi.position+1), k)) } } diff --git a/cmd/erasure-server-pool-decom_test.go b/cmd/erasure-server-pool-decom_test.go index ee438aeec..7e6d29c19 100644 --- a/cmd/erasure-server-pool-decom_test.go +++ b/cmd/erasure-server-pool-decom_test.go @@ -134,7 +134,7 @@ func TestPoolMetaValidate(t *testing.T) { meta: nmeta1, pools: pools, name: "Invalid-Completed-Pool-Not-Removed", - expectedErr: true, + expectedErr: false, expectedUpdate: false, }, {