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

Replace error with a warning when iptables fails #798

Merged
merged 6 commits into from
Feb 23, 2022
Merged

Conversation

LimeHat
Copy link
Member

@LimeHat LimeHat commented Feb 23, 2022

Fix #797

@LimeHat
Copy link
Member Author

LimeHat commented Feb 23, 2022

Makes sense @hellt, updated according to the comments

@hellt
Copy link
Member

hellt commented Feb 23, 2022

looks good @LimeHat

I had 3 messages around it this morning :D all the cases had one thing in common:
docker was installed via yum on RH 7.9 -> no DOCKER, DOCKER-USER chain whatsoever...

Initially I thought to make another check if DOCKER-USER chain exists and only then attempt to manipulate the rules. This will definitely mask any errors on installations which miss DOCKER-USER chain. But then maybe it is best to keep these errors present just to make people consider installing docker properly, so that chains will be there?
What do you think?

@LimeHat
Copy link
Member Author

LimeHat commented Feb 23, 2022

Hmm. Maybe add a check on the existence and a separate log message (perhaps with a link to a FAQ on the issue)?

@hellt
Copy link
Member

hellt commented Feb 23, 2022

sounds good

how about that?

image

kept under external-access chapter of network.md?

Source:

???error "I receive 'Missing Docker iptables chains' error"
    Containerlab will throw an error "Missing Docker iptables chains" when no `DOCKER-USER` chain is found. This source of this error is likely rooted in the way docker was installed on your system. Quite often, it happens when docker is installed via package managers.

    It is recommended to follow the [official installation procedures](https://docs.docker.com/engine/install/) by selecting "Installation per distro" menu option. When docker is correctly installed on the system, additional iptables chains will be available and the containerlab error will disappear.

If you want to finish this off you can take this and change the wording as you see fit (along with the additional check in the install/destroy funcs). Otherwise I can finish this off later

@hellt hellt merged commit 40bb9b8 into srl-labs:main Feb 23, 2022
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.

make iptables rules management fail gracefully
2 participants