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

docker REST API: ignore TmpfsOptions #10831

Closed
gdesmott opened this issue Jul 1, 2021 · 4 comments · Fixed by #11334
Closed

docker REST API: ignore TmpfsOptions #10831

gdesmott opened this issue Jul 1, 2021 · 4 comments · Fixed by #11334
Assignees
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. 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.

Comments

@gdesmott
Copy link

gdesmott commented Jul 1, 2021

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

/kind bug

Description

When creating a container using the Docker REST API with a tmpfs mount the TmpfsOptions argument is ignored, resulting in a mount with the default value and mode.

Steps to reproduce the issue:

$ curl --unix-socket /var/run/user/$UID/podman/podman.sock \
  --header "Content-Type: application/json" \
  --request POST \
  --data '{"Image":"docker.io/nginx","HostConfig":{"Mounts":[{"Target":"/dev/badger","Type":"tmpfs","TmpfsOptions":{"SizeBytes":100,"Mode":0}}]}}' \
  http://localhost/containers/create?name=badger 

$ podman start badger
$ podman container exec badger df -h /dev/badger
Filesystem      Size  Used Avail Use% Mounted on
tmpfs            16G     0   16G   0% /dev/badger
$ podman container exec badger ls -ld /dev/badger
drwxrwxrwt. 2 root root 40 Jul  1 09:56 /dev/badger

Describe the results you expected:

The mount size should be 100 and its mode 0 as when using dockerd.

Output of podman version:

podman version 3.2.1

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.21.0
  cgroupControllers: []
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.27-2.fc34.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.27, commit: '
  cpus: 8
  distribution:
    distribution: fedora
    version: "34"
  eventLogger: journald
  hostname: cass-t14
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 5.12.13-300.fc34.x86_64
  linkmode: dynamic
  memFree: 1190326272
  memTotal: 33274310656
  ociRuntime:
    name: crun
    package: crun-0.20.1-1.fc34.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.20.1
      commit: 0d42f1109fd73548f44b01b3e84d04a279e99d2e
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/user/1000/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: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.9-1.fc34.x86_64
    version: |-
      slirp4netns version 1.1.8+dev
      commit: 6dc0186e020232ae1a6fcc1f7afbc3ea02fd3876
      libslirp: 4.4.0
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.0
  swapFree: 25295839232
  swapTotal: 25295839232
  uptime: 22h 42m 59.94s (Approximately 0.92 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /var/home/cassidy/.config/containers/storage.conf
  containerStore:
    number: 67
    paused: 0
    running: 2
    stopped: 65
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-1.5.0-1.fc34.x86_64
      Version: |-
        fusermount3 version: 3.10.4
        fuse-overlayfs: version 1.5
        FUSE library version 3.10.4
        using FUSE kernel interface version 7.31
  graphRoot: /var/home/cassidy/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 107
  runRoot: /run/user/1000/containers
  volumePath: /var/home/cassidy/.local/share/containers/storage/volumes
version:
  APIVersion: 3.2.1
  Built: 1623697949
  BuiltTime: Mon Jun 14 21:12:29 2021
  GitCommit: ""
  GoVersion: go1.16.3
  OsArch: linux/amd64
  Version: 3.2.1

Package info (e.g. output of rpm -q podman or apt list podman):

 podman-3:3.2.1-1.fc34.x86_64

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

Didn't test with 3.2.2.

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

Running Fedora Silverblue.

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 1, 2021
@rhatdan rhatdan added the Good First Issue This issue would be a good issue for a first time contributor to undertake. label Jul 1, 2021
@rhatdan
Copy link
Member

rhatdan commented Jul 1, 2021

@jwhonce @Luap99 PTAL

@jwhonce jwhonce self-assigned this Jul 2, 2021
@jwhonce jwhonce added In Progress This issue is actively being worked by the assignee, please do not work on this at this time. and removed Good First Issue This issue would be a good issue for a first time contributor to undertake. labels Jul 2, 2021
@github-actions
Copy link

github-actions bot commented Aug 2, 2021

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

@Luap99
Copy link
Member

Luap99 commented Aug 2, 2021

@jwhonce You added the In Progress label, did you ever worked on this?

@jwhonce
Copy link
Member

jwhonce commented Aug 2, 2021

@Luap99 Code written. Writing tests now. /cc @rhatdan

jwhonce added a commit to jwhonce/podman that referenced this issue Aug 26, 2021
When creating containers the specialized mount options where not
populated via the API.

Fixes: containers#10831
Signed-off-by: Jhon Honce <jhonce@redhat.com>
jwhonce added a commit to jwhonce/podman that referenced this issue Aug 27, 2021
When creating containers the specialized mount options where not
populated via the API.

Fixes: containers#10831
Signed-off-by: Jhon Honce <jhonce@redhat.com>
jwhonce added a commit to jwhonce/podman that referenced this issue Aug 27, 2021
When creating containers the specialized mount options where not
populated via the API.

Fixes: containers#10831
Signed-off-by: Jhon Honce <jhonce@redhat.com>
@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 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants