ceph: stop using the namespace in the site's name

Removing the site's name helps us reducing the size of the rbd-mirror
socket path which under certain circumstances could exceed the system
limit.
Also, the namespace information is not that relevant, the cluster FSID
is.

Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
Sébastien Han
2021-05-18 19:36:53 +02:00
parent 2793750146
commit 0459a20173
+2 -1
View File
@@ -67,7 +67,7 @@ func CreateRBDMirrorBootstrapPeer(context *clusterd.Context, clusterInfo *Cluste
logger.Infof("create rbd-mirror bootstrap peer token for pool %q", poolName)
// Build command
args := []string{"mirror", "pool", "peer", "bootstrap", "create", poolName, "--site-name", fmt.Sprintf("%s-%s", clusterInfo.FSID, clusterInfo.Namespace)}
args := []string{"mirror", "pool", "peer", "bootstrap", "create", poolName, "--site-name", clusterInfo.FSID}
cmd := NewRBDCommand(context, clusterInfo, args)
// Run command
@@ -76,6 +76,7 @@ func CreateRBDMirrorBootstrapPeer(context *clusterd.Context, clusterInfo *Cluste
return nil, errors.Wrapf(err, "failed to create rbd-mirror peer token for pool %q. %s", poolName, output)
}
logger.Infof("successfully created rbd-mirror bootstrap peer token for pool %q", poolName)
return output, nil
}