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

Some arguments are case sensitive, others are not #11387

Closed
0b11stan opened this issue Sep 1, 2021 · 4 comments · Fixed by #11405
Closed

Some arguments are case sensitive, others are not #11387

0b11stan opened this issue Sep 1, 2021 · 4 comments · Fixed by #11405
Assignees
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@0b11stan
Copy link

0b11stan commented Sep 1, 2021

/kind bug

Description

There is a case problem in argument's interpretations. Some are case sensitive and others are not, I saw it on the --systemd arg (the --tty arg, for exemple, is not case sensitive) but it may be elsewhere. It's very simple to avoid (obviously just change de case on the command line) and it seems like a very obvious bug but I could not find an existing issue on this topic or the troubleshooting, sorry if it's a double.

Steps to reproduce the issue:

This one fails:

podman run --systemd=True docker.io/debian echo 'ok'

When this one is successfull:

podman run --systemd=true docker.io/debian echo 'ok'

Describe the results you received:

Command fails with the following error. Also, the pod is not created.

Error: chdir: No such file or directory: OCI runtime attempted to invoke a command that was not found

Describe the results you expected:

I expected the pod to be created.

Output of podman version:

Version:      3.3.0
API Version:  3.3.0
Go Version:   go1.17
Git Commit:   98f252a3a1a8f1ee00f9f96c6ba00500954b5093-dirty
Built:        Sat Aug 21 13:48:18 2021
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.22.3
  cgroupControllers: []
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: /usr/bin/conmon is owned by conmon 1:2.0.29-1
    path: /usr/bin/conmon
    version: 'conmon version 2.0.29, commit: 7e6de6678f6ed8a18661e1d5721b81ccee293b9b'
  cpus: 8
  distribution:
    distribution: arch
    version: unknown
  eventLogger: journald
  hostname: kropotkin
  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.13.13-arch1-1
  linkmode: dynamic
  memFree: 11874074624
  memTotal: 16620335104
  ociRuntime:
    name: crun
    package: /usr/bin/crun is owned by crun 0.21-1
    path: /usr/bin/crun
    version: |-
      crun version 0.21
      commit: c4c3cdf2ce408ed44a9e027c618473e6485c635b
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  remoteSocket:
    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: /etc/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: /usr/bin/slirp4netns is owned by slirp4netns 1.1.12-1
    version: |-
      slirp4netns version 1.1.12
      commit: 7a104a101aa3278a2152351a082a6df71f57c9a3
      libslirp: 4.6.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.1
  swapFree: 4294963200
  swapTotal: 4294963200
  uptime: 3h 45m 17.2s (Approximately 0.12 days)
registries: {}
store:
  configFile: /home/tristan/.config/containers/storage.conf
  containerStore:
    number: 31
    paused: 0
    running: 0
    stopped: 31
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/tristan/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 50
  runRoot: /run/user/1000/containers
  volumePath: /home/tristan/.local/share/containers/storage/volumes
version:
  APIVersion: 3.3.0
  Built: 1629546498
  BuiltTime: Sat Aug 21 13:48:18 2021
  GitCommit: 98f252a3a1a8f1ee00f9f96c6ba00500954b5093-dirty
  GoVersion: go1.17
  OsArch: linux/amd64
  Version: 3.3.0

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

> pacman -Q --info podman
Name            : podman
Version         : 3.3.0-1
Description     : Tool and library for running OCI-based containers in pods
Architecture    : x86_64
URL             : https://github.com/containers/podman
Licenses        : Apache
Groups          : None
Provides        : None
Depends On      : cni-plugins  conmon  containers-common  device-mapper  iptables  libseccomp  crun  slirp4netns  libsystemd  fuse-overlayfs  libgpgme.so=11-64
Optional Deps   : podman-docker: for Docker-compatible CLI
                  btrfs-progs: support btrfs backend devices [installed]
                  catatonit: --init flag support
                  crun: support for unified cgroupsv2 [installed]
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 71.69 MiB
Packager        : Morten Linderud <[email protected]>
Build Date      : Sat 21 Aug 2021 01:48:18 PM CEST
Install Date    : Sat 28 Aug 2021 03:54:37 PM CEST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?

Yes

@Luap99
Copy link
Member

Luap99 commented Sep 1, 2021

The boolean options accept both because this how the cli framework handles it. The --systemd option accepts a string value so podman has to parse it. --systemd is not a boolean because it accepts true,false and always. I guess the easy fix would be to run strings.ToLower() on the argument.

@mheon
Copy link
Member

mheon commented Sep 1, 2021

@0b11stan Are there any other flags you've noticed which also have this behavior? They should all be one-line fixes, we just need to know which ones aren't working properly.

@rhatdan
Copy link
Member

rhatdan commented Sep 1, 2021

--systemd should definitely get the strings.ToLower() fix.

@0b11stan
Copy link
Author

0b11stan commented Sep 2, 2021

Hey, great, that will be an easy fix. No for the moment I do not know of an other option with this behaviour. I tried a few of them but I'm quite new with podman.
I'll keep an eye open when using other arguments though.

@Luap99 Luap99 self-assigned this Sep 2, 2021
Luap99 added a commit to Luap99/libpod that referenced this issue Sep 2, 2021
Since boolean flags accept `True` and `False` the systemd flag should do
this as well.

Fixes containers#11387

Signed-off-by: Paul Holzinger <[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 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
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