diff --git a/cmd/climc/shell/compute/workers.go b/cmd/climc/shell/compute/workers.go index 6ff4e521e9..768b0bdbf7 100644 --- a/cmd/climc/shell/compute/workers.go +++ b/cmd/climc/shell/compute/workers.go @@ -23,7 +23,7 @@ import ( func init() { type WorkerListOptions struct { - ServiceType string `choices:"image|cloudid|cloudevent|devtool|ansible|identity|notify|log|compute|compute_v2"` + ServiceType string `choices:"image|cloudid|cloudevent|devtool|ansible|identity|notify|log|compute|compute_v2|meter|suggestion|cloudmon|cloudproxy|dns|monitor|scheduler|vpcagent|webconsole|yunionconf|bastionhost|extdb|yunionapi|report"` } R(&WorkerListOptions{}, "worker-list", "List workers", func(s *mcclient.ClientSession, args *WorkerListOptions) error { result, err := modules.Workers.List(s, jsonutils.Marshal(args)) diff --git a/pkg/mcclient/modulebase/base.go b/pkg/mcclient/modulebase/base.go index c5133f308c..6c765e694b 100644 --- a/pkg/mcclient/modulebase/base.go +++ b/pkg/mcclient/modulebase/base.go @@ -103,7 +103,7 @@ func (this *BaseManager) jsonRequest(session *mcclient.ClientSession, method, this.versionedURL(path), header, body) if err != nil { - if e, ok := err.(*httputils.JSONClientError); ok { + if e, ok := err.(*httputils.JSONClientError); ok && strings.Contains(e.Details, e.Request.Url) { switch e.Class { case errors.ErrConnectRefused.Error(): return nil, nil, httperrors.NewServiceAbnormalError("%s service is abnormal, please check service status", this.serviceType)