Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1832625

Summary: service_facts breaks on fedora32 because list-unit-files returns 3 columns
Product: [Fedora] Fedora Reporter: Pavel Cahyna <pcahyna>
Component: ansibleAssignee: Kevin Fenzi <kevin>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 32CC: a.badger, dominik, kevin, maxim
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: ansible-2.9.9-1.fc32 ansible-2.9.9-1.el8 ansible-2.9.9-1.el7 ansible-2.9.9-1.fc31 ansible-2.9.9-1.fc30 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-18 02:43:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pavel Cahyna 2020-05-06 23:23:55 UTC
Description of problem:

The service_facts module started breaking on Fedora 32 (and other distros having recent systemd, apparently systemd 245 is the culprit). 

Version-Release number of selected component (if applicable):

2.9.7-1.fc32

How reproducible:

easily

Steps to Reproduce:
1. ansible -m service_facts localhost

Actual results:

localhost | FAILED! => {
    "changed": false,
    "msg": "Malformed output discovered from systemd list-unit-files: arp-ethers.service                         disabled        disabled     "
}

Expected results:

localhost | SUCCESS => {
    "ansible_facts": {
        "services": {
            "ModemManager.service": {
                "name": "ModemManager.service",
                "source": "systemd",
                "state": "running",
                "status": "enabled"
            },
...
        }
    },
    "changed": false
}

Additional info:

The problem occurs when a sufficiently new distro is managed via ansible as a managed host. Therefore it is preferable to backport the fix even to older versions (f31, EPEL) that are not problematic themselves, so that they can serve as control nodes for newer managed hosts.

Comment 2 Dominik 'Rathann' Mierzejewski 2020-05-08 13:59:31 UTC
FWIW, the upstream patch from https://github.com/ansible/ansible/commit/bd4fdb1ca23fb043789042074f3f9fa4fb07fbf1 fixes this for me on a F31 control machine managing a F32 host.

Comment 3 Pavel Cahyna 2020-05-12 21:25:17 UTC
rebase to 2.9.9 should solve it as well (bz1834582)

Comment 4 Fedora Update System 2020-05-13 19:04:11 UTC
FEDORA-2020-2778ab5a3d has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-2778ab5a3d

Comment 5 Fedora Update System 2020-05-13 19:04:12 UTC
FEDORA-2020-6c970e08e6 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-6c970e08e6

Comment 6 Fedora Update System 2020-05-13 19:04:13 UTC
FEDORA-2020-b65c1c1b9a has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-b65c1c1b9a

Comment 7 Fedora Update System 2020-05-13 19:04:13 UTC
FEDORA-EPEL-2020-638f7f8bc5 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-638f7f8bc5

Comment 8 Fedora Update System 2020-05-14 04:31:50 UTC
FEDORA-2020-b65c1c1b9a has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-b65c1c1b9a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-b65c1c1b9a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2020-05-14 06:07:19 UTC
FEDORA-2020-6c970e08e6 has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-6c970e08e6`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-6c970e08e6

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2020-05-14 07:25:28 UTC
FEDORA-2020-2778ab5a3d has been pushed to the Fedora 30 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-2778ab5a3d`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-2778ab5a3d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2020-05-14 09:32:34 UTC
FEDORA-EPEL-2020-ec7fdde33d has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-ec7fdde33d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2020-05-14 09:59:40 UTC
FEDORA-EPEL-2020-638f7f8bc5 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-638f7f8bc5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2020-05-18 02:43:57 UTC
FEDORA-2020-b65c1c1b9a has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2020-05-19 05:20:34 UTC
FEDORA-EPEL-2020-638f7f8bc5 has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2020-05-19 05:25:54 UTC
FEDORA-EPEL-2020-ec7fdde33d has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Fedora Update System 2020-05-22 03:19:17 UTC
FEDORA-2020-6c970e08e6 has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 17 Fedora Update System 2020-05-22 04:21:46 UTC
FEDORA-2020-2778ab5a3d has been pushed to the Fedora 30 stable repository.
If problem still persists, please make note of it in this bug report.