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: calculate machine socket path for linux #3070

Merged
merged 1 commit into from Jul 5, 2023

Conversation

afbjorklund
Copy link
Contributor

@afbjorklund afbjorklund commented Jun 30, 2023

What does this PR do?

Preparing for being able to use podman machine also on Linux, by avoiding hardcoding only mac/win

Screenshot/screencast of this PR

What issues does this PR fix or reference?

How to test this PR?

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
@afbjorklund afbjorklund requested review from a team and benoitf as code owners June 30, 2023 11:03
@afbjorklund afbjorklund requested review from jeffmaury and cdrage and removed request for a team June 30, 2023 11:03
@cdrage
Copy link
Contributor

cdrage commented Jul 4, 2023

Hey @afbjorklund thanks for the PR. Can you let me know the testing steps?

Got a bit confused when making the remote virtual machine 🤣 if you don't mind, then I can review it further.

@afbjorklund
Copy link
Contributor Author

afbjorklund commented Jul 5, 2023

It is part of an epic, so I don't think you can test it properly without more features

But you can run podman-remote machine start and see where the local socket ends up ?

Podman Desktop is still hard-coding the local socket location, when running on Linux.


Note that podman will use ssh: rather than unix: by default, so the system connections won't "help".

Name                         URI                                                            Identity                                                                              Default
lima-podman                  unix:///home/anders/.lima/podman/sock/podman.sock                                                                                                    false
podman-machine-default       ssh://core@127.0.0.1:45689/run/user/1000/podman/podman.sock    /home/anders/.ssh/podman-machine-default                                              false
podman-machine-default-root  ssh://root@127.0.0.1:45689/run/podman/podman.sock              /home/anders/.ssh/podman-machine-default                                              false

But the tunnel is still created, under /home/anders/.local/share/containers/podman/machine/qemu/podman.sock

anders     56939  0.0  0.1 1387260 16736 pts/1   Sl+  07:56   0:00 /usr/libexec/podman/gvproxy -listen-qemu unix:///run/user/1000/podman/qmp_podman-machine-default.sock -pid-file /run/user/1000/podman/podman-machine-default_proxy.pid -ssh-port 45689 -forward-sock /home/anders/.local/share/containers/podman/machine/qemu/podman.sock -forward-dest /run/user/1000/podman/podman.sock -forward-user core -forward-identity /home/anders/.ssh/podman-machine-default

@afbjorklund
Copy link
Contributor Author

Got a bit confused when making the remote virtual machine 🤣

Podman is supposed to create the (QEMU) virtual machine for you

Copy link
Collaborator

@benoitf benoitf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for now on Linux we don't monitor the machines, so it's kind of dead code for now

@benoitf benoitf merged commit 0255774 into containers:main Jul 5, 2023
8 checks passed
@podman-desktop-bot podman-desktop-bot added this to the 1.2.0 milestone Jul 5, 2023
@afbjorklund
Copy link
Contributor Author

It makes the actual enabling smaller, once the feature has been figured out.

i.e. how to toggle between multiple podman sockets, on the same desktop

  • rootless vs. rootful

  • engine vs. machine

@benoitf
Copy link
Collaborator

benoitf commented Jul 5, 2023

sure, no problem. I prefer small PRs

benoitf added a commit to benoitf/desktop that referenced this pull request Jul 5, 2023
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
benoitf added a commit that referenced this pull request Jul 5, 2023
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
mairin pushed a commit to mairin/podman-desktop that referenced this pull request Jul 7, 2023
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
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.

None yet

4 participants