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

Create volume with podman_quadlet, but the service can't start. #118

Closed
Aquilamason opened this issue Jan 11, 2024 · 3 comments
Closed

Create volume with podman_quadlet, but the service can't start. #118

Aquilamason opened this issue Jan 11, 2024 · 3 comments

Comments

@Aquilamason
Copy link

I used such a volume file to create a volume for the promtail container:

podman_quadlet_specs:
  - file_src: "promtail-data.volume"
  - template_src: "promtail.container.j2"

The contents of the promtail-data.volume file are only:
[Volume]

But when I run the ansible play, the following error is reported:

TASK [ansible-role-podman : Start service] *****************************************************************************************************************
fatal: [my-hostname]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"daemon_reexec": false,
"daemon_reload": false,
"enabled": null,
"force": null,
"masked": null,
"name": "promtail-data.volume",
"no_block": false,
"scope": "system",
"state": "started"
}
},
"msg": "Could not find the requested service promtail-data.volume: host"
}

After looking at the following code for the podman task codes, I see that the value of __podman_service_name is automatically suffixed with .volume.
podman/tasks/handle_quadlet_spec.yml

  else __podman_quadlet_name ~ '.volume'

But according to the podman-systemd documentation, the Volume unit automatically creates service name with the -volume.service suffix.
I added "activate_systemd_unit: false" to quadlet_specs to skip the play to start the service, but I think the code should be changed to:
else __podman_quadlet_name ~ '-volume'

Right?

@richm
Copy link
Contributor

richm commented Jan 11, 2024

What is your control node platform? ansible version? managed node platform?

@richm
Copy link
Contributor

richm commented Jan 11, 2024

@Aquilamason can you try #119?

@richm
Copy link
Contributor

richm commented Jan 16, 2024

#119 merged

@richm richm closed this as completed Jan 16, 2024
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

No branches or pull requests

2 participants