You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// setupConfigSignal sets up a signal handler for reloading forced configuration.func (m*resmgr) setupConfigSignal(signamestring) error {
ifsigname==""||strings.HasPrefix(strings.ToLower(signame), "disable") {
returnnil
}
m.Info("setting up signal %s to reload forced configuration", signame)
sig:=unix.SignalNum(signame)
ifint(sig) ==0 {
returnresmgrError("invalid forced configuration reload signal '%s'", signame)
}
m.signals=make(chan os.Signal, 1)
signal.Notify(m.signals, sig)
gofunc(signals<-chan os.Signal) {
for {
select {
case_, ok:=<-signals:
if!ok {
return
}
}
m.Info("reloading forced configuration %s...", opt.ForceConfig)
iferr:=m.setConfigFromFile(opt.ForceConfig); err!=nil {
m.Error("failed to reload forced configuration %s: %v",
opt.ForceConfig, err)
}
}
}(m.signals)
returnnil
}
WARNING if you do not provide --force-config then SIGHUP will kill and restart process
The text was updated successfully, but these errors were encountered:
ppalucki
changed the title
Send signal to cri-resmgr process (systemd unit) when fallback.cfg or forced.cfg changes (updates)
Send signal to cri-resmgr process (systemd unit) when forced.cfg changes (updates)
Oct 4, 2022
May require to add some watcher over files then send signal to cri-resmgr:
Idea here:
kubernetes/kubernetes#24957 (comment)
cri-resmgr supports it as described here:
or code here:
but from above it only works for force-config
https://github.com/intel/cri-resource-manager/blob/master/pkg/cri/resource-manager/resource-manager.go#L363
then
WARNING if you do not provide
--force-config
then SIGHUP will kill and restart processThe text was updated successfully, but these errors were encountered: