mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
makesure /etc/ceph created before connect
This commit is contained in:
@@ -705,7 +705,6 @@ func (h *SHostInfo) fetchAccessNetworkInfo() {
|
||||
params := jsonutils.NewDict()
|
||||
params.Set("ip", jsonutils.NewString(masterIp))
|
||||
params.Set("is_on_premise", jsonutils.JSONTrue)
|
||||
params.Set("server_type", jsonutils.NewString(api.NETWORK_TYPE_BAREMETAL))
|
||||
params.Set("limit", jsonutils.NewInt(0))
|
||||
|
||||
res, err := modules.Networks.List(h.GetSession(), params)
|
||||
|
||||
@@ -59,6 +59,10 @@ type SRbdStorage struct {
|
||||
func NewRBDStorage(manager *SStorageManager, path string) *SRbdStorage {
|
||||
var ret = new(SRbdStorage)
|
||||
ret.SBaseStorage = *NewBaseStorage(manager, path)
|
||||
err := procutils.NewRemoteCommandAsFarAsPossible("mkdir", "-p", "/etc/ceph").Run()
|
||||
if err != nil {
|
||||
log.Errorf("Failed to mkdir /etc/ceph: %s", err)
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user