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

Two podman machines can be run at the same time on macos #25112

Closed
cbr7 opened this issue Jan 24, 2025 · 0 comments · Fixed by #25139
Closed

Two podman machines can be run at the same time on macos #25112

cbr7 opened this issue Jan 24, 2025 · 0 comments · Fixed by #25139
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. machine macos MacOS (OSX) related remote Problem is in podman-remote

Comments

@cbr7
Copy link

cbr7 commented Jan 24, 2025

Issue Description

It seems that currently it's possible to two two podman machines running at the same time on macos if the machines are of different types (e.g. one applehv and one libkrun), normally podman does not support running multiple podman machines simultaneously on macos.

Image

podman version
Client: Podman Engine
Version: 5.3.2
API Version: 5.3.2
Go Version: go1.23.5
Git Commit: 85043bb
Built: Wed Jan 22 14:42:02 2025
OS/Arch: darwin/arm64

Server: Podman Engine
Version: 5.3.2
API Version: 5.3.2
Go Version: go1.23.4
Built: Wed Jan 22 01:00:00 2025
OS/Arch: linux/arm64

Steps to reproduce the issue

  1. Install podman 5.3.2 version on macos.
  2. Create a podman machine of type applehv and start it.
  3. Reconfigure podman to create libkrun podman machine.
  4. Create a second podman machine of type libkrun with a different name from machine from step 2 and start it also.
  5. Notice that no error is thrown and both machines are operational at the same time.

Describe the results you received

Both podman machines are operations and in running state.

Describe the results you expected

Only one podman machine should be in running state at any one moment.

podman info output

podman info
host:
  arch: arm64
  buildahVersion: 1.38.1
  cgroupControllers:
  - cpuset
  - cpu
  - io
  - memory
  - pids
  - rdma
  - misc
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.12-3.fc41.aarch64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.12, commit: '
  cpuUtilization:
    idlePercent: 99.81
    systemPercent: 0.1
    userPercent: 0.09
  cpus: 6
  databaseBackend: sqlite
  distribution:
    distribution: fedora
    variant: coreos
    version: "41"
  eventLogger: journald
  freeLocks: 2048
  hostname: localhost.localdomain
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 6.12.7-200.fc41.aarch64
  linkmode: dynamic
  logDriver: journald
  memFree: 3290648576
  memTotal: 3791691776
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.13.1-1.fc41.aarch64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.13.1
    package: netavark-1.13.1-1.fc41.aarch64
    path: /usr/libexec/podman/netavark
    version: netavark 1.13.1
  ociRuntime:
    name: crun
    package: crun-1.19.1-1.fc41.aarch64
    path: /usr/bin/crun
    version: |-
      crun version 1.19.1
      commit: 3e32a70c93f5aa5fea69b50256cca7fd4aa23c80
      rundir: /run/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-0^20241211.g09478d5-1.fc41.aarch64
    version: |
      pasta 0^20241211.g09478d5-1.fc41.aarch64-pasta
      Copyright Red Hat
      GNU General Public License, version 2 or later
        <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    exists: true
    path: unix:///run/podman/podman.sock
  rootlessNetworkCmd: pasta
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: false
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.3.1-1.fc41.aarch64
    version: |-
      slirp4netns version 1.3.1
      commit: e5e368c4f5db6ae75c2fce786e31eef9da6bf236
      libslirp: 4.8.0
      SLIRP_CONFIG_VERSION_MAX: 5
      libseccomp: 2.5.5
  swapFree: 0
  swapTotal: 0
  uptime: 0h 28m 10.00s
  variant: v8
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /usr/share/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.imagestore: /usr/lib/containers/storage
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphRootAllocated: 98899800064
  graphRootUsed: 4063305728
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Supports shifting: "true"
    Supports volatile: "true"
    Using metacopy: "true"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 0
  runRoot: /run/containers/storage
  transientStore: false
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 5.3.2
  Built: 1737504000
  BuiltTime: Wed Jan 22 01:00:00 2025
  GitCommit: ""
  GoVersion: go1.23.4
  Os: linux
  OsArch: linux/arm64
  Version: 5.3.2

Podman in a container

No

Privileged Or Rootless

Privileged

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting

@cbr7 cbr7 added the kind/bug Categorizes issue or PR as related to a bug. label Jan 24, 2025
@github-actions github-actions bot added macos MacOS (OSX) related remote Problem is in podman-remote labels Jan 24, 2025
@Luap99 Luap99 added the machine label Jan 24, 2025
@baude baude self-assigned this Jan 24, 2025
baude added a commit to baude/podman that referenced this issue Jan 27, 2025
As issue containers#25112 points out, it was possible to start a machine on one of the darwin providers and then switch providers and start another one with a different name.  This PR firstly prevents that use which is a forbidden use case.

Secondarily, performed some minor cleanup on the error messages being used so that the error would be specific to this condition.

This bug fix is for darwin only.  In the case of Windows, we probably need to answer the question I raised in containers#24067 first, which is whether we want to stop allowing WSL to run multiple machines.

Fixes containers#25112

Signed-off-by: Brent Baude <[email protected]>
baude added a commit to baude/podman that referenced this issue Jan 27, 2025
As issue containers#25112 points out, it was possible to start a machine on one of the darwin providers and then switch providers and start another one with a different name.  This PR firstly prevents that use which is a forbidden use case.

Secondarily, performed some minor cleanup on the error messages being used so that the error would be specific to this condition.

This bug fix is for darwin only.  In the case of Windows, we probably need to answer the question I raised in containers#24067 first, which is whether we want to stop allowing WSL to run multiple machines.

Fixes containers#25112

Signed-off-by: Brent Baude <[email protected]>
baude added a commit to baude/podman that referenced this issue Jan 28, 2025
As issue containers#25112 points out, it was possible to start a machine on one of the darwin providers and then switch providers and start another one with a different name.  This PR firstly prevents that use which is a forbidden use case.

Secondarily, performed some minor cleanup on the error messages being used so that the error would be specific to this condition.

This bug fix is for darwin only.  In the case of Windows, we probably need to answer the question I raised in containers#24067 first, which is whether we want to stop allowing WSL to run multiple machines.

Fixes containers#25112

Signed-off-by: Brent Baude <[email protected]>
baude added a commit to baude/podman that referenced this issue Jan 28, 2025
As issue containers#25112 points out, it was possible to start a machine on one of the darwin providers and then switch providers and start another one with a different name.  This PR firstly prevents that use which is a forbidden use case.

Secondarily, performed some minor cleanup on the error messages being used so that the error would be specific to this condition.

This bug fix is for darwin only.  In the case of Windows, we probably need to answer the question I raised in containers#24067 first, which is whether we want to stop allowing WSL to run multiple machines.

Fixes containers#25112

Signed-off-by: Brent Baude <[email protected]>
baude added a commit to baude/podman that referenced this issue Jan 28, 2025
As issue containers#25112 points out, it was possible to start a machine on one of the darwin providers and then switch providers and start another one with a different name.  This PR firstly prevents that use which is a forbidden use case.

Secondarily, performed some minor cleanup on the error messages being used so that the error would be specific to this condition.

This bug fix is for darwin only.  In the case of Windows, we probably need to answer the question I raised in containers#24067 first, which is whether we want to stop allowing WSL to run multiple machines.

Fixes containers#25112

Signed-off-by: Brent Baude <[email protected]>
baude added a commit to baude/podman that referenced this issue Jan 28, 2025
As issue containers#25112 points out, it was possible to start a machine on one of the darwin providers and then switch providers and start another one with a different name.  This PR firstly prevents that use which is a forbidden use case.

Secondarily, performed some minor cleanup on the error messages being used so that the error would be specific to this condition.

This bug fix is for darwin only.  In the case of Windows, we probably need to answer the question I raised in containers#24067 first, which is whether we want to stop allowing WSL to run multiple machines.

Fixes containers#25112

Signed-off-by: Brent Baude <[email protected]>
baude added a commit to baude/podman that referenced this issue Jan 28, 2025
As issue containers#25112 points out, it was possible to start a machine on one of the darwin providers and then switch providers and start another one with a different name.  This PR firstly prevents that use which is a forbidden use case.

Secondarily, performed some minor cleanup on the error messages being used so that the error would be specific to this condition.

This bug fix is for darwin only.  In the case of Windows, we probably need to answer the question I raised in containers#24067 first, which is whether we want to stop allowing WSL to run multiple machines.

Fixes containers#25112

Signed-off-by: Brent Baude <[email protected]>
baude added a commit to baude/podman that referenced this issue Jan 28, 2025
As issue containers#25112 points out, it was possible to start a machine on one of the darwin providers and then switch providers and start another one with a different name.  This PR firstly prevents that use which is a forbidden use case.

Secondarily, performed some minor cleanup on the error messages being used so that the error would be specific to this condition.

This bug fix is for darwin only.  In the case of Windows, we probably need to answer the question I raised in containers#24067 first, which is whether we want to stop allowing WSL to run multiple machines.

Fixes containers#25112

Signed-off-by: Brent Baude <[email protected]>
baude added a commit to baude/podman that referenced this issue Jan 29, 2025
As issue containers#25112 points out, it was possible to start a machine on one of the darwin providers and then switch providers and start another one with a different name.  This PR firstly prevents that use which is a forbidden use case.

Secondarily, performed some minor cleanup on the error messages being used so that the error would be specific to this condition.

This bug fix is for darwin only.  In the case of Windows, we probably need to answer the question I raised in containers#24067 first, which is whether we want to stop allowing WSL to run multiple machines.

Fixes containers#25112

Signed-off-by: Brent Baude <[email protected]>
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/podman that referenced this issue Jan 30, 2025
As issue containers#25112 points out, it was possible to start a machine on one of the darwin providers and then switch providers and start another one with a different name.  This PR firstly prevents that use which is a forbidden use case.

Secondarily, performed some minor cleanup on the error messages being used so that the error would be specific to this condition.

This bug fix is for darwin only.  In the case of Windows, we probably need to answer the question I raised in containers#24067 first, which is whether we want to stop allowing WSL to run multiple machines.

Fixes containers#25112

Signed-off-by: Brent Baude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. machine macos MacOS (OSX) related remote Problem is in podman-remote
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants