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

Telepresence's new version v2.6.x doesn't work in colima #295

Open
ventsislav-georgiev opened this issue May 19, 2022 · 14 comments
Open

Telepresence's new version v2.6.x doesn't work in colima #295

ventsislav-georgiev opened this issue May 19, 2022 · 14 comments

Comments

@ventsislav-georgiev
Copy link

ventsislav-georgiev commented May 19, 2022

This project https://github.com/telepresenceio/telepresence allows for a pod/deployment in the cluster to forward all traffic to instance running on localhost. It seems to do it using sidecar container with iptables config.

Since updating telepresence to v2.6.x it stopped working and its container gives the following error on startup:

info    Traffic Agent Init v2.6.2
error   failed to clear chain TEL_INBOUND_TCP: running [/sbin/iptables -t nat -N TEL_INBOUND_TCP --wait]: exit status 3: iptables v1.8.7 (legacy): can't initialize iptables table `nat': iptables who? (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.
error   quit: failed to clear chain TEL_INBOUND_TCP: running [/sbin/iptables -t nat -N TEL_INBOUND_TCP --wait]: exit status 3: iptables v1.8.7 (legacy): can't initialize iptables table `nat': iptables who? (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.

I've tried one solution found from searching for the error.
Running colima ssh and then:

sudo modprobe ip_tables
sudo echo 'ip_tables' >> /etc/modules

But it didn't help.

Any clue what is causing this and how to fix it?

@abiosoft
Copy link
Owner

abiosoft commented May 19, 2022

@ventsislav-georgiev can you upgrade to latest development version brew install --HEAD colima and see if changes anything?

PS: you can always experiment with a separate profile e.g. colima start test

@ventsislav-georgiev
Copy link
Author

Got the same error when using brew install --HEAD colima.

@ventsislav-georgiev
Copy link
Author

After more testing it seems to be an issue with telepresence v2.6 version: telepresenceio/telepresence#2596

@ventsislav-georgiev ventsislav-georgiev changed the title Telepresence stopped working in v0.4 Telepresence's new version v2.6.x doesn't work in colima May 20, 2022
@thallgren
Copy link

thallgren commented May 24, 2022

Telepresence 2.6.x versions will use iptables in places where older versions didn't. That's why this problem surfaces in 2.6.x.

Telepresence 2.6.x runs fine with colima on my powerbook (amd64), but the exact same setup fails on my M1.

@thallgren
Copy link

Any reason why iptables doesn't work in Colima when using the arm architecture?

@ventsislav-georgiev
Copy link
Author

@abiosoft starting colima has the following error msg:

msg="[hostagent] failed to parse macOS version \"12.4\": 12.4 is not in dotted-tri format"

although its probably not related to the iptables issue

@abiosoft
Copy link
Owner

@ventsislav-georgiev it's a Lima issue that has been fixed lima-vm/lima#869 lima-vm/lima#868.

I am not sure if the fix has been released yet, but you can brew install --head lima for the meantime.

@ventsislav-georgiev
Copy link
Author

@abiosoft who can help with this issue regarding the iptables on M1, should we create issue for lima-vm?

@abiosoft
Copy link
Owner

abiosoft commented Jun 1, 2022

@ventsislav-georgiev I am not sure it's a Lima issue, I am suspecting Alpine.
I would have to do some tests to pinpoint the issue but it would take a day or two before I have time for proper troubleshooting.

@ventsislav-georgiev
Copy link
Author

@abiosoft any progress or anything I can do to help?

@abiosoft
Copy link
Owner

Trying to get my hands on an M1 device, this should happen this week.
Emulating aarch64 is too slow on my Intel Mac to do anything meaningful with kubernetes.

@rfay
Copy link
Contributor

rfay commented Jun 13, 2022

There are a couple fairly easy ways to do this. MacStadium offers an open-source machine, https://www.macstadium.com/opensource - they've been providing one to DDEV that is used for tests. Also Scaleway has M1 machines that you only have to rent for 24 hours, fair price. https://www.scaleway.com/en/

@ventsislav-georgiev
Copy link
Author

FYI same issue in different projects:
wojas/docker-mac-network#16
nginxinc/nginx-service-mesh#35

@abiosoft
Copy link
Owner

@rfay thanks for the suggestions, I successfully got a free open source machine from macStadium.
@ventsislav-georgiev I am still troubleshooting this.

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

No branches or pull requests

4 participants