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

pod create --uts doesn't work on podman-remote #14847

Closed
sstosh opened this issue Jul 7, 2022 · 1 comment · Fixed by #14852
Closed

pod create --uts doesn't work on podman-remote #14847

sstosh opened this issue Jul 7, 2022 · 1 comment · Fixed by #14852
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. remote Problem is in podman-remote

Comments

@sstosh
Copy link
Contributor

sstosh commented Jul 7, 2022

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

podman pod create --uts doesn't work on remote environment.
.InfraConfig.uts_ns field sets private even if --uts ns:<ns path>.

Steps to reproduce the issue:

  1. Create the new pod with --uts ns:<ns path>
# podman-remote pod create --uts ns:/proc/self/ns/ --name utsPod --share uts
30254e9b42870e7f010132006927ccc23aebe5ec93d4871716d67d83394d1e0f
  1. Inspect the created pod
# podman-remote pod inspect utsPod
{
     "Id": "30254e9b42870e7f010132006927ccc23aebe5ec93d4871716d67d83394d1e0f",
     "Name": "utsPod",
     "Created": "2022-07-07T11:40:30.510136186+09:00",
     "CreateCommand": [
          "podman-remote",
          "pod",
          "create",
          "--uts",
          "ns:/proc/self/ns/",
          "--name",
          "utsPod",
          "--share",
          "uts"
     ],
     "ExitPolicy": "continue",
     "State": "Created",
     "Hostname": "",
     "CreateCgroup": true,
     "CgroupParent": "machine.slice",
     "CgroupPath": "machine.slice/machine-libpod_pod_30254e9b42870e7f010132006927ccc23aebe5ec93d4871716d67d83394d1e0f.slice",
     "CreateInfra": true,
     "InfraContainerID": "23d86d0e2d31ef9fd72a46292c968beac2aedca12f88f5db503fdc23e6b85ea3",
     "InfraConfig": {
          "PortBindings": {

          },
          "HostNetwork": false,
          "StaticIP": "",
          "StaticMAC": "",
          "NoManageResolvConf": false,
          "DNSServer": null,
          "DNSSearch": null,
          "DNSOption": null,
          "NoManageHosts": false,
          "HostAdd": null,
          "Networks": [
               "podman"
          ],
          "NetworkOptions": null,
          "pid_ns": "private",
          "userns": "host",
          "uts_ns": "private"
     },
     "SharedNamespaces": [
          "uts"
     ],
     "NumContainers": 1,
     "Containers": [
          {
               "Id": "23d86d0e2d31ef9fd72a46292c968beac2aedca12f88f5db503fdc23e6b85ea3",
               "Name": "30254e9b4287-infra",
               "State": "created"
          }
     ]
}

Describe the results you received:
see above.

Describe the results you expected:
.InfraConfig.uts_ns field sets ns:<ns path> like non remote environment.

# podman pod create --uts ns:/proc/self/ns/ --name utsPod --share uts
5ffdfe1ee60bda46cca156317d099ecac3432e8f2aab3a52c9af35f6365a4799
# podman pod inspect utsPod
{
     "Id": "5ffdfe1ee60bda46cca156317d099ecac3432e8f2aab3a52c9af35f6365a4799",
     "Name": "utsPod",
     "Created": "2022-07-07T11:50:25.904827432+09:00",
     "CreateCommand": [
          "podman",
          "pod",
          "create",
          "--uts",
          "ns:/proc/self/ns/",
          "--name",
          "utsPod",
          "--share",
          "uts"
     ],
     "ExitPolicy": "continue",
     "State": "Created",
     "Hostname": "",
     "CreateCgroup": true,
     "CgroupParent": "machine.slice",
     "CgroupPath": "machine.slice/machine-libpod_pod_5ffdfe1ee60bda46cca156317d099ecac3432e8f2aab3a52c9af35f6365a4799.slice",
     "CreateInfra": true,
     "InfraContainerID": "c23d6ad4419e12218b9d04fb84ba8c703541cf5c9641d96fc49940c4468315b5",
     "InfraConfig": {
          "PortBindings": {

          },
          "HostNetwork": false,
          "StaticIP": "",
          "StaticMAC": "",
          "NoManageResolvConf": false,
          "DNSServer": null,
          "DNSSearch": null,
          "DNSOption": null,
          "NoManageHosts": false,
          "HostAdd": null,
          "Networks": [
               "podman"
          ],
          "NetworkOptions": null,
          "pid_ns": "private",
          "userns": "host",
          "uts_ns": "ns:/proc/self/ns/"
     },
     "SharedNamespaces": [
          "uts"
     ],
     "NumContainers": 1,
     "Containers": [
          {
               "Id": "c23d6ad4419e12218b9d04fb84ba8c703541cf5c9641d96fc49940c4468315b5",
               "Name": "5ffdfe1ee60b-infra",
               "State": "created"
          }
     ]
}

Output of podman version:

# podman-remote version
Client:       Podman Engine
Version:      4.2.0-dev
API Version:  4.2.0-dev
Go Version:   go1.16.15
Git Commit:   13070dc186d4083aa2b4f55781cd79ea6d577022
Built:        Thu Jul  7 11:36:01 2022
OS/Arch:      linux/amd64

Server:       Podman Engine
Version:      4.2.0-dev
API Version:  4.2.0-dev
Go Version:   go1.16.15
Git Commit:   13070dc186d4083aa2b4f55781cd79ea6d577022
Built:        Thu Jul  7 11:35:52 2022
OS/Arch:      linux/amd64

Output of podman info --debug:

# podman-remote info --debug
host:
  arch: amd64
  buildahVersion: 1.27.0-dev
  cgroupControllers:
  - cpuset
  - cpu
  - io
  - memory
  - hugetlb
  - pids
  - misc
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.0-2.fc35.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.0, commit: '
  cpuUtilization:
    idlePercent: 99.97
    systemPercent: 0.01
    userPercent: 0.02
  cpus: 24
  distribution:
    distribution: fedora
    variant: server
    version: "35"
  eventLogger: journald
  hostname: fedora35
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.18.5-100.fc35.x86_64
  linkmode: dynamic
  logDriver: journald
  memFree: 3282690048
  memTotal: 8323661824
  networkBackend: netavark
  ociRuntime:
    name: crun
    package: crun-1.4.5-1.fc35.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.4.5
      commit: c381048530aa750495cf502ddb7181f2ded5b400
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: unix:///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: true
  serviceIsRemote: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.12-2.fc35.x86_64
    version: |-
      slirp4netns version 1.1.12
      commit: 7a104a101aa3278a2152351a082a6df71f57c9a3
      libslirp: 4.6.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.3
  swapFree: 8323592192
  swapTotal: 8323592192
  uptime: 169h 17m 10.00s (Approximately 7.04 days)
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 6
    paused: 0
    running: 5
    stopped: 1
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphRootAllocated: 107363696640
  graphRootUsed: 18957684736
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 4
  runRoot: /run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 4.2.0-dev
  Built: 1657161352
  BuiltTime: Thu Jul  7 11:35:52 2022
  GitCommit: 13070dc186d4083aa2b4f55781cd79ea6d577022
  GoVersion: go1.16.15
  Os: linux
  OsArch: linux/amd64
  Version: 4.2.0-dev

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):
Fedora 35, KVM

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 7, 2022
@github-actions github-actions bot added the remote Problem is in podman-remote label Jul 7, 2022
@Luap99
Copy link
Member

Luap99 commented Jul 7, 2022

@cdoern PTAL

cdoern added a commit to cdoern/podman that referenced this issue Jul 7, 2022
somehow, containers#14501 got through CI even though the remote tests fail. The testa are failing
due to the PodSpecGenerator not containing the UTSNs entitiy and infra's spec is not yet allowed to be accessed remotely

[NO NEW TESTS NEEDED]

resolves containers#14847

Signed-off-by: Charlie Doern <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. remote Problem is in podman-remote
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants