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

sysctl-setup.yml doesn't recognize Ubuntu 20.04 #92

Open
ea-p opened this issue Dec 31, 2020 · 13 comments
Open

sysctl-setup.yml doesn't recognize Ubuntu 20.04 #92

ea-p opened this issue Dec 31, 2020 · 13 comments
Labels
bug Something isn't working

Comments

@ea-p
Copy link

ea-p commented Dec 31, 2020

Received this error while using this role to install k8s on an ubuntu 20.04 server.

{
"msg": "Failed to reload sysctl: kernel.panic = 10\nnet.ipv6.conf.all.disable_ipv6 = 1\nsysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-iptables: No such file or directory\n",
"invocation": {
"module_args": {
"name": "net.bridge.bridge-nf-call-iptables",
"value": "1",
"state": "present",
"reload": true,
"sysctl_set": false,
"ignoreerrors": false,
"sysctl_file": "/etc/sysctl.conf"
}
},
"_ansible_no_log": false,
"changed": false,
"item": "net.bridge.bridge-nf-call-iptables",
"ansible_loop_var": "item",
"_ansible_item_label": "net.bridge.bridge-nf-call-iptables"
}

This is from the server:
"ansible_distribution": "Ubuntu",
"ansible_distribution_file_parsed": true,
"ansible_distribution_file_path": "/etc/os-release",
"ansible_distribution_file_variety": "Debian",
"ansible_distribution_major_version": "20",
"ansible_distribution_release": "focal",
"ansible_distribution_version": "20.04",

Maybe switch from "ansible_distribution" to "ansible_os_family": "Debian"

@geerlingguy
Copy link
Owner

Strangely, I'm also running into this on Debian 10 over in geerlingguy/raspberry-pi-dramble#187

This was referenced Apr 21, 2021
@stale
Copy link

stale bot commented Apr 26, 2021

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label Apr 26, 2021
@rdxmb
Copy link
Contributor

rdxmb commented May 4, 2021

not stale, see existing PR

@stale
Copy link

stale bot commented Jun 3, 2021

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

@stale stale bot closed this as completed Jun 3, 2021
@rdxmb
Copy link
Contributor

rdxmb commented Jun 7, 2021

/reopen please

@geerlingguy geerlingguy reopened this Jun 7, 2021
@geerlingguy geerlingguy added the bug Something isn't working label Jun 7, 2021
@stale
Copy link

stale bot commented Jun 7, 2021

This issue is no longer marked for closure.

1 similar comment
@stale
Copy link

stale bot commented Jun 7, 2021

This issue is no longer marked for closure.

@stale stale bot removed the stale label Jun 7, 2021
@ccokee
Copy link

ccokee commented Sep 12, 2021

I'm using this role in CentOS 7 on Vagrant (centos/7 box) and I'm stepping in the same problem with sysctl-setup.yml

@TonyRouse
Copy link

TonyRouse commented Dec 1, 2021

I only had to add the following before the "Let iptables see bridged traffic." step

- name: Ensure br_netfilter is enabled.
  modprobe:
    name: br_netfilter
    state: present
  when: >
    ansible_distribution != 'Debian'
    or ansible_distribution_major_version | int < 10

I also added this to the loop to the mentioned step

    - net.ipv4.ip_forward

The rest of the changes in the PR seem to be optional.

Hat's off to @geerlingguy on this tool though, thank you! Next time I'm in Saint Louis let me buy you a beer 🍻

@dkirrane
Copy link

dkirrane commented Nov 7, 2022

I'm hitting this just now with latest from master. Trying to get a Kubernetes 1.25 cluster going
I'm using Ubuntu Server 22.04 LTS (ansible_distribution=Ubuntu ansible_distribution_major_version=22)

  - name: geerlingguy.containerd
    version: 1.3.0

  - src: https://github.com/geerlingguy/ansible-role-kubernetes
    name: geerlingguy.kubernetes
    version: master

was there an existing PR that fixes this?

@ystkfujii
Copy link

I'm using Ubuntu Server 22.04 LTS (ansible_distribution=Ubuntu ansible_distribution_major_version=22)

I faced the same problem.

@ystkfujii
Copy link

I can't find it, so I have created a PR #139 .

@piky
Copy link

piky commented Jun 26, 2023

I only had to add the following before the "Let iptables see bridged traffic." step

- name: Ensure br_netfilter is enabled.
  modprobe:
    name: br_netfilter
    state: present
  when: >
    ansible_distribution != 'Debian'
    or ansible_distribution_major_version | int < 10

I also added this to the loop to the mentioned step

    - net.ipv4.ip_forward

The rest of the changes in the PR seem to be optional.

Hat's off to @geerlingguy on this tool though, thank you! Next time I'm in Saint Louis let me buy you a beer 🍻

It works like a charm!
Any PR with this solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
8 participants