From 32ea2c9227f95dc58a71367f10687edc1394d76e Mon Sep 17 00:00:00 2001 From: ioito Date: Fri, 19 Apr 2019 14:39:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=BD=E7=95=A5rbd=E9=94=99=E8=AF=AF,?= =?UTF-8?q?=E5=B9=B6=E5=B0=86rbd=20storage=E7=BD=AE=E4=B8=BA=E7=A6=BB?= =?UTF-8?q?=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/hostman/storageman/storage_rbd.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/hostman/storageman/storage_rbd.go b/pkg/hostman/storageman/storage_rbd.go index 27f52b7539..1a56a6d829 100644 --- a/pkg/hostman/storageman/storage_rbd.go +++ b/pkg/hostman/storageman/storage_rbd.go @@ -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,