Closed ldelelis closed 4 years ago
Thanks for the report! I don't have Debian installed. This code was contributed by various people. But after installing Docker image debian:buster
I'm wondering if dpkg_arch.stdout
is really needed or if it's just good enough to use ansible_kernel
variable.
Can you please provide the output of apt-cache search linux-headers- | sort
? It would also be interesting to have the output of ansbile -m setup some_debian_host
(where some_debian_host
should be a host with a Debian OS that doesn't have reached end of life (EOL) - which is basically only Buster
while Stretch
is still in the EOL LTS time frame).
Thank you for replying! Sure, here are the outputs, running from the provided Vagrantfile:
# apt-cache search linux-headers- | sort
linux-headers-4.19.0-10-all - All header files for Linux 4.19 (meta-package)
linux-headers-4.19.0-10-all-amd64 - All header files for Linux 4.19 (meta-package)
linux-headers-4.19.0-10-amd64 - Header files for Linux 4.19.0-10-amd64
linux-headers-4.19.0-10-cloud-amd64 - Header files for Linux 4.19.0-10-cloud-amd64
linux-headers-4.19.0-10-common - Common header files for Linux 4.19.0-10
linux-headers-4.19.0-10-common-rt - Common header files for Linux 4.19.0-10-rt
linux-headers-4.19.0-10-rt-amd64 - Header files for Linux 4.19.0-10-rt-amd64
linux-headers-4.19.0-6-all - All header files for Linux 4.19 (meta-package)
linux-headers-4.19.0-6-all-amd64 - All header files for Linux 4.19 (meta-package)
linux-headers-4.19.0-6-amd64 - Header files for Linux 4.19.0-6-amd64
linux-headers-4.19.0-6-cloud-amd64 - Header files for Linux 4.19.0-6-cloud-amd64
linux-headers-4.19.0-6-common - Common header files for Linux 4.19.0-6
linux-headers-4.19.0-6-common-rt - Common header files for Linux 4.19.0-6-rt
linux-headers-4.19.0-6-rt-amd64 - Header files for Linux 4.19.0-6-rt-amd64
linux-headers-4.19.0-8-all - All header files for Linux 4.19 (meta-package)
linux-headers-4.19.0-8-all-amd64 - All header files for Linux 4.19 (meta-package)
linux-headers-4.19.0-8-amd64 - Header files for Linux 4.19.0-8-amd64
linux-headers-4.19.0-8-cloud-amd64 - Header files for Linux 4.19.0-8-cloud-amd64
linux-headers-4.19.0-8-common - Common header files for Linux 4.19.0-8
linux-headers-4.19.0-8-common-rt - Common header files for Linux 4.19.0-8-rt
linux-headers-4.19.0-8-rt-amd64 - Header files for Linux 4.19.0-8-rt-amd64
linux-headers-4.19.0-9-all - All header files for Linux 4.19 (meta-package)
linux-headers-4.19.0-9-all-amd64 - All header files for Linux 4.19 (meta-package)
linux-headers-4.19.0-9-amd64 - Header files for Linux 4.19.0-9-amd64
linux-headers-4.19.0-9-cloud-amd64 - Header files for Linux 4.19.0-9-cloud-amd64
linux-headers-4.19.0-9-common - Common header files for Linux 4.19.0-9
linux-headers-4.19.0-9-common-rt - Common header files for Linux 4.19.0-9-rt
linux-headers-4.19.0-9-rt-amd64 - Header files for Linux 4.19.0-9-rt-amd64
linux-headers-5.4.0-0.bpo.2-all - All header files for Linux 5.4 (meta-package)
linux-headers-5.4.0-0.bpo.2-all-amd64 - All header files for Linux 5.4 (meta-package)
linux-headers-5.4.0-0.bpo.2-amd64 - Header files for Linux 5.4.0-0.bpo.2-amd64
linux-headers-5.4.0-0.bpo.2-cloud-amd64 - Header files for Linux 5.4.0-0.bpo.2-cloud-amd64
linux-headers-5.4.0-0.bpo.2-common - Common header files for Linux 5.4.0-0.bpo.2
linux-headers-5.4.0-0.bpo.2-common-rt - Common header files for Linux 5.4.0-0.bpo.2-rt
linux-headers-5.4.0-0.bpo.2-rt-amd64 - Header files for Linux 5.4.0-0.bpo.2-rt-amd64
linux-headers-5.4.0-0.bpo.3-all - All header files for Linux 5.4 (meta-package)
linux-headers-5.4.0-0.bpo.3-all-amd64 - All header files for Linux 5.4 (meta-package)
linux-headers-5.4.0-0.bpo.3-amd64 - Header files for Linux 5.4.0-0.bpo.3-amd64
linux-headers-5.4.0-0.bpo.3-cloud-amd64 - Header files for Linux 5.4.0-0.bpo.3-cloud-amd64
linux-headers-5.4.0-0.bpo.3-common - Common header files for Linux 5.4.0-0.bpo.3
linux-headers-5.4.0-0.bpo.3-common-rt - Common header files for Linux 5.4.0-0.bpo.3-rt
linux-headers-5.4.0-0.bpo.3-rt-amd64 - Header files for Linux 5.4.0-0.bpo.3-rt-amd64
linux-headers-5.4.0-0.bpo.4-all - All header files for Linux 5.4 (meta-package)
linux-headers-5.4.0-0.bpo.4-all-amd64 - All header files for Linux 5.4 (meta-package)
linux-headers-5.4.0-0.bpo.4-amd64 - Header files for Linux 5.4.0-0.bpo.4-amd64
linux-headers-5.4.0-0.bpo.4-cloud-amd64 - Header files for Linux 5.4.0-0.bpo.4-cloud-amd64
linux-headers-5.4.0-0.bpo.4-common - Common header files for Linux 5.4.0-0.bpo.4
linux-headers-5.4.0-0.bpo.4-common-rt - Common header files for Linux 5.4.0-0.bpo.4-rt
linux-headers-5.4.0-0.bpo.4-rt-amd64 - Header files for Linux 5.4.0-0.bpo.4-rt-amd64
linux-headers-5.5.0-0.bpo.2-all - All header files for Linux 5.5 (meta-package)
linux-headers-5.5.0-0.bpo.2-all-amd64 - All header files for Linux 5.5 (meta-package)
linux-headers-5.5.0-0.bpo.2-amd64 - Header files for Linux 5.5.0-0.bpo.2-amd64
linux-headers-5.5.0-0.bpo.2-cloud-amd64 - Header files for Linux 5.5.0-0.bpo.2-cloud-amd64
linux-headers-5.5.0-0.bpo.2-common - Common header files for Linux 5.5.0-0.bpo.2
linux-headers-5.6.0-0.bpo.2-amd64 - Header files for Linux 5.6.0-0.bpo.2-amd64
linux-headers-5.6.0-0.bpo.2-cloud-amd64 - Header files for Linux 5.6.0-0.bpo.2-cloud-amd64
linux-headers-5.6.0-0.bpo.2-common - Common header files for Linux 5.6.0-0.bpo.2
linux-headers-5.6.0-0.bpo.2-common-rt - Common header files for Linux 5.6.0-0.bpo.2-rt
linux-headers-5.6.0-0.bpo.2-rt-amd64 - Header files for Linux 5.6.0-0.bpo.2-rt-amd64
linux-headers-5.7.0-0.bpo.2-amd64 - Header files for Linux 5.7.0-0.bpo.2-amd64
linux-headers-5.7.0-0.bpo.2-cloud-amd64 - Header files for Linux 5.7.0-0.bpo.2-cloud-amd64
linux-headers-5.7.0-0.bpo.2-common - Common header files for Linux 5.7.0-0.bpo.2
linux-headers-amd64 - Header files for Linux amd64 configuration (meta-package)
linux-headers-cloud-amd64 - Header files for Linux cloud-amd64 configuration (meta-package)
linux-headers-rt-amd64 - Header files for Linux rt-amd64 configuration (meta-package)
Ansible setup: http://linkode.org/#04HQbTCJVAu5kz5mP2Sqy7 (using an external pastebin since output is ~400 lines long)
I'm waiting until https://github.com/githubixx/ansible-role-wireguard/pull/67 can be merged. I'll prepare a PR afterwards. @ldelelis Is it possible to for you to test the change by checking out the branch I'll prepare? That would be helpful.
Sure! Just let me know when the changeset is ready and I'll run the same tests
I also faced this issue and propose #77 to fix it.
Or we just reboot the server when it does not run the latest kernel. What do you think :) ?
(I don’t think we should do that. It is not even needed to reboot for this.)
Ref: https://github.com/b-m-f/Wirt/blob/master/ansible/tasks/wireguard.yml
The host I'm trying to target currently runs kernel 4.19.0-9-amd64, which is one patch (is this the correct name?) version behind the current release (4.19.0-10). As it's not a
-cloud-
tagged kernel, the debian-vanilla tasks attempt to fetchlinux-headers-amd64
, which pulls headers from a version outside my current kernel.This makes wireguard's
modprobe
step fail, as it can't find the module for 4.19.0-9. Upgrading the kernel is not an option at the momentI can provide execution logs if necessary, just let me know.
Steps to reproduce
I managed to make this reproducible via Vagrant:
Workaround diff
I managed to make the role work on my use case by applying the following diff. However, I do not know the consequences this change could have on other environments: