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

Make the default directory to write quadlets configurable #219

Open
axel7083 opened this issue Jan 27, 2025 · 5 comments · May be fixed by #223
Open

Make the default directory to write quadlets configurable #219

axel7083 opened this issue Jan 27, 2025 · 5 comments · May be fixed by #223
Assignees
Labels
enhancement New feature or request

Comments

@axel7083
Copy link
Contributor

axel7083 commented Jan 27, 2025

Description

A very big problem may occur if you play with multiple machines locally.

By default (in version 0.7.0 and bellow) the podman quadlet extension uses the following directories to write quadlets.

ℹ since admin is not supported, we should only consider ~/.config/containers/systemd/

if (options.admin) {
destination = joinposix('/etc/containers/systemd/', resource.filename);
} else {
destination = joinposix('~/.config/containers/systemd/', resource.filename);
}

But this directory is problematic. It is shared between machines! (At least on WSL)

Reproduce

  1. assert two machine running
    Image
  2. create a quadlet using the Generate quadlets
  3. refresh
  4. assert it is duplicated
    Image

Solution proposal

Change the directory to something else.

Supported path are the following

  • /etc/containers/systemd/users/
@axel7083 axel7083 self-assigned this Jan 27, 2025
@axel7083 axel7083 added this to the 0.8.0 milestone Jan 27, 2025
@axel7083 axel7083 added the bug Something isn't working label Jan 27, 2025
@axel7083
Copy link
Contributor Author

A very big problem may occur if you play with multiple machines locally.
By default (in version 0.7.0 and bellow) the podman quadlet extension uses the following directories to write quadlets.

Technically not true , the duplicate issue was caused by #221

Still, would be nice to allow the user to configure which directory he wants to use.

@axel7083 axel7083 linked a pull request Jan 27, 2025 that will close this issue
@axel7083 axel7083 added enhancement New feature or request and removed bug Something isn't working labels Jan 27, 2025
@bjoli
Copy link

bjoli commented Feb 11, 2025

How well could something like this cooperate with sshfs and a podman remote connection? I wonder since something like 90% of my podman usage is on headless server in another room.

@axel7083
Copy link
Contributor Author

axel7083 commented Feb 12, 2025

How well could something like this cooperate with sshfs and a podman remote connection? I wonder since something like 90% of my podman usage is on headless server in another room.

@bjoli the extension is using podman --connection=<connection> ssh <command> to write/read on the podman machine. So it may works?

You probably would have to test yourself, and see if you encounter any error. If you do, please share you feedback! (Here is a link explaining how to collects logs https://podman-desktop.io/docs/troubleshooting/access-logs)

@bjoli
Copy link

bjoli commented Feb 13, 2025

@bjoli the extension is using podman --connection=<connection> ssh <command> to write/read on the podman machine. So it may works?

You probably would have to test yourself, and see if you encounter any error. If you do, please share you feedback! (Here is a link explaining how to collects logs https://podman-desktop.io/docs/troubleshooting/access-logs)

Thank you for the reply. I will definitely test it! So far I have found the podman remote host functionality a lot more pleasant to use than cockpit, and I am looking forward to trying it out more.

Sorry to invade the issue. It piqued my curiosity and I couldn't stop myself.

@axel7083
Copy link
Contributor Author

Sorry to invade the issue. It piqued my curiosity and I couldn't get myself.

Don't hesitate! Always curious to learn more about how people are using those tools!

@axel7083 axel7083 removed this from the 0.8.0 milestone Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants