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

Add parameter for when podman driver is running remote #12577

Open
afbjorklund opened this issue Sep 25, 2021 · 4 comments
Open

Add parameter for when podman driver is running remote #12577

afbjorklund opened this issue Sep 25, 2021 · 4 comments
Labels
co/docker-driver Issues related to kubernetes in container co/podman-driver podman driver issues kind/improvement Categorizes issue or PR as related to improving upon a current feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@afbjorklund
Copy link
Collaborator

afbjorklund commented Sep 25, 2021

Currently the remote flag of podman is hardcoded, to always disabled on Linux (and always enabled on Mac and Win)

We should make it a driver boolean, so that it is possible to test podman machine also on regular developer machines.

Sadly, podman requires a flag --remote or even a special binary podman-remote. Otherwise it will still run locally...

On other platforms, this flag is "always on" and the binary has been renamed/replaced. So this makes Linux "special"


Note: for the Docker driver, remote is always true. You can't run docker locally, you always need a dockerd running.

Hopefully the Podman behaviour will be fixed* in version 4.0, but minikube still needs to support Podman version 3 as well.

* see containers/podman#11196

Needed for: Issue #8003

@afbjorklund
Copy link
Collaborator Author

afbjorklund commented Sep 25, 2021

Currently this is intermixed with rootless, so might need to be fixed in cooperation with #12460 (for #8719)

        // Quickly returns an error code if service is not running
        cmd := exec.CommandContext(ctx, oci.Podman, "version", "--format", "{{.Server.Version}}")
        // Run with sudo on linux (local), otherwise podman-remote (as podman)
        if runtime.GOOS == "linux" {
                cmd = exec.CommandContext(ctx, "sudo", "-k", "-n", oci.Podman, "version", "--format", "{{.Version}}")
                cmd.Env = append(os.Environ(), "LANG=C", "LC_ALL=C") // sudo is localized
        }

So this affects both PrefixCmd and OCIBinary. Preferrably these should be a class, instead of a string ?

  • Binary
  • Rootless
  • Remote
Binary root local user local root remote user remote
Docker docker docker docker docker
Podman sudo -n podman podman podman --remote podman --remote

EDIT: Also breaks with --cgroup-manager

        if ociBin == Podman && runtime.GOOS == "linux" {
                args = append(args, "--cgroup-manager", "cgroupfs")
        }

@afbjorklund afbjorklund added co/podman-driver podman driver issues co/docker-driver Issues related to kubernetes in container kind/feature Categorizes issue or PR as related to a new feature. kind/improvement Categorizes issue or PR as related to improving upon a current feature. and removed kind/feature Categorizes issue or PR as related to a new feature. labels Sep 25, 2021
@afbjorklund
Copy link
Collaborator Author

afbjorklund commented Sep 25, 2021

When running remote, "rootless" is not so important to the command (it will never use sudo anyway).

But it should be possible, to query the engine if it is running as root or as user (it is in the info output)

"rootless"

"rootless: true"

docker root

 Security Options:
  apparmor
  seccomp
   Profile: default

docker rootless

 Security Options:
  seccomp
   Profile: default
  rootless

podman root

  remoteSocket:
    exists: true
    path: /run/podman/podman.sock
  rootless: false

podman rootless

  remoteSocket:
    exists: true
    path: /run/user/1000/podman/podman.sock
  rootless: true

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 25, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 24, 2022
@spowelljr spowelljr added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/docker-driver Issues related to kubernetes in container co/podman-driver podman driver issues kind/improvement Categorizes issue or PR as related to improving upon a current feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

No branches or pull requests

4 participants