makesure /etc/ceph created before connect

This commit is contained in:
wanyaoqi
2020-02-26 20:42:04 +08:00
committed by wanyaoqi
parent 7863fc7f8a
commit 4eceefdb04
2 changed files with 4 additions and 1 deletions
-1
View File
@@ -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)
+4
View File
@@ -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
}