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

Merge cli flags into config after hot reload #8352

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

LenkaSeg
Copy link
Contributor

@LenkaSeg LenkaSeg commented Jul 7, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

Merges cli flags into config on hot reload.

Which issue(s) this PR fixes:

Should fix the Issue #7586

Special notes for your reviewer:

Still work in progress. While solving this issue I ran into some circular imports, so it needed refactoring. Not sure if this is preferred way of the code refactor.

Does this PR introduce a user-facing change?

Yes

Command line arguments preserved after hot reload.

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 7, 2024
Copy link
Contributor

openshift-ci bot commented Jul 7, 2024

Hi @LenkaSeg. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions 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-sigs/prow repository.

@saschagrunert
Copy link
Member

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 8, 2024
Copy link
Contributor

openshift-ci bot commented Jul 8, 2024

@LenkaSeg: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/ci-fedora-integration d9b0b23 link true /test ci-fedora-integration
ci/prow/ci-cgroupv2-integration d9b0b23 link true /test ci-cgroupv2-integration
ci/prow/ci-fedora-kata d9b0b23 link true /test ci-fedora-kata

Full PR test history. Your PR dashboard.

Instructions 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-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 9, 2024
@LenkaSeg LenkaSeg force-pushed the reload_config_sighup branch 2 times, most recently from b8b1273 to 03bfd3f Compare July 26, 2024 16:55
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 26, 2024
@LenkaSeg LenkaSeg force-pushed the reload_config_sighup branch 2 times, most recently from 93f9953 to ee3318d Compare July 26, 2024 17:28
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 6, 2024
@LenkaSeg
Copy link
Contributor Author

Still working on this.

@LenkaSeg LenkaSeg force-pushed the reload_config_sighup branch from ee3318d to e771df0 Compare September 5, 2024 10:23
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 5, 2024
@LenkaSeg LenkaSeg force-pushed the reload_config_sighup branch from e771df0 to b51abc7 Compare September 6, 2024 14:57
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 20, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 26, 2024
@sohankunkerkar sohankunkerkar force-pushed the reload_config_sighup branch 5 times, most recently from e7f27c3 to b33339e Compare September 26, 2024 17:40
@LenkaSeg
Copy link
Contributor Author

LenkaSeg commented Oct 2, 2024

To confirm that the changes in this PR are merging the CLI flags into config:

bin/crio --pinns-path=$(pwd)/bin/pinns

From a different terminal:

bin/crio status config print | grep log_level

Output:

log_level = "debug"

Let's do the hot reload:

kill -HUP $(pgrep crio)

Check the log level again:

bin/crio status config print | grep log_level

Output (is still debug):

log_level = "debug"

@kwilczynski
Copy link
Member

To confirm that the changes in this PR are merging the CLI flags into config:

bin/crio --pinns-path=$(pwd)/bin/pinns

From a different terminal:

bin/crio status config print | grep log_level

Output:

log_level = "debug"

Let's do the hot reload:

kill -HUP $(pgrep crio)

Check the log level again:

bin/crio status config print | grep log_level

Output (is still debug):

log_level = "debug"

@LenkaSeg very nice!

How did you set the log level here? Was CLI using a different level, and crio.conf had a different one? Looking at the above, I am not sure which way it was. 😄

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 3, 2024
@LenkaSeg
Copy link
Contributor Author

LenkaSeg commented Oct 3, 2024

How did you set the log level here? Was CLI using a different level, and crio.conf had a different one? Looking at the above, I am not sure which way it was. 😄

Ah, sorry, the log level was passed as a cli argument. The first command was supposed to be:

sudo bin/crio --pinns-path=$(pwd)/bin/pinns --log-level=debug

I copied the wrong line :)

@LenkaSeg
Copy link
Contributor Author

LenkaSeg commented Oct 3, 2024

The conf had log_level set to "warn":

lenkaseg@fedora:$ cat /etc/crio/crio.conf.d/99-log-level.conf
[crio.runtime]
log_level = "warn"

@kwilczynski
Copy link
Member

kwilczynski commented Oct 3, 2024

@LenkaSeg, looks good so far! Thank you for persevering with this.

We might have to update some tests. Also, if you could rebase your branch to get some of the latest updates, then it would have with some other test failures we have here.

@LenkaSeg LenkaSeg force-pushed the reload_config_sighup branch from 986198a to 82c192b Compare October 3, 2024 12:44
@LenkaSeg
Copy link
Contributor Author

LenkaSeg commented Oct 3, 2024

Considering the "debug" option here:

-l debug \

Would it be ok to disable those failing tests?
Or create a different bats file, add the test covering this change and customize start_crio?

@kwilczynski
Copy link
Member

Considering the "debug" option here:

-l debug \

Would it be ok to disable those failing tests? Or create a different bats file, add the test covering this change and customize start_crio?

@LenkaSeg, we seem to have some behaviour change now, which probably makes sense since the previous (old) behaviour was a bit buggy, so to speak. So now we need to figure out why we have these failing tests and how to update them so that these would pass.

If we delete a test, we can lose some signal unless we are sure that the test is no longer valid or feasible.

What do you think?

That said, I didn't have a look, yet, what the issues are. 🙇

@kwilczynski kwilczynski removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 16, 2024
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 27, 2024
@LenkaSeg LenkaSeg force-pushed the reload_config_sighup branch from 82c192b to cabc86a Compare November 21, 2024 13:40
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 21, 2024
@LenkaSeg LenkaSeg force-pushed the reload_config_sighup branch 3 times, most recently from 192effd to 3a9aae5 Compare November 21, 2024 15:23
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 23, 2024
@LenkaSeg LenkaSeg force-pushed the reload_config_sighup branch from 3a9aae5 to df1d3e6 Compare December 23, 2024 15:31
Copy link
Contributor

openshift-ci bot commented Dec 23, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: LenkaSeg
Once this PR has been reviewed and has the lgtm label, please assign saschagrunert for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: Lenka Segura <lsegura@redhat.com>
Signed-off-by: Lenka Segura <lsegura@redhat.com>
@LenkaSeg LenkaSeg force-pushed the reload_config_sighup branch from df1d3e6 to d46f199 Compare December 23, 2024 15:35
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 23, 2024
@LenkaSeg LenkaSeg force-pushed the reload_config_sighup branch from d46f199 to 74e4c21 Compare December 23, 2024 15:38
@LenkaSeg LenkaSeg force-pushed the reload_config_sighup branch 3 times, most recently from ad7ccc4 to d42a612 Compare December 23, 2024 17:36
Signed-off-by: Lenka Segura <lsegura@redhat.com>
@LenkaSeg LenkaSeg force-pushed the reload_config_sighup branch from d42a612 to 01deb37 Compare December 23, 2024 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/bug Categorizes issue or PR as related to a bug. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants