-
Notifications
You must be signed in to change notification settings - Fork 35
Update Dockerfile to use buster #3
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
Conversation
siggy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apologies for delayed review.
curious: is any change required around replacing iptables with iptables-legacy? i recall we hit a similar issue in the linkerd2 repo prior to moving proxy-init to this repo:
linkerd/linkerd2@14974e1#diff-99f27e036a094ea78b927b9c14cdb019R26-R29
|
debian buster uses nftables, which makes old rules incompatible |
Dockerfile
Outdated
|
|
||
| ## package runtime | ||
| FROM debian:stretch-20190812-slim | ||
| FROM debian:buster-20190910-slim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this perhaps be buster-20200514-slim in order to match the buster version used in the linkerd2 repo (https://github.com/linkerd/linkerd2/pull/4542/files)?
| FROM debian:buster-20190910-slim | ||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends \ | ||
| iptables \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try adding
RUN update-alternatives --set iptables /usr/sbin/iptables-legacy \
&& update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
here to make current use of iptables work with buster.
(See linkerd/linkerd2#4567 for more info.)
6c3e0e5 to
69c4dad
Compare
|
Tested with The dashboard and linkerd command line output (stat, tap, etc.) all look correct. |
alpeb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the last change proxy-init is failing for me:
$ k -n linkerd logs linkerd-controller-65cfb4b59f-mwfth linkerd-init
2020/06/18 10:15:04 Tracing this script execution as [1592475304]
2020/06/18 10:15:04 State of iptables rules before run:
2020/06/18 10:15:04 > iptables -t nat -vnL
2020/06/18 10:15:04 < Fatal: can't open lock file /run/xtables.lock: Read-only file system
|
@alpeb I found the same error testing on multiple kubernetes I did some digging and found an issue in the Kubernetes repository which describes similar behavior. In that PR they address the issue by creating a kind also uses I don't think we want to use If I understand what I see that we use What do you think is the right approach here? Is there another option that I've overlooked? |
|
Okay, I figured out what is going on: The integration tests haven't been updated to match the Here is the output from the template in one of my service pods: initContainers:
...
name: linkerd-init
...
securityContext:
allowPrivilegeEscalation: false
capabilities:
add:
- NET_ADMIN
- NET_RAW
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: false
runAsUser: 0
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: FallbackToLogsOnError
...And the iptablestest-lab.yaml has: initContainers:
- name: linkerd-init
...
securityContext:
capabilities:
add:
- NET_ADMIN
privileged: false
runAsNonRoot: false
runAsUser: 0
...Using |
|
Thanks for the extra research @cpretzer 👍 From my understanding, It also seems to me the only way to do this while keeping proper locking is to rely on I'm realizing we're not honoring that lock file in CNI given we're relying on the default CC @grampelberg |
|
As to why we're observing this behavior now even though we're still using iptables[-legacy], it's because we're also upgrading from iptables From this change:
|
Signed-off-by: Charles Pretzer <charles@buoyant.io>
Signed-off-by: Charles Pretzer <charles@buoyant.io>
Signed-off-by: Charles Pretzer <charles@buoyant.io>
8287761 to
507950a
Compare
|
@cpretzer This is running fine for me when I run the control plane in linkerd/linkerd2#4692 using the proxy-init image produced here. The integration test is hanging presumably because the volume changes from linkerd/linkerd2#4692 need to be applied here as well to the init-containers in the pods in |
Signed-off-by: Charles Pretzer <charles@buoyant.io>
|
thanks @alpeb working on this now |
alpeb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
ihcsim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Signed-off-by: Steve Jenson <stevej@buoyant.io>
* modifying import paths and making a temporary copy of testutil/annotations.go Signed-off-by: Steve Jenson <stevej@buoyant.io> * removed testutil, dockerized cni installer tests now pass Signed-off-by: Steve Jenson <stevej@buoyant.io> * moving internal to pkg/linkerd-, removing Dockerfile until fixed, changining imports, removing linkerd2 k8s client with client-go Signed-off-by: Steve Jenson <stevej@buoyant.io> * gofmt install-cni_test.go Signed-off-by: Steve Jenson <stevej@buoyant.io> * go mod updates Signed-off-by: Steve Jenson <stevej@buoyant.io> * adding pkg to Docker image Signed-off-by: Steve Jenson <stevej@buoyant.io> * updating dev from v32 to v35 for go Signed-off-by: Steve Jenson <stevej@buoyant.io> * moving back to old dev image Signed-off-by: Steve Jenson <stevej@buoyant.io> * use dev:v32-go for go lint workflow Signed-off-by: Steve Jenson <stevej@buoyant.io> * fixing linter complaints Signed-off-by: Steve Jenson <stevej@buoyant.io> * fixing linter complaints Signed-off-by: Steve Jenson <stevej@buoyant.io> * turning off noisy lint #1 Signed-off-by: Steve Jenson <stevej@buoyant.io> * turning off noisy lint #2 Signed-off-by: Steve Jenson <stevej@buoyant.io> * turning off noisy lint #3 Signed-off-by: Steve Jenson <stevej@buoyant.io> * turning off noisy lint #4 Signed-off-by: Steve Jenson <stevej@buoyant.io> * turning off noisy lint #5 Signed-off-by: Steve Jenson <stevej@buoyant.io> * turning off noisy lint #6 Signed-off-by: Steve Jenson <stevej@buoyant.io> * Replace pkg/ with internal/ (#148) * Replace pkg/ with internal/ There's no need for a public library export. We can share code within this repo via the `internal` directory. * simplify package names Signed-off-by: Oliver Gould <ver@buoyant.io> * adding internal back. whoopsie Signed-off-by: Steve Jenson <stevej@buoyant.io> * bumping dev go version Signed-off-by: Steve Jenson <stevej@buoyant.io> * replace deprecated ioutil functions with io functions. Signed-off-by: Steve Jenson <stevej@buoyant.io> * increasing timeout to help with linter issues, adding verbose Signed-off-by: Steve Jenson <stevej@buoyant.io> * replace TODO with literals, wait for the linter to complain so we can give it the magic incantation to sleep now Signed-off-by: Steve Jenson <stevej@buoyant.io> * more linter Signed-off-by: Steve Jenson <stevej@buoyant.io> * gofmt Signed-off-by: Steve Jenson <stevej@buoyant.io> * swap position of comment and argument as the linter has an opinion here, too Signed-off-by: Steve Jenson <stevej@buoyant.io> * Update cni-plugin/main.go Co-authored-by: Alejandro Pedraza <alejandro@buoyant.io> * Update cni-plugin/main.go Co-authored-by: Alejandro Pedraza <alejandro@buoyant.io> * Update cni-plugin/main.go Co-authored-by: Alejandro Pedraza <alejandro@buoyant.io> * Update cni-plugin/main.go Co-authored-by: Alejandro Pedraza <alejandro@buoyant.io> * simplify lint call Signed-off-by: Steve Jenson <stevej@buoyant.io> * removed unneeded abstraction Signed-off-by: Steve Jenson <stevej@buoyant.io> * linter for cni-plugin and all go code Signed-off-by: Steve Jenson <stevej@buoyant.io> * giving flags to go linter Signed-off-by: Steve Jenson <stevej@buoyant.io> * run the test on the moved internal package Signed-off-by: Steve Jenson <stevej@buoyant.io> * adding keys back for annotation lookup Signed-off-by: Steve Jenson <stevej@buoyant.io> Signed-off-by: Steve Jenson <stevej@buoyant.io> Signed-off-by: Oliver Gould <ver@buoyant.io> Co-authored-by: Oliver Gould <ver@buoyant.io> Co-authored-by: Alejandro Pedraza <alejandro@buoyant.io>
* modifying import paths and making a temporary copy of testutil/annotations.go Signed-off-by: Steve Jenson <stevej@buoyant.io> * removed testutil, dockerized cni installer tests now pass Signed-off-by: Steve Jenson <stevej@buoyant.io> * moving internal to pkg/linkerd-, removing Dockerfile until fixed, changining imports, removing linkerd2 k8s client with client-go Signed-off-by: Steve Jenson <stevej@buoyant.io> * gofmt install-cni_test.go Signed-off-by: Steve Jenson <stevej@buoyant.io> * go mod updates Signed-off-by: Steve Jenson <stevej@buoyant.io> * adding pkg to Docker image Signed-off-by: Steve Jenson <stevej@buoyant.io> * updating dev from v32 to v35 for go Signed-off-by: Steve Jenson <stevej@buoyant.io> * moving back to old dev image Signed-off-by: Steve Jenson <stevej@buoyant.io> * use dev:v32-go for go lint workflow Signed-off-by: Steve Jenson <stevej@buoyant.io> * fixing linter complaints Signed-off-by: Steve Jenson <stevej@buoyant.io> * fixing linter complaints Signed-off-by: Steve Jenson <stevej@buoyant.io> * turning off noisy lint #1 Signed-off-by: Steve Jenson <stevej@buoyant.io> * turning off noisy lint #2 Signed-off-by: Steve Jenson <stevej@buoyant.io> * turning off noisy lint #3 Signed-off-by: Steve Jenson <stevej@buoyant.io> * turning off noisy lint #4 Signed-off-by: Steve Jenson <stevej@buoyant.io> * turning off noisy lint #5 Signed-off-by: Steve Jenson <stevej@buoyant.io> * turning off noisy lint #6 Signed-off-by: Steve Jenson <stevej@buoyant.io> * adding in Dockerfile, just rules for building, and a workflow for testing the cni-plugin installer script Signed-off-by: Steve Jenson <stevej@buoyant.io> * remember to setup docker Signed-off-by: Steve Jenson <stevej@buoyant.io> * remember to setup docker-qemu Signed-off-by: Steve Jenson <stevej@buoyant.io> * where is docker? Signed-off-by: Steve Jenson <stevej@buoyant.io> * back to a named ubuntu version, removing devcontainer Signed-off-by: Steve Jenson <stevej@buoyant.io> * we need just Signed-off-by: Steve Jenson <stevej@buoyant.io> * WIP import of CNI plugin integration test environment. does not run due to image pull errors. Signed-off-by: Steve Jenson <stevej@buoyant.io> * rewriting just rules to match new rules Signed-off-by: Steve Jenson <stevej@buoyant.io> * bumping dev version, renaming smoke test Signed-off-by: Steve Jenson <stevej@buoyant.io> * WIP for running smoke tests Signed-off-by: Steve Jenson <stevej@buoyant.io> * go workflow fix Signed-off-by: Steve Jenson <stevej@buoyant.io> * also rid ourselves of ioutil in this branch Signed-off-by: Steve Jenson <stevej@buoyant.io> * adding a second, passing test Signed-off-by: Steve Jenson <stevej@buoyant.io> * let's run the test in CI Signed-off-by: Steve Jenson <stevej@buoyant.io> * name the test properly for CI to run it Signed-off-by: Steve Jenson <stevej@buoyant.io> * made the installer integration tests more in-line with the other integration tests Signed-off-by: Steve Jenson <stevej@buoyant.io> * cni-plugin integration test workflow Signed-off-by: Steve Jenson <stevej@buoyant.io> * breaking up steps, renaming test Signed-off-by: Steve Jenson <stevej@buoyant.io> * just Signed-off-by: Steve Jenson <stevej@buoyant.io> * bringing changes from linkerd2 over Signed-off-by: Steve Jenson <stevej@buoyant.io> * tests running within cni-plugin context Signed-off-by: Steve Jenson <stevej@buoyant.io> * create service account and don't delete so we can inspect Signed-off-by: Steve Jenson <stevej@buoyant.io> * fix namespaces, use matei's k3d/k3s mountPaths in the hopes that CNI will run in our pod. Signed-off-by: Steve Jenson <stevej@buoyant.io> * WIP for debugging why CNI won't run in my own pods despite everything looking normal Signed-off-by: Steve Jenson <stevej@buoyant.io> * adding whitespace, fixing comment, removing unneeded variable Signed-off-by: Steve Jenson <stevej@buoyant.io> * fixing some small things Signed-off-by: Steve Jenson <stevej@buoyant.io> * improving Dockerfile, going back to edge for linkerd-cni Signed-off-by: Steve Jenson <stevej@buoyant.io> * cleaned up Dockerfile Signed-off-by: Steve Jenson <stevej@buoyant.io> * using --link for 50% size improvement Signed-off-by: Steve Jenson <stevej@buoyant.io> * cleanup unusued functions, run network-validator before test suite Signed-off-by: Steve Jenson <stevej@buoyant.io> * remove qemu setup, add comment about log level Signed-off-by: Steve Jenson <stevej@buoyant.io> * add wiring to see cni-net-dir and check for kubeconfig Signed-off-by: Steve Jenson <stevej@buoyant.io> * checking that linkerd-cni is the last plugin in the conflist Signed-off-by: Steve Jenson <stevej@buoyant.io> * renaming smoke_test to flannel Signed-off-by: Steve Jenson <stevej@buoyant.io> * rename files, update justfile * name a test file _test so the test runner will run my test Signed-off-by: Steve Jenson <stevej@buoyant.io> * renaming to flannel Signed-off-by: Steve Jenson <stevej@buoyant.io> * remove hardcoded filename Signed-off-by: Steve Jenson <stevej@buoyant.io> * clarified comment Signed-off-by: Steve Jenson <stevej@buoyant.io> * fixed merge conflict error Signed-off-by: Steve Jenson <stevej@buoyant.io> * fix log levels Signed-off-by: Steve Jenson <stevej@buoyant.io> * fix a log level Signed-off-by: Steve Jenson <stevej@buoyant.io> * run test on all files in ./cni-plugin Signed-off-by: Steve Jenson <stevej@buoyant.io> * hcomment explaining why there's no ENTRYPOINT Signed-off-by: Steve Jenson <stevej@buoyant.io> * use a map instead of an array for simplicity Signed-off-by: Steve Jenson <stevej@buoyant.io> * abstract which integration test subdirectory gets used, add internal to ensure those packages are tested Signed-off-by: Steve Jenson <stevej@buoyant.io> * go.yml is already running these tests are there no integration tests in there to run Signed-off-by: Steve Jenson <stevej@buoyant.io> * breaking up a line Signed-off-by: Steve Jenson <stevej@buoyant.io> * renaming SUBDIRECTORY to SCENARIO and renaming a run just target to flannel to signify that this is the rule to crib for other scenarios Signed-off-by: Steve Jenson <stevej@buoyant.io> * better error handling of the cleanup() function, print more diagnostic information if linkerd-cni rollout fails Signed-off-by: Steve Jenson <stevej@buoyant.io> * add error handling for describe ds and logs Signed-off-by: Steve Jenson <stevej@buoyant.io> Signed-off-by: Steve Jenson <stevej@buoyant.io>
Signed-off-by: Charles Pretzer charles@buoyant.io
This commit updates the Dockerfile to use the buster slim image
debian:buster-20190910-slim