Skip to content
New issue

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

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

Already on GitHub? # to your account

Converting docker compose file does not append necessary .network to network names #90

Closed
puresick opened this issue Jun 29, 2024 · 4 comments · Fixed by #108
Closed
Labels
bug Something isn't working
Milestone

Comments

@puresick
Copy link

puresick commented Jun 29, 2024

Hey 👋

After setting up Penpot with its official docker compose file I wanted to add Quadlet systemd units to keep its containers restarted after a server reboot.

Using Podlet I converted the compose file, which resulted in the postgres and redis container to fail starting properly. systemctl --user status penpot-redis.service gave the following error (it was similar for penpot-postgres.service:

Failed to start penpot-redis.service.                                                                                    
penpot-redis.service: Scheduled restart job, restart counter is at 5.                                                    
penpot-redis.service: Start request repeated too quickly.                                                                
penpot-redis.service: Failed with result 'exit-code'.                                                                    
Failed to start penpot-redis.service.

Unfortunately journalctl -xe did not show any more detail on this error.

While trying to understand this and fiddling around with a simple quadlet file setting up redis, I notices that adding Network=penpot was causing the same issue on the test quadlet file.
Researching a bit lead me to the clue to append .networkto that line resulting in Network=penpot.network, which solved the issue.

I assume this might be something getting lost in the convertion process?

Please let me know if any more details will help solving this issue.

System Info:

  • Fedora 40
  • Podman 5.1.1
  • Podlet 0.3.0
@eKristensen
Copy link

I've just had the same issue just now.

@eKristensen
Copy link

You get more details in journalctl from root

@bishtawi
Copy link

bishtawi commented Aug 8, 2024

I ran into this problem as well. It looks like a regression as it used to properly append .network to network names. See #48

Hopefully this can be fixed but in the meantime, here is a bash script to fixup your generated quadlets:

for file in ./*.container; do
    sed -i 's/^Network=.*/&.network/' "${file}"
done

EDIT:
Did a little bit of diving through the git history to see if I could identify when the regression happened and see if I can quickly fix it. Turned out it happened as part of the big refactor done in #73
If you look at file src/cli/container/quadlet.rs and search for ".network" (including the quotes) you can see that entire file was heavily refactored and an unfortunate side effect was that this bug got introduced. I dont know this code base at all so I can't quickly fix it but hopefully someone with an understanding of the code can easily address it.

Perhaps @k9withabone can fix it?

@k9withabone
Copy link
Member

Oops, my bad. I'll fix it for the next release.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants