Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add condition to execute socket services #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

btravouillon
Copy link

When listen_address is not defined (default), the drop-in files are not created. Make sure the role will not try to manage the non-existing services.

Without this change, the role fails with the error below when none of libvirt_host_tcp_listen_address or libvirt_host_tls_listen_address are defined:

RUNNING HANDLER [stackhpc.libvirt-host : start libvirtd sockets] *****************************************
failed: [labnode] (item=libvirtd-tcp.socket) => {"ansible_loop_var": "item", "changed": false, "item": {"enabled": false, "listen_address": null, "service": "libvirtd-tcp.socket"}, "msg": "Could not find the requested service libvirtd-tcp.socket: host"}
failed: [labnode] (item=libvirtd-tls.socket) => {"ansible_loop_var": "item", "changed": false, "item": {"enabled": false, "listen_address": null, "service": "libvirtd-tls.socket"}, "msg": "Could not find the requested service libvirtd-tls.socket: host"}

@btravouillon btravouillon requested a review from a team as a code owner September 14, 2022 20:32
@btravouillon btravouillon marked this pull request as draft September 14, 2022 21:01
When listen_address is not defined (default), the drop-in files are not
created. Make sure the role will not try to manage the non-existing
services.
@btravouillon btravouillon marked this pull request as ready for review September 14, 2022 22:22
@markgoddard
Copy link

Hi @btravouillon, thanks for the patch. I think the code is working as expected - it should be possible to start the units without a listen address.

Perhaps for some reason on your system you don't have the libvirt socket systemd units? I think that would give the error above, which would be avoided by creating drop-in units, and therefore defining the socket services.

What OS are you using?

@btravouillon
Copy link
Author

What OS are you using?

This is Ubuntu 18.04. Indeed the socket systemd units do not exist. I should check 20.04 or 22.04.

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

Successfully merging this pull request may close these issues.

2 participants