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

docker: remove cni-plugins #8

Merged
merged 2 commits into from
Aug 19, 2020
Merged

Conversation

greut
Copy link
Contributor

@greut greut commented Aug 19, 2020

I've tried using it and failed miserably, only to fall back to installing Nomad via rpm/deb. It's probably not worth it making this image bigger with the CNI plugins if there is no possible use for them.

Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
@multani
Copy link
Owner

multani commented Aug 19, 2020

I've tried using it and failed miserably

I didn't have a look yet, what issues did you have?

via rpm/deb

🤨

@greut
Copy link
Contributor Author

greut commented Aug 19, 2020

I didn't have a look yet, what issues did you have?

/var/run/netns doesn't play well with bind mounts.

It's something along those lines, hashicorp/nomad#8371

rpm/deb

Now that there is a convenient way to install Nomad (and Consul), I'm only using this image for the server. For the client, it works too, but not when it starts playing with network namespaces. Kubernetes probably knows how to work around this.

@greut
Copy link
Contributor Author

greut commented Aug 19, 2020

Kubernetes probably knows how to work around this.

containernetworking/plugins#69

@greut
Copy link
Contributor Author

greut commented Aug 19, 2020

I also forgot to remove iptables

Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
@multani
Copy link
Owner

multani commented Aug 19, 2020

rpm/deb

Now that there is a convenient way to install Nomad (and Consul), I'm only using this image for the server. For the client, it works too, but not when it starts playing with network namespaces. Kubernetes probably knows how to work around this.

Oh right, I missed the announcement of the HashiCorp APT repository somehow.

@greut
Copy link
Contributor Author

greut commented Aug 19, 2020

I missed the announcement of the HashiCorp APT repository somehow.

🎉

Also, it needs the consul binary.

envoy_bootstrap: error creating bootstrap configuration for Connect proxy sidecar: exec: "consul": executable file not found in $PATH

https://github.com/hashicorp/nomad/blob/41b94eedc24d15234426da12e3eb3dbd0e260f52/client/allocrunner/taskrunner/envoybootstrap_hook.go#L175

@multani multani merged commit fc5f9b0 into multani:master Aug 19, 2020
@greut greut deleted the remove-cni-plugins branch April 12, 2021 18:22
@MatthewJohn
Copy link

MatthewJohn commented May 31, 2023

@multani For what it's worth, I've just run into the same error.

Kubernetes probably knows how to work around this.

The k8s logic that you mentioned is actually just the mount configuration, in particular the "bind-propagation" configuration (https://docs.docker.com/storage/bind-mounts/#configure-bind-propagation).
Changing my mount of /var/run/netns (or /var/run/docker/netns) to use bind-propagation shared fixed the issue :)

I think changing the docker-compose to use this should fix the issue :D :

    volumes:
      - type: bind
        source: /var/run/docker/netns
        target: /var/run/docker/netns
        bind:
          propagation: shared

For reference: https://github.com/MatthewJohn/vault-nomad-consul-terraform/blob/setup-service-mesh/modules/nomad/client/container/main.tf#L81

@multani
Copy link
Owner

multani commented May 31, 2023

Thanks for the heads-up @MatthewJohn!

TBH, I never really played with any CNI plugins until now, I'm happy to make some changes but I would need to check how I could test that beforehand 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants