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

'--restart on-failure' parameter seems to cause '--name' and --entrypoint' to be ignored?! #7878

Closed
srcshelton opened this issue Oct 1, 2020 · 2 comments · Fixed by #7895
Assignees
Labels
Good First Issue This issue would be a good issue for a first time contributor to undertake. 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

@srcshelton
Copy link
Contributor

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

/kind bug

Description

This one seems really odd, and I've just removed and re-added every argument to podman to confirm, but it seems that if --restart on-failure (or --restart=on-failure - I've not tried the other --restart options) is specified then (at least) --name and --entrypoint (and any follow-on parameters) are ignored!

e.g.

podman --log-level=info run --interactive --mount type=bind,source=/var/run/syslog-ng/log,destination=/dev/log --mount type=bind,source=/etc/dovecot,destination=/etc/dovecot,ro=true --mount type=bind,source=/etc/ssl/,destination=/etc/ssl/,ro=true --mount type=bind,source=/var/lib/dovecot,destination=/var/lib/dovecot --mount type=bind,source=/var/log/dovecot,destination=/var/log/dovecot --mount type=bind,source=/var/run/dovecot,destination=/var/run/dovecot --mount type=bind,source=/home,destination=/home --mount type=bind,source=/storage/mail,destination=/storage/mail --name openrc-dovecot-2.3.11.3 --network host --publish 143:143/tcp --publish 993:993/tcp --publish 24242:24242/tcp --restart=on-failure --tty --workdir / --name openrc-dovecot-2.3.11.3-inspect --replace --rm --entrypoint=/bin/sh service.net-mail.dovecot:2.3.11.3
INFO[0000] podman filtering at log level info
WARN[0000] Error initializing configured OCI runtime kata: no valid executable found for OCI runtime kata: invalid argument
INFO[0000] Found CNI network podman (type=bridge) at /etc/cni/net.d/87-podman-bridge.conflist
WARN[0000] Default CNI network name podman is unchangeable
INFO[0000] Setting parallel job count to 25
INFO[0000] About to add CNI network lo (type=loopback)
INFO[0000] Got pod network &{Name:funny_carson Namespace:funny_carson ID:94a235a28df24941a28360fe4742a03a6381f8dd1f908314c4bf94abd8429aca NetNS:/var/run/netns/cni-21be6f7b-bcad-8f81-a23a-12de0189c9b3 Networks:[] RuntimeConfig:map[podman:{IP: MAC: PortMappings:[] Bandwidth:<nil> IpRanges:[]}]}
INFO[0000] About to add CNI network podman (type=bridge)
INFO[0002] Got Conmon PID as 21975
Sourcing environment ...
Checking for root aaccess ...
Creating service directories  ...
Running service '/usr/sbin/dovecot' ...
doveadm: Fatal: Error reading configuration: stat(/etc/dovecot/dovecot.conf) failed: No such file or directory
INFO[0002] About to del CNI network lo (type=loopback)
INFO[0002] Got pod network &{Name:funny_carson Namespace:funny_carson ID:94a235a28df24941a28360fe4742a03a6381f8dd1f908314c4bf94abd8429aca NetNS:/var/run/netns/cni-21be6f7b-bcad-8f81-a23a-12de0189c9b3 Networks:[{Name:podman Ifname:eth0}] RuntimeConfig:map[podman:{IP: MAC: PortMappings:[] Bandwidth:<nil> IpRanges:[]}]}
INFO[0002] About to del CNI network podman (type=bridge)

vs.

podman --log-level=info run --interactive --mount type=bind,source=/var/run/syslog-ng/log,destination=/dev/log --mount type=bind,source=/etc/dovecot,destination=/etc/dovecot,ro=true --mount type=bind,source=/etc/ssl/,destination=/etc/ssl/,ro=true --mount type=bind,source=/var/lib/dovecot,destination=/var/lib/dovecot --mount type=bind,source=/var/log/dovecot,destination=/var/log/dovecot --mount type=bind,source=/var/run/dovecot,destination=/var/run/dovecot --mount type=bind,source=/home,destination=/home --mount type=bind,source=/storage/mail,destination=/storage/mail --name openrc-dovecot-2.3.11.3 --network host --publish 143:143/tcp --publish 993:993/tcp --publish 24242:24242/tcp --tty --workdir / --name openrc-dovecot-2.3.11.3-inspect --replace --rm --entrypoint=/bin/sh service.net-mail.dovecot:2.3.11.3
INFO[0000] podman filtering at log level info
WARN[0000] Error initializing configured OCI runtime kata: no valid executable found for OCI runtime kata: invalid argument
INFO[0000] Found CNI network podman (type=bridge) at /etc/cni/net.d/87-podman-bridge.conflist
WARN[0000] Default CNI network name podman is unchangeable
INFO[0000] Setting parallel job count to 25
INFO[0002] Got Conmon PID as 22122
/ # 

... noting that the only difference in the podman parameters is the presence or absence of --restart on-failure.

As well as the default entrypoint being executed in the first instance (with --restart on-failure) rather than the specified override, also note that the first instance has been assigned the name funny_carson rather than the requested name.

Output of podman version:

Version:      2.1.1
API Version:  2.0.0
Go Version:   go1.14.7
Git Commit:   9f6d6ba0b314d86521b66183c9ce48eaa2da1de2
Built:        Tue Sep 29 16:34:31 2020
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.16.1
  cgroupManager: cgroupfs
  cgroupVersion: v2
  conmon:
    package: Unknown
    path: /usr/bin/conmon
    version: 'conmon version 2.0.21, commit: 35a2fa83022e56e18af7e6a865ba5d7165fa2a4a'
  cpus: 8
  distribution:
    distribution: gentoo
    version: unknown
  eventLogger: file
  hostname: dellr330
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.8.9-gentoo
  linkmode: dynamic
  memFree: 1632706560
  memTotal: 8063447040
  ociRuntime:
    name: crun
    package: Unknown
    path: /usr/bin/crun
    version: |-
      crun version 0.15-dirty
      commit: 56ca95e61639510c7dbd39ff512f80f626404969
      spec: 1.0.0
      +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  remoteSocket:
    path: /run/podman/podman.sock
  rootless: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 25278005248
  swapTotal: 25769787392
  uptime: 71h 12m 32.57s (Approximately 2.96 days)
registries:
  search:
  - docker.io
  - docker.pkg.github.com
  - quay.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 18
    paused: 0
    running: 14
    stopped: 4
  graphDriverName: overlay
  graphOptions:
    overlay.ignore_chown_errors: "false"
  graphRoot: /space/podman/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 266
  runRoot: /space/podman/run
  volumePath: /space/podman/volumes
version:
  APIVersion: 2.0.0
  Built: 1601393671
  BuiltTime: Tue Sep 29 16:34:31 2020
  GitCommit: 9f6d6ba0b314d86521b66183c9ce48eaa2da1de2
  GoVersion: go1.14.7
  OsArch: linux/amd64
  Version: 2.1.1

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

Yes

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 1, 2020
@zhangguanzhang zhangguanzhang self-assigned this Oct 2, 2020
@rhatdan rhatdan added the Good First Issue This issue would be a good issue for a first time contributor to undertake. label Oct 2, 2020
@zhangguanzhang
Copy link
Collaborator

#7895 will fix this

@zhangguanzhang
Copy link
Collaborator

you could remove the --rm option to resolve this problem

@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 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Good First Issue This issue would be a good issue for a first time contributor to undertake. 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