From d1cdba420a3bc2f717e989e946e13692051eac0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 26 Nov 2021 15:45:01 +0100 Subject: [PATCH] cephfs-mirror: try to mitigate peer import error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some users have reported issues while adding the token, this is not always reproducable so perhaps it's a typo when importing the token and adding trailing spaces. Closes: https://github.com/rook/rook/issues/9151 Signed-off-by: Sébastien Han --- pkg/daemon/ceph/client/filesystem_mirror.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/daemon/ceph/client/filesystem_mirror.go b/pkg/daemon/ceph/client/filesystem_mirror.go index dfe6151cc01f..4de6b6b5336a 100644 --- a/pkg/daemon/ceph/client/filesystem_mirror.go +++ b/pkg/daemon/ceph/client/filesystem_mirror.go @@ -170,8 +170,9 @@ func ImportFSMirrorBootstrapPeer(context *clusterd.Context, clusterInfo *Cluster logger.Infof("importing cephfs bootstrap peer token for filesystem %q", fsName) // Build command - args := []string{"fs", "snapshot", "mirror", "peer_bootstrap", "import", fsName, token} + args := []string{"fs", "snapshot", "mirror", "peer_bootstrap", "import", fsName, strings.TrimSpace(token)} cmd := NewCephCommand(context, clusterInfo, args) + cmd.JsonOutput = false // Run command output, err := cmd.Run()