Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Bug: podman generate systemd defines multiple "-d" #8847

Closed
dschier-wtd opened this issue Dec 28, 2020 · 2 comments · Fixed by #8851
Closed

Bug: podman generate systemd defines multiple "-d" #8847

dschier-wtd opened this issue Dec 28, 2020 · 2 comments · Fixed by #8851
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

@dschier-wtd
Copy link

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

/kind bug

Description

Podman generates multiple -d paramater in the created output of podman generate systemd <container>, when -dt is already defined.

Steps to reproduce the issue:

  1. podman run -dt --name web01 httpd:2
  2. podman generate systemd --new web01

Describe the results you received:

Check the ExecStart= Part in the below code. it has an additional -d

# container-14978c6f5f2311d850accd2803c305473cf0d02170ea65f7132bbc41a89bd7d9.service
# autogenerated by Podman 2.2.1
# Mon Dec 28 16:49:38 CET 2020

[Unit]
Description=Podman container-14978c6f5f2311d850accd2803c305473cf0d02170ea65f7132bbc41a89bd7d9.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
ExecStartPre=/bin/rm -f %t/container-14978c6f5f2311d850accd2803c305473cf0d02170ea65f7132bbc41a89bd7d9.pid %t/container-14978c6f5f2311d850accd2803c305473cf0d02170ea65f7132bbc41a89bd7d9.ctr-id
ExecStart=/usr/bin/podman run --conmon-pidfile %t/container-14978c6f5f2311d850accd2803c305473cf0d02170ea65f7132bbc41a89bd7d9.pid --cidfile %t/container-14978c6f5f2311d850accd2803c305473cf0d02170ea65f7132bbc41a89bd7d9.ctr-id --cgroups=no-conmon -d --replace -dt --name web01 httpd:2
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/container-14978c6f5f2311d850accd2803c305473cf0d02170ea65f7132bbc41a89bd7d9.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-14978c6f5f2311d850accd2803c305473cf0d02170ea65f7132bbc41a89bd7d9.ctr-id
PIDFile=%t/container-14978c6f5f2311d850accd2803c305473cf0d02170ea65f7132bbc41a89bd7d9.pid
KillMode=none
Type=forking

[Install]
WantedBy=multi-user.target default.target

Describe the results you expected:

Shorthandles from podman run are expanded to long handles (-e = --env, -d = --detach, etc.) and duplicates are avoided or removed.

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

Does not occure if only -d is given during run.

Output of podman version:

Version:      2.2.1
API Version:  2.1.0
Go Version:   go1.15.5
Built:        Tue Dec  8 15:37:50 2020
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.18.0
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.21-3.fc33.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.21, commit: 0f53fb68333bdead5fe4dc5175703e22cf9882ab'
  cpus: 8
  distribution:
    distribution: fedora
    version: "33"
  eventLogger: journald
  hostname: nb01.while-true-do.io
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.9.15-200.fc33.x86_64
  linkmode: dynamic
  memFree: 265486336
  memTotal: 16493572096
  ociRuntime:
    name: crun
    package: crun-0.16-3.fc33.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.16
      commit: eb0145e5ad4d8207e84a327248af76663d4e50dd
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    path: /run/podman/podman.sock
  rootless: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 3980914688
  swapTotal: 4294963200
  uptime: 27h 44m 19.34s (Approximately 1.12 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - docker.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 7
    paused: 0
    running: 7
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
  imageStore:
    number: 8
  runRoot: /var/run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 2.1.0
  Built: 1607438270
  BuiltTime: Tue Dec  8 15:37:50 2020
  GitCommit: ""
  GoVersion: go1.15.5
  OsArch: linux/amd64
  Version: 2.2.1

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

podman-2.2.1-1.fc33.x86_64

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

Yes

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

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

mheon commented Dec 28, 2020

@vrothberg PTAL

@Luap99 Luap99 added the In Progress This issue is actively being worked by the assignee, please do not work on this at this time. label Dec 29, 2020
@Luap99 Luap99 self-assigned this Dec 29, 2020
@dschier-wtd
Copy link
Author

Thanks a lot 👍

@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
# for free to subscribe to this conversation on GitHub. Already have an account? #.
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