mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-05-06 21:52:54 +08:00
Merge pull request #12543 from ioito/automated-cherry-pick-of-#12540-upstream-release-3.6
Automated cherry pick of #12540: fix(host): avoid storage attach not report error
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
|
||||
"yunion.io/x/jsonutils"
|
||||
"yunion.io/x/log"
|
||||
"yunion.io/x/pkg/errors"
|
||||
|
||||
"yunion.io/x/onecloud/pkg/appsrv"
|
||||
"yunion.io/x/onecloud/pkg/hostman/hostutils"
|
||||
@@ -116,6 +117,10 @@ func storageAttach(ctx context.Context, body jsonutils.JSONObject) (interface{},
|
||||
if err := storage.SetStorageInfo(storageId, storageName, storageConf); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = storage.SyncStorageSize()
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "SyncStorageSize")
|
||||
}
|
||||
resp, err := storage.SyncStorageInfo()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user