forked from rook/rook
ceph: fix hostpath of osd to avoid data corruption
A directory is created under dataDirHostPath for each OSD. In host-based cluster, its name is constructed from kernel device name like _dev_sdb though user specifies udev persistent device name. We should use unique name among all OSDs. Closes: https://github.com/rook/rook/issues/7878 Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
This commit is contained in:
@@ -22,7 +22,6 @@ import (
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/libopenstorage/secrets"
|
||||
"github.com/pkg/errors"
|
||||
@@ -738,7 +737,7 @@ func (c *Cluster) getActivateOSDInitContainer(configDir, namespace, osdID string
|
||||
Path: filepath.Join(
|
||||
configDir,
|
||||
namespace,
|
||||
strings.ReplaceAll(osdInfo.BlockPath, "/", "_"),
|
||||
c.clusterInfo.FSID+"_"+osdInfo.UUID,
|
||||
),
|
||||
Type: &hostPathType,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user