-
Notifications
You must be signed in to change notification settings - Fork 1.1k
config: avoid segfault when workloads.resources is nil #6192
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
config: avoid segfault when workloads.resources is nil #6192
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6192 +/- ##
=======================================
Coverage 43.68% 43.68%
=======================================
Files 122 122
Lines 13666 13666
=======================================
Hits 5970 5970
Misses 7049 7049
Partials 647 647 |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
95b426f to
182abff
Compare
| EOF | ||
|
|
||
| # then | ||
| "$CRIO_BINARY_PATH" -c "$TESTDIR"/workload.conf -d "" config |
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.
kata-jenkins job fails here, because it cannot find the definition for the default runtime we've set.
# level=fatal msg="validating runtime config: default_runtime set to \"containerd-shim-kata-v2\", but no runtime entry table [crio.runtime.runtimes.containerd-shim-kata-v2] was found"
Maybe need to customize the conf file you use with an entry for the default runtime?
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.
Another (maybe simpler) suggestion: if the test doesn't imply the runtime, maybe you can unset the CONTAINER_RUNTIMES env variable for this test, like it's done in another test above?
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.
good idea! trying that
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.
Ok, it didn't help :-(
I just tried locally. The problem is the default runtime, not the list of runtimes.
You need to unset CONTAINER_DEFAULT_RUNTIME for it to work.
I think it's ok to do that in this context, as the runtime is not involved - we're testing the config engine.
182abff to
af8a789
Compare
|
@saschagrunert PTAL |
af8a789 to
35e40be
Compare
saschagrunert
left a comment
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.
/lgtm
|
/retest |
1 similar comment
|
/retest |
test/config.bats
Outdated
|
|
||
| @test "handle nil workloads" { | ||
| # when | ||
| unset CONTAINER_RUNTIMES |
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.
| unset CONTAINER_RUNTIMES | |
| unset CONTAINER_DEFAULT_RUNTIME |
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! adapted as suggested
Signed-off-by: Peter Hunt <[email protected]>
35e40be to
fb66985
Compare
|
/retest |
saschagrunert
left a comment
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.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haircommander, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
|
/override ci/prow/ci-rhel-integration |
|
@haircommander: Overrode contexts on behalf of haircommander: ci/prow/ci-rhel-integration DetailsIn response to this:
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/test-infra repository. |
Signed-off-by: Peter Hunt [email protected]
What type of PR is this?
/kind bug
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for your reviewer:
fixes #6188
Does this PR introduce a user-facing change?