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

move creation of dev devices in /chroot/dev from build image to run image #8619

Merged
merged 2 commits into from
May 24, 2022

Conversation

rba
Copy link
Contributor

@rba rba commented May 23, 2022

What this PR does / why we need it:

While using the chroot ingress described in https://kubernetes.io/blog/2022/04/28/ingress-nginx-1-2-0/ we've got the following errors:

2022/05/09 07:08:43 [warn] [lua] lua_ingress.lua:32: get_seed_from_urandom(): failed
2022/05/09 07:08:43 [warn] [lua] lua_ingress.lua:59: randomseed(): failed
2022/05/09 12:24:44 [warn] [lua] lua_ingress.lua:32: get_seed_from_urandom(): failed
2022/05/09 12:24:44 [warn] [lua] lua_ingress.lua:59: randomseed(): failed

Inspecting /chroot/dev/urandom shows that it's a file instead of a character device:

$ docker run --rm  gcr.io/k8s-staging-ingress-nginx/controller-chroot:v1.2.0 ls -al /chroot/dev
total 12
drwxr-xr-x    2 root     root          4096 Apr 20 18:42 .
drwxr-xr-x    1 root     root          4096 Apr 20 18:43 ..
-rw-rw-rw-    1 root     root             0 Apr 20 18:42 full
-rw-rw-rw-    1 root     root             0 Apr 20 18:42 null
-rw-rw-rw-    1 root     root             0 Apr 20 18:42 ptmx
-rw-rw-rw-    1 root     root             0 Apr 20 18:42 random
-rw-rw-rw-    1 root     root             0 Apr 20 18:42 tty
-rw-rw-rw-    1 root     root             0 Apr 20 18:42 urandom
-rw-rw-rw-    1 root     root             0 Apr 20 18:42 zero

It seems that the docker COPY from the build to the run image is not able to copy the character special files correctly:

$ docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock wagoodman/dive:latest gcr.io/k8s-staging-ingress-nginx/controller-chroot:v1.2.0
Screenshot 2022-05-23 at 14 18 15

After the change the image looks as follows:

$ docker run --rm  rbaumer/controller-chroot:1.0.0-dev ls -al /chroot/dev
total 8
drwxr-xr-x    1 root     root          4096 May 23 11:57 .
drwxr-xr-x    1 root     root          4096 May 23 11:57 ..
crw-rw-rw-    1 root     root        1,   7 May 23 11:57 full
crw-rw-rw-    1 root     root        1,   3 May 23 11:57 null
crw-rw-rw-    1 root     root        5,   2 May 23 11:57 ptmx
crw-rw-rw-    1 root     root        1,   8 May 23 11:57 random
crw-rw-rw-    1 root     root        5,   0 May 23 11:57 tty
crw-rw-rw-    1 root     root        1,   9 May 23 11:57 urandom
crw-rw-rw-    1 root     root        1,   5 May 23 11:57 zero

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation only

Which issue/s this PR fixes

n/a

How Has This Been Tested?

Some basic testing has been done based on getting-started.md and this seems to be fine.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have added tests to cover my changes.
  • All new and existing tests passed.

rba and others added 2 commits May 19, 2022 12:12
…mage, means from chroot.sh to Docherfile.chroot as the docker COPY command seems to make ordinary files from /dev/*
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented May 23, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 23, 2022
@k8s-ci-robot
Copy link
Contributor

@rba: This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@k8s-ci-robot k8s-ci-robot added the needs-kind Indicates a PR lacks a `kind/foo` label and requires one. label May 23, 2022
@k8s-ci-robot
Copy link
Contributor

Welcome @rba!

It looks like this is your first PR to kubernetes/ingress-nginx 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/ingress-nginx has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @rba. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 23, 2022
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels May 23, 2022
@rikatz
Copy link
Contributor

rikatz commented May 24, 2022

/ok-to-test
/lgtm
/approve
Good catch!!
/hold

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 24, 2022
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 24, 2022
@rikatz
Copy link
Contributor

rikatz commented May 24, 2022

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 24, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rba, rikatz

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 24, 2022
@k8s-ci-robot k8s-ci-robot merged commit b98133d into kubernetes:main May 24, 2022
rchshld pushed a commit to joomcode/ingress-nginx that referenced this pull request May 19, 2023
…mage, means from chroot.sh to Docherfile.chroot as the docker COPY command seems to make ordinary files from /dev/* (kubernetes#8619)
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. 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. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

3 participants