Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

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

Open
geerlingguy opened this issue Sep 30, 2020 · 11 comments
Open

Comments

@geerlingguy
Copy link
Owner

geerlingguy commented Sep 30, 2020

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 geerlingguy changed the title Drupal VM Docker image builds failing with postfix error Drupal VM Docker image builds failing with postfix 'Service is in unknown state' Sep 30, 2020
@geerlingguy
Copy link
Owner Author

This seems potentially related: ansible/ansible#71528

@Xaraxia
Copy link

Xaraxia commented Sep 30, 2020

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
Copy link

I made a workaround for this systemd issue in ansible/ansible#72337.

@stale
Copy link

stale bot commented Jan 26, 2021

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 stale bot added the stale label Jan 26, 2021
@geerlingguy
Copy link
Owner Author

This ain't stale, partner.

@stale
Copy link

stale bot commented Feb 14, 2021

This issue is no longer marked for closure.

@stale stale bot removed the stale label Feb 14, 2021
@geerlingguy
Copy link
Owner Author

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: pyca/cryptography#5771

Fun.

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

@geerlingguy
Copy link
Owner Author

Still failing.

@geerlingguy
Copy link
Owner Author

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
Copy link
Owner Author

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 #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 geerlingguy changed the title Drupal VM Docker image builds failing with postfix 'Service is in unknown state' Remove Docker support? Builds fail with 'Service is in unknown state' May 28, 2021
@korzh-nick
Copy link

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

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

No branches or pull requests

4 participants