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:
Travis Nielsen authored and GitHub committed 2024-01-08 08:45:42 -07:00
commit f056208d4b
2 files changed
+5 -4

No files matched your search

+5
View File
@@ -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 {
-4
View File
@@ -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