mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
Merge pull request #13019 from swordqiu/automated-cherry-pick-of-#13018-upstream-release-3.8
Automated cherry pick of #13018: fix: hide systemd detection logs
This commit is contained in:
@@ -74,10 +74,10 @@ func AddDownloadHandler(prefix string, app *appsrv.Application) {
|
||||
}
|
||||
|
||||
func customizeHandlerInfo(info *appsrv.SHandlerInfo) {
|
||||
switch info.GetName(nil) {
|
||||
case "disk_download", "download", "snapshot_download":
|
||||
info.SetProcessNoTimeout().SetWorkerManager(streamingWorkerMan)
|
||||
}
|
||||
// switch info.GetName(nil) {
|
||||
// case "disk_download", "download", "snapshot_download":
|
||||
info.SetProcessNoTimeout().SetWorkerManager(streamingWorkerMan)
|
||||
// }
|
||||
}
|
||||
|
||||
func isCompress(r *http.Request) bool {
|
||||
|
||||
@@ -615,6 +615,7 @@ func (s *SGuestResumeTask) confirmRunning() {
|
||||
}
|
||||
|
||||
func (s *SGuestResumeTask) onConfirmRunning(status string) {
|
||||
log.Debugf("onConfirmRunning status %s", status)
|
||||
if status == "running" || status == "paused (suspended)" || status == "paused (perlaunch)" {
|
||||
s.onStartRunning()
|
||||
} else if strings.Contains(status, "error") {
|
||||
@@ -649,6 +650,7 @@ func (s *SGuestResumeTask) taskFailed(reason string) {
|
||||
}
|
||||
|
||||
func (s *SGuestResumeTask) onGetBlockInfo(results *jsonutils.JSONArray) {
|
||||
log.Debugf("onGetBlockInfo %s", results)
|
||||
// for _, drv := range results.GetArray() {
|
||||
// // encryption not work
|
||||
// }
|
||||
|
||||
@@ -1690,6 +1690,7 @@ func (h *SHostInfo) unregister() {
|
||||
|
||||
func (h *SHostInfo) OnCatalogChanged(catalog mcclient.KeystoneServiceCatalogV3) {
|
||||
// TODO: dynamic probe endpoint type
|
||||
svcs := os.Getenv("HOST_SYSTEM_SERVICES_OFF")
|
||||
defaultEndpointType := options.HostOptions.SessionEndpointType
|
||||
if len(defaultEndpointType) == 0 {
|
||||
defaultEndpointType = identityapi.EndpointInterfacePublic
|
||||
@@ -1706,7 +1707,7 @@ func (h *SHostInfo) OnCatalogChanged(catalog mcclient.KeystoneServiceCatalogV3)
|
||||
"ntp://2.cn.pool.ntp.org",
|
||||
"ntp://3.cn.pool.ntp.org"}
|
||||
}
|
||||
if !reflect.DeepEqual(ntpd.GetConf(), urls) && !ntpd.IsActive() {
|
||||
if !reflect.DeepEqual(ntpd.GetConf(), urls) || (!strings.Contains(svcs, "ntpd") && !ntpd.IsActive()) {
|
||||
ntpd.SetConf(urls)
|
||||
ntpd.BgReload(map[string]interface{}{"servers": urls})
|
||||
}
|
||||
@@ -1737,10 +1738,9 @@ func (h *SHostInfo) OnCatalogChanged(catalog mcclient.KeystoneServiceCatalogV3)
|
||||
if len(urls) > 0 {
|
||||
conf["influxdb"] = map[string]interface{}{"url": urls, "database": "telegraf"}
|
||||
}
|
||||
log.Debugf("telegraf config: %s", conf)
|
||||
if !reflect.DeepEqual(telegraf.GetConf(), conf) || !telegraf.IsActive() {
|
||||
if !reflect.DeepEqual(telegraf.GetConf(), conf) || (!strings.Contains(svcs, "telegraf") && !telegraf.IsActive()) {
|
||||
log.Debugf("telegraf config: %s", conf)
|
||||
telegraf.SetConf(conf)
|
||||
svcs := os.Getenv("HOST_SYSTEM_SERVICES_OFF")
|
||||
if !strings.Contains(svcs, "telegraf") {
|
||||
telegraf.BgReload(conf)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user