mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-25 10:16:12 +08:00
Merge pull request #15272 from wanyaoqi/fix/host-offline
fix(region): panic on host offline and update health status is nil
This commit is contained in:
@@ -3973,7 +3973,6 @@ func (self *SHost) StartSyncstatus(ctx context.Context, userCred mcclient.TokenC
|
||||
}
|
||||
|
||||
func (self *SHost) PerformOffline(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.HostOfflineInput) (jsonutils.JSONObject, error) {
|
||||
log.Errorf("input %v", *input.UpdateHealthStatus)
|
||||
if self.HostStatus != api.HOST_OFFLINE {
|
||||
_, err := self.SaveUpdates(func() error {
|
||||
self.HostStatus = api.HOST_OFFLINE
|
||||
|
||||
Reference in New Issue
Block a user