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

verifyWSLUserModeCompat returns error for unprivileged user in some cases #21428

Open
g0ddest opened this issue Jan 30, 2024 · 1 comment
Open
Labels
kind/bug Categorizes issue or PR as related to a bug. machine remote Problem is in podman-remote stale-issue

Comments

@g0ddest
Copy link

g0ddest commented Jan 30, 2024

Issue Description

Basic issue is when I call podman machine set --user-mode-networking=true I got error:

user-mode networking requires a newer version of WSL: apply all outstanding windows updates, and then run `wsl --update`

I have installed and updated wsl by another privileged user and work from unprivileged one, but apparently it has error on wsl --version
This bug is described here: microsoft/WSL#10693
As I found IsWSLInstalled method from wutil.go calls only wsl --version: https://github.com/containers/podman/blob/7ed4478c087303b58c082188088a03e2c533d796/pkg/machine/wsl/wutil/wutil.go#L51C1-L51C42

Anyway another commands are running well, so I suggest to make another call after that to verify if it really have no issues with that, for instance wsl --status if first one (wsl --info) had returned an error.

Steps to reproduce the issue

Steps to reproduce the issue

  1. have installed podman by privileged user
  2. log in as unprivileged user
  3. run podman machine set --user-mode-networking=true for instance

Describe the results you received

Error:

user-mode networking requires a newer version of WSL: apply all outstanding windows updates, and then run `wsl --update`

Describe the results you expected

I expect podman to work because I have last wsl version and supported windows version

podman info output

podman info
host:
  arch: amd64
  buildahVersion: 1.30.0
  cgroupControllers:
  - cpuset
  - cpu
  - cpuacct
  - blkio
  - memory
  - devices
  - freezer
  - net_cls
  - perf_event
  - net_prio
  - hugetlb
  - pids
  - rdma
  cgroupManager: cgroupfs
  cgroupVersion: v1
  conmon:
    package: conmon-2.1.7-2.fc37.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.7, commit: '
  cpuUtilization:
    idlePercent: 98.68
    systemPercent: 0.9
    userPercent: 0.41
  cpus: 8
  databaseBackend: boltdb
  distribution:
    distribution: fedora
    variant: container
    version: "37"
  eventLogger: journald
  hostname: LT00010478
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.10.16.3-microsoft-standard-WSL2
  linkmode: dynamic
  logDriver: journald
  memFree: 26400591872
  memTotal: 26686771200
  networkBackend: netavark
  networkBackendInfo:
    backend: ""
    dns: {}
  ociRuntime:
    name: crun
    package: crun-1.8.5-1.fc37.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.8.5
      commit: b6f80f766c9a89eb7b1440c0a70ab287434b17ed
      rundir: /run/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: ""
    package: ""
    version: ""
  remoteSocket:
    exists: true
    path: /run/podman/podman.sock
  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: false
  serviceIsRemote: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.0-8.fc37.x86_64
    version: |-
      slirp4netns version 1.2.0
      commit: 656041d45cfca7a4176f6b7eed9e4fe6c11e8383
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.3
  swapFree: 7516192768
  swapTotal: 7516192768
  uptime: 0h 0m 10.00s
  variant: ""
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: 21
    paused: 0
    running: 0
    stopped: 21
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphRootAllocated: 269490393088
  graphRootUsed: 13012611072
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 22
  runRoot: /run/containers/storage
  transientStore: false
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 4.5.0
  Built: 1681486976
  BuiltTime: Fri Apr 14 18:42:56 2023
  GitCommit: ""
  GoVersion: go1.19.7
  Os: linux
  OsArch: linux/amd64
  Version: 4.5.0

Podman in a container

Yes

Privileged Or Rootless

Rootless

Upstream Latest Release

Yes

Additional environment details

wsl --version

WSL version: 2.0.14.0
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19044.3324

Windows version: Microsoft Windows [Version 10.0.19044.3324]

Additional information

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

@g0ddest g0ddest added the kind/bug Categorizes issue or PR as related to a bug. label Jan 30, 2024
@github-actions github-actions bot added the remote Problem is in podman-remote label Jan 30, 2024
@Luap99 Luap99 added the machine label Feb 9, 2024
Copy link

A friendly reminder that this issue had no activity for 30 days.

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 remote Problem is in podman-remote stale-issue
Projects
None yet
Development

No branches or pull requests

2 participants