Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@saschagrunert
Copy link
Member

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

We now pass around the context to understand where the "Failed to get pid" message is coming from. We also don't have to log the message in case that the container is spoofed, otherwise the message may be misleading.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

None

Does this PR introduce a user-facing change?

Reduced "Failed to get pid for pod infra container" NRI message for spoofed containers and lowering the verbosity to `DEBUG`. 

We now pass around the context to understand where the "Failed to get
pid" message is coming from. We also don't have to log the message in
case that the container is spoofed, otherwise the message may be
misleading.

Signed-off-by: Sascha Grunert <[email protected]>
@saschagrunert saschagrunert requested a review from mrunalp as a code owner July 5, 2024 07:30
@openshift-ci openshift-ci bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Jul 5, 2024
@openshift-ci openshift-ci bot requested review from littlejawa and wgahnagl July 5, 2024 07:30
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 5, 2024
@codecov
Copy link

codecov bot commented Jul 5, 2024

Codecov Report

Attention: Patch coverage is 52.17391% with 11 lines in your changes missing coverage. Please review.

Project coverage is 49.53%. Comparing base (48511b4) to head (fc1bd92).
Report is 19 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8347   +/-   ##
=======================================
  Coverage   49.52%   49.53%           
=======================================
  Files         153      153           
  Lines       17069    17071    +2     
=======================================
+ Hits         8454     8456    +2     
  Misses       7552     7552           
  Partials     1063     1063           

@saschagrunert
Copy link
Member Author

/retest

@cri-o/cri-o-maintainers PTAL

@saschagrunert
Copy link
Member Author

/test ci-fedora-kata

if !ic.Spoofed() {
pid, err := ic.Pid()
if err != nil {
log.Debugf(ctx, "Failed to get pid for pod infra container: %v", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log.Debugf(ctx, "Failed to get pid for pod infra container: %v", err)
log.Debugf(ctx, "Failed to get PID for pod infra container: %v", err)

@kwilczynski
Copy link
Contributor

This is excellent!

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2024
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 10, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kwilczynski, saschagrunert

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

The pull request process is described here

Details 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

@saschagrunert
Copy link
Member Author

/retest

1 similar comment
@saschagrunert
Copy link
Member Author

/retest

@openshift-merge-bot openshift-merge-bot bot merged commit b7a672c into cri-o:main Jul 10, 2024
@saschagrunert saschagrunert deleted the nri-context-pid branch July 10, 2024 14:56
@kannon92
Copy link
Contributor

/cherry-pick release-1.30

@openshift-cherrypick-robot

@kannon92: new pull request created: #8435

Details

In response to this:

/cherry-pick release-1.30

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. 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.

4 participants