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

Skip to content

Conversation

@kolyshkin
Copy link
Collaborator

/kind bug

What this PR does / why we need it:

  1. In case pinns fails, we want to return a clear error message saying
    it has failed, not that we failed to unmount some mounts. So, do not
    return the "failed to unmount" error as it's minor in nature, and log
    the failures instead.

  2. In case pinns fails, we want to see its stderr, not just stdout.
    Before this patch, only stdout is collected (and now shown as it's empty).

  3. We can't be sure that the mounts we are trying to unmount were
    actually mounted, so ignore EINVAL from unmount(2). EINVAL means
    that either argument is not the mount point (i.e. not mounted),
    or that the flags are wrong. We only provide MNT_DETACH which
    is not a wrong flag, ergo EINVAL means "not mounted" and it should
    be ignored.

  4. Only log pinns output in case of error, and do it as a warning since
    it is pretty serious.

While at it, make some minor improvements around the code we're touching.

Which issue(s) this PR fixes:

Fixes: #4147

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

It is faster and also easier to read.

Signed-off-by: Kir Kolyshkin <[email protected]>
We know the size of the slice already, so let's set its capacity in
advance.

Signed-off-by: Kir Kolyshkin <[email protected]>
1. In case pinns fails, we want to return a clear error message saying
   it has failed, not that we failed to unmount some mounts. So, do not
   return the "failed to unmount" error as it's minor in nature, and log
   the failures instead.

2. In case pinns fails, we want to see its stderr, not just stdout.
   Before this patch, only stdout is collected (and now shown as it's empty).

3. We can't be sure that the mounts we are trying to unmount were
   actually mounted, so ignore EINVAL from unmount(2). EINVAL means
   that either argument is not the mount point (i.e. not mounted),
   or that the flags are wrong. We only provide MNT_DETACH which
   is not a wrong flag, ergo EINVAL means "not mounted" and it should
   be ignored.

4. Only log pinns output in case of error, and do it as a warning since
   it is pretty serious.

Signed-off-by: Kir Kolyshkin <[email protected]>
@openshift-ci-robot openshift-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. 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. labels Sep 1, 2020
@codecov
Copy link

codecov bot commented Sep 1, 2020

Codecov Report

Merging #4148 into master will increase coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #4148      +/-   ##
==========================================
+ Coverage   40.72%   40.74%   +0.02%     
==========================================
  Files         111      111              
  Lines        9502     9497       -5     
==========================================
  Hits         3870     3870              
+ Misses       5256     5251       -5     
  Partials      376      376              

@kolyshkin
Copy link
Collaborator 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

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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:

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 1, 2020
@TomSweeneyRedHat
Copy link
Contributor

LGTM
assuming happy tests.

@haircommander
Copy link
Member

/lgtm

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

/test integration_rhel

1 similar comment
@mrunalp
Copy link
Member

mrunalp commented Sep 2, 2020

/test integration_rhel

@openshift-ci-robot
Copy link

openshift-ci-robot commented Sep 2, 2020

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

Test name Commit Details Rerun command
ci/prow/e2e-aws 7b1e835 link /test e2e-aws
ci/openshift-jenkins/e2e_crun_cgroupv2 7b1e835 link /test e2e_cgroupv2

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.

@kolyshkin
Copy link
Collaborator Author

/retest

@openshift-merge-robot openshift-merge-robot merged commit 257b378 into cri-o:master Sep 2, 2020
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.

pinns failure diagnostics is not adequate

7 participants