忽略rbd错误,并将rbd storage置为离线

This commit is contained in:
ioito
2019-04-19 14:45:41 +08:00
parent eac3871ad0
commit 32ea2c9227
+2 -1
View File
@@ -364,7 +364,8 @@ func (s *SRbdStorage) SyncStorageInfo() (jsonutils.JSONObject, error) {
if len(s.StorageId) > 0 {
capacity, err := s.getCapacity()
if err != nil {
return nil, err
log.Errorf("get ceph capacity error: %v", err)
return modules.Storages.PerformAction(hostutils.GetComputeSession(context.Background()), s.StorageId, "offline", jsonutils.Marshal(map[string]string{"reason": err.Error()}))
}
content = map[string]interface{}{
"name": s.StorageName,