-
Notifications
You must be signed in to change notification settings - Fork 1.1k
handle irqbalance service #4441
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
Conversation
|
Hi @pperiyasamy. Thanks for your PR. I'm waiting for a cri-o member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/cc @JanScheurich |
|
@pperiyasamy looks like you've some lint issues. |
|
Any tests to add or at least to modify? |
|
@TomSweeneyRedHat Thanks, golint issues are fixed now, I'm waiting for the initial feedback on the changes, if that is finalised, then I'm planning to test this on my local setup and add/modify test cases. |
|
@jianzzha @cynepco3hahue PTAL |
| // HighPerformanceHooks used to run additional hooks that will configure a system for the latency sensitive workloads | ||
| type HighPerformanceHooks struct{} | ||
| type HighPerformanceHooks struct { | ||
| irqBalanceConfigFile string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why have this file as a member of the Hooks, when the other file locations are hardcoded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@haircommander This file location is platform dependent. For example, in Ubuntu, the config file is /etc/default/irqbalance. Hence making it to configure from a RuntimeConfig property. Can you check it now ?
Codecov Report
@@ Coverage Diff @@
## master #4441 +/- ##
==========================================
+ Coverage 40.03% 40.10% +0.06%
==========================================
Files 116 116
Lines 9391 9481 +90
==========================================
+ Hits 3760 3802 +42
- Misses 5224 5256 +32
- Partials 407 423 +16 |
856b7f0 to
b98fea6
Compare
@haircommander I will get someone to validate this in centos |
|
/ok-to-test |
|
by the way, thanks for taking this on @pperiyasamy, and thanks @jianzzha for the testing help ! |
| lines := strings.Split(string(input), "\n") | ||
| found := false | ||
| for i, line := range lines { | ||
| if strings.Contains(line, irqBalanceBannedCpus+"=") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sure this is a true config line, not in a comment line, e.g. no leading non-space characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct, now changed to use HasPrefix method, i guess that should be ok.
| logrus.Warnf("irqbalance binary not found: %v", err) | ||
| return nil | ||
|
|
||
| if !fileExists(irqBalanceConfigFile) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we think of a better way to test if irqbalance service is enabled rather than test the config file existence? I mean it is possible that the service config file exists but the service is disabled. The original idea was that the irqbalance service was disabled via external mechanism outside crio or k8s, for example via deployment orchestration. Not sure if any deployment has taken that route but it is always a good idea to be careful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, good point! added is-enabled check now.
| } | ||
|
|
||
| // RestoreIrqBalanceConfig restores irqbalance service with original banned cpu mask settings | ||
| func RestoreIrqBalanceConfig(irqBalanceConfigFile, irqBannedCPUConfigFile string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this restore function. Can we check if the irqbalance service is enabled before restart it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
|
@haircommander integration test on bare metal (centos k8s) works fine; some minor comments posted inline |
| **apparmor_profile**="" | ||
| Used to change the name of the default AppArmor profile of CRI-O. The default profile name is "crio-default". | ||
|
|
||
| **irqbalance_config_file**="/etc/sysconfig/irqbalance" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a blurb about where this file should be for which distro (only for the most popular: ubuntu/centos, maybe debian/rhel if they differ at all)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! done, I was able to confirm the file locations only in centos/suse and ubuntu platforms. so added it only for those cases.
@haircommander thanks, while addressing your review comments, any idea while these checks are failing ? Looks it's not related to this PR. |
|
the ci/prow/e2e* are generally flaky and I believe integration_crun was a provisioning flake |
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file to empty string (""). The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file to empty string (""). The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file to empty string (""). The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file to empty string (""). The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file to empty string (""). The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file to empty string (""). The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file to empty string (""). The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file to empty string (""). The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file to empty string (""). The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file to empty string (""). The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file to empty string (""). The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file "disable". The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file "disable". The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file "disable". The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file "disable". The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file "disable". The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file "disable". The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file "disable". The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file "disable". The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file "disable". The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file "disable". The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file "disable". The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file "disable". The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file "disable". The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file "disable". The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file "disable". The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file "disable". The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file "disable". The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
Since cri-o#4441 , to support the dynamic irqbalance configuration in turn needed by the high performance hooks, CRI-O runs the restore code at startup. In some configuration scenarios it's preferred to have more control over this step. Some configuration wants to have more control over the mask to be restored, or to disable the restore flow entirely. For this reason, we add an option to provide a user-supplied restore file. Users wishing to exert more control can provide their data, or they can disable the flow entirely setting the path to the restore file "disable". The new option defaults are meant to ensure full backward compatibility. Signed-off-by: Francesco Romani <[email protected]>
This would manipulate irqbalance service if it's already running on the system to exclude assigned pod CPUs from IRQ balancing.
Signed-off-by: Periyasamy Palanisamy [email protected]
What type of PR is this?
What this PR does / why we need it:
The crio currently runs
irqbalance --oneshotcommand to exclude pod cpus from handling interrupts, but this may not be a right choice if irqbalance service is already running on the system. This PR aims to address that concern by restarting the service after updating irqbalance config file with required settings for IRQBALANCE_BANNED_CPUS parameter.Which issue(s) this PR fixes:
None
Special notes for your reviewer:
This change is not yet tested, after a initial round of reviews would go for testing out this change.
Does this PR introduce a user-facing change?