mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 06:09:39 +08:00
Merge pull request #6151 from wanyaoqi/bugfix/wyq/minor-fix-0430
fix host details output
This commit is contained in:
@@ -163,6 +163,8 @@ type HostDetails struct {
|
||||
IsPrepaidRecycle bool `json:"is_prepaid_recycle"`
|
||||
CanPrepare bool `json:"can_prepare"`
|
||||
PrepareFailReason string `json:"prepare_fail_reason"`
|
||||
// 允许开启宿主机健康检查
|
||||
AllowHealthCheck bool `json:"allow_health_check"`
|
||||
|
||||
// 标签
|
||||
Metadata map[string]string `json:"metadata"`
|
||||
|
||||
@@ -2606,6 +2606,9 @@ func (self *SHost) getMoreDetails(ctx context.Context, out api.HostDetails, show
|
||||
}
|
||||
}
|
||||
|
||||
if self.EnableHealthCheck && hostHealthChecker != nil {
|
||||
out.AllowHealthCheck = true
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
|
||||
@@ -141,6 +141,9 @@ func (host *SHostService) initEtcdConfig() error {
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "fetch etcd service info")
|
||||
}
|
||||
if etcdEndpoint == nil {
|
||||
return nil
|
||||
}
|
||||
if len(options.HostOptions.EtcdEndpoints) == 0 {
|
||||
options.HostOptions.EtcdEndpoints = []string{etcdEndpoint.Url}
|
||||
if len(etcdEndpoint.CertId) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user