geerlingguy / drupal-vm

A VM for Drupal development
https://www.drupalvm.com/
MIT License
1.37k stars 645 forks source link

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

Open geerlingguy opened 4 years ago

geerlingguy commented 4 years ago

Issue Type

Your Environment

Docker Hub Build Environment

Your OS

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 commented 4 years ago

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

Xaraxia commented 4 years ago

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.

samdoran commented 4 years ago

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

stale[bot] commented 3 years ago

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.

geerlingguy commented 3 years ago

This ain't stale, partner.

stale[bot] commented 3 years ago

This issue is no longer marked for closure.

geerlingguy commented 3 years ago

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 commented 3 years ago

Still failing.

geerlingguy commented 3 years ago

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 commented 3 years ago

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).

korzh-nick commented 2 years ago

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