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

Skip to content

Conversation

@kolyshkin
Copy link
Collaborator

What type of PR is this?

/kind bug

What this PR does / why we need it:

(this is a backport of #4334 to 1.19 release branch)

This is mostly to have containers/storage#757
which should fix occasional CI failures (and probably real failures, too).

Which issue(s) this PR fixes:

time="2020-11-02T19:00:03Z" level=fatal msg="creating container: rpc error: code = Unknown desc = error creating an ID-mapped copy of layer "01d6f430ddfdf1203b505fbb03c6479802a3366609d5e0231a30f85f412f873d": exit status 1: error during chown: storage-chown-by-maps: chown("lib/apk/db/scripts.tar"): lchown lib/apk/db/scripts.tar: interrupted system call"

periodically caught by CI

Special notes for your reviewer:

(this is a backport of #4334 to 1.19 release branch)

Does this PR introduce a user-facing change?

Fix occasional "chown: interrupted system call" error on container creation.

umohnani8 and others added 30 commits June 5, 2020 14:08
[1.19] Add logic for running openshift e2e-aws tests
This reverts commit a1bd010.

Signed-off-by: Urvashi Mohnani <[email protected]>
[1.19] Revert "Add logic for running openshift e2e-aws tests"
saschagrunert and others added 18 commits September 14, 2020 09:41
This fixes the build of the release-note tool, which previously failed
with:

```
vendor/google.golang.org/api/internal/conn_pool.go:29:2: undefined: grpc.ClientConnInterface
```

Signed-off-by: Sascha Grunert <[email protected]>
otherwise, we leak containers in runc

Signed-off-by: Peter Hunt <[email protected]>
[1.19] server: cleanup container in runtime after failed creation
Sometimes this test fails like this:

> not ok 11 config dir should fail with invalid option
> (in test file ./config.bats, line 38)
>   `RES=$(cat "$CRIO_LOG")' failed
> cat: /tmp/tmp.nho2aP6lqh/crio.log: No such file or directory
> unable to decode configuration /tmp/tmp.nho2aP6lqh/crio.conf: Near line 2 (last key parsed 'crio.runtime.log_level'): expected value but found "info" instead

The reason it fails is logs are written by using tee,
which for some reason is run in a subshell, and it looks
like a race between the main shell and the subshell.

Anyway, using tee is not needed here. Simplify it by using run,
and add a check for non-zero exit code.

The second proble is, the test is not doing what it supposed to.
Judging by the test name ("config dir should fail"), it seems the test
should write a correct log_level value to the main config file, a wrong
value to a file under crio.conf.d, and check that crio fails.

The problem is, the value in main file is wrong as well it is not quoted.

Fix the test so the main config file has the correct log_level value.
Fix the output check to look for the specific bad key.

Signed-off-by: Kir Kolyshkin <[email protected]>
The following failure happens in CI on RHEL7 from time to time:

> removing the pod sandbox "0d5bf5eeb0048bb70ab8ee9bca0a497e216a6c6cfa42507a8d735f61c825784d": rpc error: code = Unknown desc = unable to remove managed namespaces: Removing namespaces encountered the following errors [unlinkat /var/run/netns/0376543d-4917-417f-b406-7e8ab07cb847: device or resource busy]

(with different test cases and different namespaces).

RHEL7 kernel has upstream commit [1] backported, but the feature is
controlled by a sysctl and is off by default. For the feature to work,
one needs to set fs.may_detach_mounts = 1.

On production RHEL7 systems, this is done by runc rpm (see [2]), but
we're not using those rpms for CI, so we have to set the sysctl
manually.

Add an integration test case to check the sysctl is set.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8ed936b5671bfb33d89bc60bdcc7cf0470ba52fe
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1823374#c17

Signed-off-by: Kir Kolyshkin <[email protected]>
... and make it fatal. See previous commit for details.

Signed-off-by: Kir Kolyshkin <[email protected]>
…pick-4217-to-release-1.19

[release-1.19] Fix bogus CI test failures
…pick-4213-to-release-1.19

[release-1.19] test/config: fix "config dir should fail with invalid option"
If Pid or InitPid is not set correctly, then c.Alive()
will return false, and all calls depending on c.Alive()
will fail.

Fixes: cri-o#4224

Signed-off-by: bin liu <[email protected]>
(cherry picked from commit 6913515)

Fixes: cri-o#4264

Signed-off-by: Francesco Giudici <[email protected]>
…nfra

[1.19] runtime_vm: set Pid and InitPid for VM runtimes
Passing ttrpc.ErrClosed to errdefs.FromGRPC() will result in an "ttrpc:
closed: unknown" error, which we can't match in any possible way.

Knowing that let's, instead, return errdefs.ErrNotFound, as already done
in updateContainerStatus() so we can properly match the error when it
occurs.

Signed-off-by: Fabiano Fidêncio <[email protected]>
In the goroutine used to monitor whether the container was terminated or
not, we should not fail in case the VM was shutdown, as this is expected
to happen and will cause a ttrpc.ErrClosed.

runtime's wait() function, however, will returns errdefs.ErrNotFound
when a ttrpc.ErrCloses happens in order to avoid returning "ttrpc:
closed: unknown" (see previous commit) and that's the reason we just
check for errdefs.ErrNotFound and do not error out in that case.

Signed-off-by: Fabiano Fidêncio <[email protected]>
If the VM is down when removing the container, ttrpc.ErrClosed would be
returned and we'd return this error up in the chain. However, if the VM
is down, so is the container and we could simply ignore the error
reported, as already done in a few other parts of our code.

Signed-off-by: Fabiano Fidêncio <[email protected]>
…pick-4263-to-release-1.19

[release-1.19] runtime_vm: Fix non terminating pods
This is mostly to have containers/storage#757
which should fix occasional CI failures.

Manual backport of commit 85c665a.

Signed-off-by: Kir Kolyshkin <[email protected]>
@openshift-ci-robot openshift-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. dco-signoff: no Indicates the PR's author has not DCO signed all their commits. labels Nov 2, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kolyshkin
To complete the pull request process, please assign saschagrunert after the PR has been reviewed.
You can assign the PR to them by writing /assign @saschagrunert in a comment when ready.

The full list of commands accepted by this bot can be found 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
Copy link

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.

📝 Please follow instructions in the contributing guide to update your commits with the DCO

Full details of the Developer Certificate of Origin can be found at developercertificate.org.

The list of commits missing DCO signoff:

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.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 2, 2020
@openshift-ci-robot
Copy link

@kolyshkin: PR needs rebase.

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.

@kolyshkin
Copy link
Collaborator Author

Ahh, wrong base branch; fixed in #4337

@kolyshkin kolyshkin closed this Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: no Indicates the PR's author has not DCO signed all their commits. kind/bug Categorizes issue or PR as related to a bug. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. 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.

9 participants