Skip to content
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

Fix AppArmor test for docker 1.13 #46725

Merged
merged 2 commits into from
Jun 3, 2017

Conversation

timstclair
Copy link

@timstclair timstclair commented May 31, 2017

... & better debugging.

The issue is that we run the pod containers in a shared PID namespace with docker 1.13, so PID 1 is no longer the container's root process. Since it's messy to get the container's root process, I switched to using /proc/self to read the apparmor profile. While this wouldn't catch a regression that caused only the init process to run with the wrong profile, I think it's a good approximation.

/cc @aulanov @Amey-D

@timstclair timstclair added area/test release-note-none Denotes a PR that doesn't merit a release note. labels May 31, 2017
@timstclair timstclair added this to the v1.7 milestone May 31, 2017
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 31, 2017
@k8s-ci-robot k8s-ci-robot requested a review from Amey-D May 31, 2017 20:05
@k8s-ci-robot
Copy link
Contributor

@timstclair: GitHub didn't allow me to request PR reviews from the following users: aulanov.

Note that only kubernetes members can review this PR, and authors cannot review their own PRs.

In response to this:

Help debug a test failure on docker 1.13

/cc @aulanov @Amey-D

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.

@k8s-github-robot k8s-github-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 31, 2017
@Amey-D
Copy link
Contributor

Amey-D commented May 31, 2017

I'm not familiar with the test code, but +1 to the additional logging to help debugging.

@Amey-D
Copy link
Contributor

Amey-D commented May 31, 2017

/lgtm

@timstclair
Copy link
Author

It turns out AfterEach blocks are not executed in reverse order, so the test needs to be wrapped in a Context to ensure the logs are captured before the namespace is torn down. (Updated)

@k8s-github-robot k8s-github-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 31, 2017
@timstclair timstclair changed the title Capture better debug logs on AppArmor test failure Fix AppArmor test for docker 1.13 Jun 1, 2017
@timstclair
Copy link
Author

Repurposing as a bug fix.

@soltysh
Copy link
Contributor

soltysh commented Jun 1, 2017

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 1, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Amey-D, soltysh, timstclair

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

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 1, 2017
@timstclair
Copy link
Author

@k8s-bot pull-kubernetes-e2e-gce-etcd3 test this
@k8s-bot pull-kubernetes-federation-e2e-gce test this

@shashidharatd
Copy link

@k8s-bot pull-kubernetes-federation-e2e-gce test this
ref: #46827

@shashidharatd
Copy link

@k8s-bot pull-kubernetes-federation-e2e-gce test this

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 46620, 46732, 46773, 46772, 46725)

@k8s-github-robot k8s-github-robot merged commit 903c40b into kubernetes:master Jun 3, 2017
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. area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants