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

Attempted Ubuntu 20.04 - systemd 245 - Warning #517

Closed
hungrymonkey opened this issue May 23, 2020 · 11 comments
Closed

Attempted Ubuntu 20.04 - systemd 245 - Warning #517

hungrymonkey opened this issue May 23, 2020 · 11 comments
Labels

Comments

@hungrymonkey
Copy link
Contributor

Hi Everyone,

I am posting this issue as a warning. You have to update to ansible 2.9.8+ for any distro with systemd 245+ which includes Ubuntu 20.04, Fedora 32, etc.

ansible/ansible@bd4fdb1

TASK [matrix-common-after : Populate service facts] ****************************************************************************************************************************
fatal: [matrix.domain.com]: FAILED! => {"changed": false, "msg": "Malformed output discovered from systemd list-unit-files: accounts-daemon.service                        enabled         enabled      "}
@hungrymonkey
Copy link
Contributor Author

hungrymonkey commented May 23, 2020

Should I document the issue?

@hungrymonkey
Copy link
Contributor Author

@pushytoxin
Copy link
Contributor

Ubuntu ships a broken Ansible, but the bug isn't reported yet, the priority is to have it fixed upstream:
https://bugs.launchpad.net/ubuntu/+source/ansible

Depending on how long it will take to get the maintainer to update Ansible to v2.9.8 or above, it could be a good idea to document this issue, especially since more and more people will opt for running 20.04LTS, all of them will run into this bug.

@pushytoxin
Copy link
Contributor

I opened the issue on launchpad, here's the link
https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1880359

If you have an ubuntu one account, you can mark yourself as affected.

@hungrymonkey
Copy link
Contributor Author

hungrymonkey commented May 24, 2020

@pushytoxin This bug affects everyone who attempts to talk to a systemd 245+ distro. Ubuntu 20.04 might be a good start but it will affect everyone.

@pushytoxin
Copy link
Contributor

pushytoxin commented May 24, 2020

Know of any other distros that ship systemd=245 together with ansible<2.9.7? Fedora is unaffected, and neither is debian (except buster-backports)
Just checked SUSE, unaffected.

@pushytoxin
Copy link
Contributor

pushytoxin commented May 24, 2020

Sorry, I just realized what you said. So this also affects people who use an older version of ansible to connect to a remote host with a newer systemd. I only ever used ansible on a localhost connection.
In that case there should definitely be a note on this.

spantaleev added a commit that referenced this issue May 24, 2020
Using the older one likely leads to issues like #517.
@spantaleev
Copy link
Owner

Indeed! This bug only affects people running outdated Ansible against a server with newish systemd (so far that's Archlinux and Ubuntu 20.04, it seems).

Since Ansible has been fixed and there's been a new release since a long time ago, the proper solution seems to be to get it updated.

Ubuntu is just very slow to do this. I remember a similar issue affecting us a few years back, where Ubuntu developers would just not update Ansible for months.


A good workaround is to Use Ansible via Docker.

Not sure if that would work with ansible_connection=local though.


We may also update roles/matrix-common-after/tasks/start.yml to apply our workaround (not using service_facts) on other distros.

Seems like always using the workaround is a potential solution, but it's kind of ugly (very long output). It may be better to apply it for people who ask for it (perhaps --extra-vars="avoid_service_facts=yes")

@ghost
Copy link

ghost commented Aug 22, 2020

you can just work around this issue by using the python3 version of ansible.

pip3 install ansible

@kgtzy
Copy link

kgtzy commented Oct 14, 2020

this issue was solved by ansible/ansible@bd4fdb1#diff-5fe2fdf32cea9df92893b26b933806b6ff6193d72e0774387459e2b7789f9189

worked for me on ubuntu 20.04 ansible 2.9
hope it helps

@spantaleev
Copy link
Owner

I've added some notes about this via 3fd198e

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

No branches or pull requests

5 participants