Merge pull request #13533 from rook/mergify/bp/release-1.13/pr-13524
osd: create ceph conf and keyring files before osd migration (backport #13524)
This commit is contained in:
2 files changed
+5
-4
No files matched your search
@@ -29,6 +29,7 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rook/rook/cmd/rook/rook"
|
||||
cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
|
||||
"github.com/rook/rook/pkg/daemon/ceph/client"
|
||||
osddaemon "github.com/rook/rook/pkg/daemon/ceph/osd"
|
||||
"github.com/rook/rook/pkg/operator/ceph/cluster/mon"
|
||||
oposd "github.com/rook/rook/pkg/operator/ceph/cluster/osd"
|
||||
@@ -255,6 +256,10 @@ func prepareOSD(cmd *cobra.Command, args []string) error {
|
||||
clusterInfo.Context = cmd.Context()
|
||||
kv := k8sutil.NewConfigMapKVStore(clusterInfo.Namespace, context.Clientset, ownerInfo)
|
||||
|
||||
if err := client.WriteCephConfig(context, &clusterInfo); err != nil {
|
||||
return errors.Wrap(err, "failed to generate ceph config")
|
||||
}
|
||||
|
||||
// destroy the OSD using the OSD ID
|
||||
var replaceOSD *oposd.OSDReplaceInfo
|
||||
if replaceOSDID != -1 {
|
||||
|
||||
@@ -181,10 +181,6 @@ func Provision(context *clusterd.Context, agent *OsdAgent, crushLocation, topolo
|
||||
status := oposd.OrchestrationStatus{Status: oposd.OrchestrationStatusOrchestrating}
|
||||
oposd.UpdateNodeOrPVCStatus(agent.clusterInfo.Context, agent.kv, agent.nodeName, status)
|
||||
|
||||
if err := client.WriteCephConfig(context, agent.clusterInfo); err != nil {
|
||||
return errors.Wrap(err, "failed to generate ceph config")
|
||||
}
|
||||
|
||||
logger.Infof("discovering hardware")
|
||||
|
||||
var rawDevices []*sys.LocalDisk
|
||||
|
||||
Reference in new issue
Block a user