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

Skip to content

Conversation

@haircommander
Copy link
Member

@haircommander haircommander commented Aug 31, 2020

Signed-off-by: Peter Hunt [email protected]

What type of PR is this?

/kind bug

What this PR does / why we need it:

as we have seen the ctime of it's proc entry fluctuate, and the process start time (item 22 in /proc/pid/stat)
could be more reliable

this removes superfluous log lines like this:
0e06ea75835a28aee51b37751e51c6a6f4ac5a54fbe5b805d13c9184c075b74b: PID 3240 is running but has start time of 1598893538, whereas the saved start time is 1598893381. PID wrap may have occurred"

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

none

@openshift-ci-robot openshift-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/bug Categorizes issue or PR as related to a bug. labels Aug 31, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 31, 2020
@haircommander haircommander force-pushed the psgo-pid-checking branch 3 times, most recently from 331c377 to b8207b6 Compare August 31, 2020 21:20
@mrunalp
Copy link
Member

mrunalp commented Aug 31, 2020

@kolyshkin ptal

@codecov
Copy link

codecov bot commented Aug 31, 2020

Codecov Report

Merging #4146 into master will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4146      +/-   ##
==========================================
+ Coverage   40.76%   40.83%   +0.06%     
==========================================
  Files         111      111              
  Lines        9494     9505      +11     
==========================================
+ Hits         3870     3881      +11     
  Misses       5248     5248              
  Partials      376      376              

@TomSweeneyRedHat
Copy link
Contributor

LGTM once Kir's comment is addressed and the tests get happy.

@haircommander haircommander force-pushed the psgo-pid-checking branch 2 times, most recently from c022a16 to 715b765 Compare September 1, 2020 14:30
@haircommander
Copy link
Member Author

/retest

@haircommander
Copy link
Member Author

@haircommander
Copy link
Member Author

/retest

@haircommander
Copy link
Member Author

/cherry-pick release-1.19

@openshift-cherrypick-robot

@haircommander: once the present PR merges, I will cherry-pick it on top of release-1.19 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-1.19

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.

@haircommander
Copy link
Member Author

/retest

@haircommander
Copy link
Member Author

updated as suggested and added unit tests

@haircommander
Copy link
Member Author

/retest

@haircommander
Copy link
Member Author

@openshift-cherrypick-robot

@haircommander: once the present PR merges, I will cherry-pick it on top of release-1.19 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-1.19

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.

// trim from the beginning to the character after the last space
data = data[iter+1:]
// find the next space
iter = bytes.IndexRune(data, ' ')
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need to use IndexRune here as we do not expect any Unicode in the input.

@kolyshkin
Copy link
Collaborator

Looks much better now, just a nit about using bytes.IndexRune() instead of bytes.Index()

@kolyshkin
Copy link
Collaborator

instead of bytes.Index()

or, yet better, bytes.IndexByte()

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

Just a nit, otherwise LGTM

as we have seen the ctime of it's proc entry fluctuate, and the process start time (item 22 in /proc/pid/stat)
could be more reliable

Signed-off-by: Peter Hunt <[email protected]>
@TomSweeneyRedHat
Copy link
Contributor

One question
LGTM otherwise

@haircommander
Copy link
Member Author

/retest

1 similar comment
@haircommander
Copy link
Member Author

/retest

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haircommander, kolyshkin, 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:
  • OWNERS [haircommander,saschagrunert]

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

@mrunalp
Copy link
Member

mrunalp commented Sep 3, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 3, 2020
@haircommander
Copy link
Member Author

/retest

1 similar comment
@haircommander
Copy link
Member Author

/retest

@haircommander
Copy link
Member Author

/test integration_rhel

@haircommander
Copy link
Member Author

/retest

2 similar comments
@haircommander
Copy link
Member Author

/retest

@haircommander
Copy link
Member Author

/retest

@openshift-ci-robot
Copy link

openshift-ci-robot commented Sep 4, 2020

@haircommander: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-aws 167fed4 link /test e2e-aws

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@haircommander
Copy link
Member Author

/retest

@openshift-merge-robot openshift-merge-robot merged commit 5cfd2f3 into cri-o:master Sep 4, 2020
@openshift-cherrypick-robot

@haircommander: #4146 failed to apply on top of branch "release-1.19":

Applying: oci: parse stat file instead of using ctime
Using index info to reconstruct a base tree...
M	internal/oci/container.go
M	internal/oci/container_test.go
Falling back to patching base and 3-way merge...
Auto-merging internal/oci/container_test.go
Auto-merging internal/oci/container.go
CONFLICT (content): Merge conflict in internal/oci/container.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 oci: parse stat file instead of using ctime
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Details

In response to this:

/cherry-pick release-1.19

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.

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/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants