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

CNF-13014: Add a specific error message for when the TuneD submodule folder is not initialized #1141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fontivan
Copy link
Contributor

  • If you did not checkout the git repo using --recursive then the tuned submodule folder will be empty
  • Without a specific error message it would instead return a vague error that a patch failed to be applied
  • Instead we will check explicitly if the folder is empty and return a more helpful error message in these cases

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 21, 2024
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 21, 2024

@fontivan: This pull request references CNF-13014 which is a valid jira issue.

In response to this:

  • If you did not checkout the git repo using --recursive then the tuned submodule folder will be empty
  • Without a specific error message it would instead return a vague error that a patch failed to be applied
  • Instead we will check explicitly if the folder is empty and return a more helpful error message in these cases

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 21, 2024
Copy link
Contributor

openshift-ci bot commented Aug 21, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link
Contributor

openshift-ci bot commented Aug 21, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fontivan
Once this PR has been reviewed and has the lgtm label, please assign marsik for approval. For more information see the Kubernetes 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

@fontivan fontivan force-pushed the sskeard/cnf-13014-add-error-message-for-empty-tuned-submodule branch from 475b7f4 to 3917684 Compare August 21, 2024 17:14
@fontivan fontivan marked this pull request as ready for review August 21, 2024 17:18
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 21, 2024
@fontivan
Copy link
Contributor Author

Old error:

+ cd /root/assets/tuned/tuned
+ LC_COLLATE=C
+ cat ../patches/030-no-bootloader-errors.diff
+ patch -Np1
can't find file to patch at input line 10
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|NTO currently supports the bootloader plugin only on RHCOS via the integration
|with MCO.  Disable patching of BLS entries and grub configuration files so
|that error messages from the tuned daemon are eliminated and not reported
|further on in k8s objects.
|
|diff --git a/assets/tuned/daemon/tuned/plugins/plugin_bootloader.py b/assets/tuned/daemon/tuned/plugins/plugin_bootloader.py
|index 416df7d6..b0a61905 100644
|--- a/tuned/plugins/plugin_bootloader.py
|+++ b/tuned/plugins/plugin_bootloader.py
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
3 out of 3 hunks ignored
Error: building at STEP "RUN /bin/bash /tmp/dockerfile_install_support.sh": while running runtime: exit status 1
make: *** [Makefile:175: local-image] Error 1

New error:

++ ls /root/assets/tuned/tuned
+ [[ -z '' ]]
+ echo 'TuneD submodule is an empty folder. Consider initializing the module: '\''git submodule update --init --recursive'\'''
TuneD submodule is an empty folder. Consider initializing the module: 'git submodule update --init --recursive'
+ exit 1
Error: building at STEP "RUN /bin/bash /tmp/dockerfile_install_support.sh": while running runtime: exit status 1
make: *** [Makefile:175: local-image] Error 1

@fontivan
Copy link
Contributor Author

/retest

@fontivan fontivan force-pushed the sskeard/cnf-13014-add-error-message-for-empty-tuned-submodule branch from 3917684 to 9702ceb Compare August 26, 2024 18:29
@yanirq
Copy link
Contributor

yanirq commented Aug 28, 2024

/retest

@fontivan fontivan force-pushed the sskeard/cnf-13014-add-error-message-for-empty-tuned-submodule branch from 9702ceb to 790a8e5 Compare September 4, 2024 18:31
@rbaturov
Copy link
Contributor

rbaturov commented Sep 5, 2024

@fontivan take a look at this fix #1159.

@fontivan
Copy link
Contributor Author

fontivan commented Sep 5, 2024

@rbaturov I like #1159 but I also think we could also do error message addition too since it is a minor error message improvement if you end up in a weird submodule state

@fontivan
Copy link
Contributor Author

fontivan commented Sep 5, 2024

/retest

Copy link
Contributor

openshift-ci bot commented Sep 5, 2024

@fontivan: all tests passed!

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants