-
Notifications
You must be signed in to change notification settings - Fork 24.1k
Closed
Labels
P3Priority 3 - Approved, No Time LimitationPriority 3 - Approved, No Time Limitationaffects_2.9This issue/PR affects Ansible v2.9This issue/PR affects Ansible v2.9bugThis issue/PR relates to a bug.This issue/PR relates to a bug.has_prThis issue has an associated PR.This issue has an associated PR.moduleThis issue/PR relates to a module.This issue/PR relates to a module.python3support:coreThis issue/PR relates to code supported by the Ansible Engineering Team.This issue/PR relates to code supported by the Ansible Engineering Team.systemSystem categorySystem category
Description
SUMMARY
Services in containers on Fedora 32 report Service is in unknown state
when trying to set state: started
.
ISSUE TYPE
- Bug Report
COMPONENT NAME
systemd
ANSIBLE VERSION
ansible 2.9.12
CONFIGURATION
# empty
OS / ENVIRONMENT
Controller node: Fedora 32, just updated.
Managed node: any, tried Fedora 32 and CentOS 8.
STEPS TO REPRODUCE
git pull git@github.com:robertdebock/ansible-role-cron.git
cd ansible-role-cron
molecule test
EXPECTED RESULTS
These roles work in CI, but locally they started to fail after an update in Fedora 32.
ACTUAL RESULTS
TASK [ansible-role-cron : start and enable cron] *******************************
task path: /home/robertdb/Documents/github.com/robertdebock/ansible-role-cron/tasks/main.yml:11
<cron-fedora-latest> ESTABLISH DOCKER CONNECTION FOR USER: root
<cron-fedora-latest> EXEC ['/usr/bin/docker', b'exec', b'-i', 'cron-fedora-latest', '/bin/sh', '-c', "/bin/sh -c 'echo ~ && sleep 0'"]
<cron-fedora-latest> EXEC ['/usr/bin/docker', b'exec', b'-i', 'cron-fedora-latest', '/bin/sh', '-c', '/bin/sh -c \'( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1598856497.3296921-33825-64280145917305 `" && echo ansible-tmp-1598856497.3296921-33825-64280145917305="` echo /root/.ansible/tmp/ansible-tmp-1598856497.3296921-33825-64280145917305 `" ) && sleep 0\'']
Using module file /usr/local/lib/python3.8/site-packages/ansible/modules/system/systemd.py
<cron-fedora-latest> PUT /home/robertdb/.ansible/tmp/ansible-local-33264yxghir5p/tmpkf4ljd28 TO /root/.ansible/tmp/ansible-tmp-1598856497.3296921-33825-64280145917305/AnsiballZ_systemd.py
<cron-fedora-latest> EXEC ['/usr/bin/docker', b'exec', b'-i', 'cron-fedora-latest', '/bin/sh', '-c', "/bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1598856497.3296921-33825-64280145917305/ /root/.ansible/tmp/ansible-tmp-1598856497.3296921-33825-64280145917305/AnsiballZ_systemd.py && sleep 0'"]
<cron-fedora-latest> EXEC ['/usr/bin/docker', b'exec', b'-i', 'cron-fedora-latest', '/bin/sh', '-c', '/bin/sh -c \'sudo -H -S -n -u root /bin/sh -c \'"\'"\'echo BECOME-SUCCESS-gzfmcazwwmgyqzdcbkzycmrtuzycfngw ; /usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1598856497.3296921-33825-64280145917305/AnsiballZ_systemd.py\'"\'"\' && sleep 0\'']
<cron-fedora-latest> EXEC ['/usr/bin/docker', b'exec', b'-i', 'cron-fedora-latest', '/bin/sh', '-c', "/bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1598856497.3296921-33825-64280145917305/ > /dev/null 2>&1 && sleep 0'"]
fatal: [cron-fedora-latest]: FAILED! => changed=false
invocation:
module_args:
daemon_reexec: false
daemon_reload: false
enabled: true
force: null
masked: null
name: crond
no_block: false
scope: null
state: started
user: null
msg: Service is in unknown state
status: {}
Manually checking and starting works:
[root@cron-fedora-latest /]# systemctl status crond
● crond.service - Command Scheduler
Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled)
Active: inactive (dead)
[root@cron-fedora-latest /]# systemctl start crond
[root@cron-fedora-latest /]# systemctl status crond
● crond.service - Command Scheduler
Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2020-08-31 06:48:54 UTC; 1s ago
Main PID: 621 (crond)
Tasks: 1 (limit: 2769)
Memory: 1.0M
CGroup: /system.slice/docker-a1708d7b8309b9472a0bb8ef1d389ff1fd4ca36af32f86fbb4da5da5ab788d48.scope/system.slice/crond.service
└─621 /usr/sbin/crond -n
Aug 31 06:48:54 cron-fedora-latest systemd[1]: Started Command Scheduler.
Aug 31 06:48:54 cron-fedora-latest crond[621]: (CRON) STARTUP (1.5.5)
Aug 31 06:48:54 cron-fedora-latest crond[621]: (CRON) INFO (Syslog will be used instead of sendmail.)
Aug 31 06:48:54 cron-fedora-latest crond[621]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 79% if used.)
Aug 31 06:48:54 cron-fedora-latest crond[621]: (CRON) INFO (running with inotify support)
I have a feeling this is related to some Fedora update, can't get my finger on the exact issue. The role works in ci.
happosade, adduc, hartwork, wi1dcard, geerlingguy and 4 more
Metadata
Metadata
Assignees
Labels
P3Priority 3 - Approved, No Time LimitationPriority 3 - Approved, No Time Limitationaffects_2.9This issue/PR affects Ansible v2.9This issue/PR affects Ansible v2.9bugThis issue/PR relates to a bug.This issue/PR relates to a bug.has_prThis issue has an associated PR.This issue has an associated PR.moduleThis issue/PR relates to a module.This issue/PR relates to a module.python3support:coreThis issue/PR relates to code supported by the Ansible Engineering Team.This issue/PR relates to code supported by the Ansible Engineering Team.systemSystem categorySystem category