Skip to content

Commit

Permalink
cephfs-mirror: try to mitigate peer import error
Browse files Browse the repository at this point in the history
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: #9151
Signed-off-by: Sébastien Han <seb@redhat.com>
  • Loading branch information
leseb committed Nov 26, 2021
1 parent 2519018 commit d1cdba4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/daemon/ceph/client/filesystem_mirror.go
Expand Up @@ -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()
Expand Down

0 comments on commit d1cdba4

Please sign in to comment.