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

podman run chokes on --memory-swap=-1 #5091

Closed
s-winter opened this issue Feb 5, 2020 · 1 comment · Fixed by #5098
Closed

podman run chokes on --memory-swap=-1 #5091

s-winter opened this issue Feb 5, 2020 · 1 comment · Fixed by #5098
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.

Comments

@s-winter
Copy link

s-winter commented Feb 5, 2020

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

/kind bug

Description

I am trying to use podman as a docker replacement in a project, where we make use of docker's memory accounting functions. For docker, I can specify --memory-swap=-1 to allow unlimited swap up to the amount available on the host. According to the podman-run man page, the behavior should be identical for podman, but I get an error "invalid value for memory-swap: invalid size: '-1'".

Steps to reproduce the issue:

podman run -it --rm --memory=500m --memory-swap=-1 docker.io/library/ubuntu

Describe the results you received:

Trying to pull docker.io/library/ubuntu...
Getting image source signatures
Copying blob 5c939e3a4d10 done
Copying blob 651c9d2d6c4f done
Copying blob c63719cdbe7a done
Copying blob 19a861ea6baf done
Copying config ccc6e87d48 done
Writing manifest to image destination
Storing signatures
Error: invalid value for memory-swap: invalid size: '-1'

Describe the results you expected:

Instead of the last line that indicates an error, an interactive session in an Ubuntu 16.04 container with constrained memory and unlimited swap space (to the host limit) should be started.

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

Version:            1.7.0
RemoteAPI Version:  1
Go Version:         go1.10.1
OS/Arch:            linux/amd64

Output of podman info --debug:

debug:                                                                                                                                                                          
  compiler: gc                                                                                                                                                                  
  git commit: ""                                                                                                                                                                
  go version: go1.10.1                                                                                                                                                          
  podman version: 1.7.0                                                                                                                                                         
host:                                                                                                                                                                           
  BuildahVersion: 1.12.0                                                                                                                                                        
  CgroupVersion: v2                                                                                                                                                             
  Conmon:                                                                                                                                                                       
    package: 'conmon: /usr/libexec/podman/conmon'                                                                                                                               
    path: /usr/libexec/podman/conmon                                                                                                                                            
    version: 'conmon version 2.0.10, commit: unknown'                                                                                                                           
  Distribution:                                                                                                                                                                 
    distribution: ubuntu                                                                                                                                                        
    version: "18.04"                                                                                                                                                            
  IDMappings:                                                                                                                                                                   
    gidmap:                                                                                                                                                                     
    - container_id: 0                                                                                                                                                           
      host_id: 1011                                                                                                                                                             
      size: 1                                                                                                                                                                   
    - container_id: 1                                                                                                                                                           
      host_id: 231072                                                                                                                                                           
      size: 65536                                                                                                                                                               
    uidmap:                                                                                                                                                                     
    - container_id: 0                                                                                                                                                           
      host_id: 1000
       size: 1
    - container_id: 1
      host_id: 231072
      size: 65536
  MemFree: 133157486592
  MemTotal: 134959104000
  OCIRuntime:
    name: crun
    package: Unknown
    path: /usr/local/bin/crun
    version: |-
      crun version 0.12.2-4380
      commit: 4380e87b08659c1b092993e741c0234f3b2757bb
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  SwapFree: 0
  SwapTotal: 0
  arch: amd64
  cpus: 48
  eventlogger: file
  hostname: <...>
  kernel: 4.15.0-76-generic
  os: linux
  rootless: true
  uptime: 1h 50m 27.34s (Approximately 0.04 days)
registries:
  search:
  - docker.io
  - quay.io
store:
  ConfigFile: /<home_directory>/.config/containers/storage.conf
  ContainerStore:
    number: 0
  GraphDriverName: vfs
  GraphOptions: {}
  GraphRoot: /<home_directory>/.local/share/containers/storage
  GraphStatus: {}
  ImageStore:
    number: 16
  RunRoot: /run/user/1000/containers
  VolumePath: /<home_directory>/.local/share/containers/storage/volumes

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

podman/unknown,now 1.7.0~6 amd64 [installed]

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

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 5, 2020
@mheon
Copy link
Member

mheon commented Feb 5, 2020

Hmmm. We might be specifying this as an unsigned integer, when we shouldn't be.

@rhatdan rhatdan self-assigned this Feb 5, 2020
@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 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants