drupal-vm icon indicating copy to clipboard operation
drupal-vm copied to clipboard

Remove Docker support? Builds fail with 'Service is in unknown state'

Open geerlingguy opened this issue 5 years ago • 11 comments
trafficstars

Issue Type

  • Bug Report

Your Environment

Docker Hub Build Environment

Your OS

  • Linux

Full console output

TASK [geerlingguy.postfix : Ensure postfix is started and enabled at boot.] ****
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Service is in unknown state", "status": {}}

Summary

4grm52

Well, at least for the past day or so.

geerlingguy avatar Sep 30 '20 03:09 geerlingguy

This seems potentially related: https://github.com/ansible/ansible/issues/71528

geerlingguy avatar Sep 30 '20 04:09 geerlingguy

https://molecule.readthedocs.io/en/latest/examples.html -> have a look at the config here. I was getting the same error, trying to test a role that incorporated your PHP role, but following the example resolved the problem.

Xaraxia avatar Sep 30 '20 23:09 Xaraxia

I made a workaround for this systemd issue in https://github.com/ansible/ansible/pull/72337.

samdoran avatar Oct 27 '20 21:10 samdoran

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[bot] avatar Jan 26 '21 00:01 stale[bot]

This ain't stale, partner.

geerlingguy avatar Feb 14 '21 02:02 geerlingguy

This issue is no longer marked for closure.

stale[bot] avatar Feb 14 '21 02:02 stale[bot]

Well the build on Docker Hub is currently failing because the Debian 10 image build is currently failing due to a new dep on Rust in the Python cryptography package: https://github.com/pyca/cryptography/issues/5771

Fun.

Workaround is to force-upgrade Pip from the system package version, so YOLO I guess.

geerlingguy avatar Feb 14 '21 02:02 geerlingguy

Still failing.

geerlingguy avatar Feb 14 '21 03:02 geerlingguy

At least the error is reproducible locally:

#9 34.06 TASK [geerlingguy.postfix : Ensure postfix is started and enabled at boot.] ****
#9 34.30 fatal: [localhost]: FAILED! => {"changed": false, "msg": "Service is in unknown state", "status": {}}

geerlingguy avatar Feb 14 '21 04:02 geerlingguy

Yeah.... so it seems this is just not gonna be a fun thing to fix and keep fixed.

I'm pretty sure the best step forward is to drop the Docker integration at this point, especially in light of https://github.com/geerlingguy/drupal-vm/issues/2164

Even if I drop out postfix, apache (or any other service) does the same thing:

#9 50.50 TASK [geerlingguy.apache : Ensure Apache has selected state and enabled on boot.] ***
#9 50.50 task path: /etc/ansible/drupal-vm/provisioning/roles/geerlingguy.apache/tasks/main.yml:43
#9 50.51 Running ansible.legacy.systemd
#9 50.51 <localhost> ESTABLISH LOCAL CONNECTION FOR USER: root
#9 50.51 <localhost> EXEC /bin/sh -c 'echo ~root && sleep 0'
#9 50.52 <localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1622233260.067946-2572-42097397009909 `" && echo ansible-tmp-1622233260.067946-2572-42097397009909="` echo /root/.ansible/tmp/ansible-tmp-1622233260.067946-2572-42097397009909 `" ) && sleep 0'
#9 50.53 Using module file /usr/local/lib/python3.8/dist-packages/ansible/modules/systemd.py
#9 50.53 <localhost> PUT /root/.ansible/tmp/ansible-local-762rksjqa/tmp_2shnsm7 TO /root/.ansible/tmp/ansible-tmp-1622233260.067946-2572-42097397009909/AnsiballZ_systemd.py
#9 50.53 <localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1622233260.067946-2572-42097397009909/ /root/.ansible/tmp/ansible-tmp-1622233260.067946-2572-42097397009909/AnsiballZ_systemd.py && sleep 0'
#9 50.54 <localhost> EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1622233260.067946-2572-42097397009909/AnsiballZ_systemd.py && sleep 0'
#9 50.75 <localhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1622233260.067946-2572-42097397009909/ > /dev/null 2>&1 && sleep 0'
#9 50.76 fatal: [localhost]: FAILED! => {
#9 50.76     "changed": false,
#9 50.76     "invocation": {
#9 50.76         "module_args": {
#9 50.76             "daemon_reexec": false,
#9 50.76             "daemon_reload": false,
#9 50.76             "enabled": true,
#9 50.76             "force": null,
#9 50.76             "masked": null,
#9 50.76             "name": "apache2",
#9 50.76             "no_block": false,
#9 50.76             "scope": "system",
#9 50.76             "state": "started"
#9 50.76         }
#9 50.76     },
#9 50.76     "msg": "Service is in unknown state",
#9 50.76     "status": {}
#9 50.76 }

And it's not worth debugging the service module and systemd to try to see what's happening and why/when it started happening (at least not in this case).

geerlingguy avatar May 28 '21 20:05 geerlingguy

You can not remove docker, but replace it with podman https://github.com/korzh-nick/drupal-vm/tree/podman

korzh-nick avatar Jun 30 '22 14:06 korzh-nick