Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamic log level adjustment without restarting volcano component #2322

Closed
elinx opened this issue Jul 1, 2022 · 8 comments · Fixed by #3146
Closed

dynamic log level adjustment without restarting volcano component #2322

elinx opened this issue Jul 1, 2022 · 8 comments · Fixed by #3146
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Milestone

Comments

@elinx
Copy link

elinx commented Jul 1, 2022

What would you like to be added:

change log level dynamicly without restart volcano component

Why is this needed:

When some glitches happends online and need to figure out the cause, one option is to change the log level and reproduce the issue to get more verbosed log. The log level threshold is hard coded into deployment yaml file right now, the volcano component like scheduler will restart when the log level changed and the issue may can't reporduce anymore.

@elinx elinx added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 1, 2022
@william-wang
Copy link
Member

Yes, it's what we have been wanting to do. refer to #1326 , Let's track this issue here.

@william-wang william-wang added this to the v1.7 milestone Jul 5, 2022
@stale
Copy link

stale bot commented Oct 12, 2022

Hello 👋 Looks like there was no activity on this issue for last 90 days.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity for 60 days, this issue will be closed (we can always reopen an issue if we need!).

@stale stale bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 12, 2022
@elinx
Copy link
Author

elinx commented Oct 31, 2022

This feature highly depends on the feature of klog to change the verbosity of the log level on the fly, but in the current implementation klog does not provide any configurable API and the maintainer looks very hesitant about adding a new API:

The problem with klog is that it is close to impossible to experiment with new APIs: as soon as they are in a release, the API has to adhere to the strict compatibility guarantee of a v2 Go module. Therefore I am not very enthusiastic about anything that will need such significant changes.

kubernetes/klog#336
kubernetes/klog#340

@stale stale bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 31, 2022
@stale
Copy link

stale bot commented Mar 18, 2023

Hello 👋 Looks like there was no activity on this issue for last 90 days.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity for 60 days, this issue will be closed (we can always reopen an issue if we need!).

@stale stale bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 18, 2023
@wangyang0616
Copy link
Member

Retain the current issue.
/remove-lifecycle stale

@stale stale bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 24, 2023
@xiao-jay
Copy link
Contributor

xiao-jay commented May 24, 2023

@wangyang0616
looks like modify the volcano-scheduler-configmap will loadSchedulerConf

func (pc *Scheduler) watchSchedulerConf(stopCh <-chan struct{}) {
if pc.fileWatcher == nil {
return
}
eventCh := pc.fileWatcher.Events()
errCh := pc.fileWatcher.Errors()
for {
select {
case event, ok := <-eventCh:
if !ok {
return
}
klog.V(4).Infof("watch %s event: %v", pc.schedulerConf, event)
if event.Op&fsnotify.Write == fsnotify.Write || event.Op&fsnotify.Create == fsnotify.Create {
pc.loadSchedulerConf()
}
case err, ok := <-errCh:
if !ok {
return
}
klog.Infof("watch %s error: %v", pc.schedulerConf, err)
case <-stopCh:
return
}
}

So May be can add klogv in volcano-scheduler-configmap.If you want to modify klogv while Valcano is running, you can add/modify klogv=5 in the volcano scheduler configmap,and run next code to modify klog v.

var fs flag.FlagSet
klog.InitFlags(&fs)
fs.Set("v", "klogv")

What do you think of this idea?

@xiao-jay
Copy link
Contributor

/assign

@stale
Copy link

stale bot commented Sep 17, 2023

Hello 👋 Looks like there was no activity on this issue for last 90 days.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity for 60 days, this issue will be closed (we can always reopen an issue if we need!).

@stale stale bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 17, 2023
@william-wang william-wang removed this from the v1.7 milestone Oct 13, 2023
@stale stale bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 13, 2023
@william-wang william-wang added this to the v1.9 milestone Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
4 participants