Merge pull request #7722 from wanyaoqi/bugfix/wyq/update-host-status-on-host-offline

hosts: update host status to unknown on host offline
This commit is contained in:
yunion-ci-robot
2020-09-02 16:27:38 +08:00
committed by GitHub
+3
View File
@@ -3545,6 +3545,9 @@ func (self *SHost) PerformOffline(ctx context.Context, userCred mcclient.TokenCr
if jsonutils.QueryBoolean(data, "update_health_status", false) {
self.EnableHealthCheck = false
}
// Note: update host status to unknown on host offline
// we did not have host status after host offline
self.Status = api.BAREMETAL_UNKNOWN
return nil
})
if err != nil {