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 container clone] the container configuration is not identical completely after cloning #13856

Closed
chuanchang opened this issue Apr 13, 2022 · 3 comments · Fixed by #13868
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

@chuanchang
Copy link
Contributor

chuanchang commented Apr 13, 2022

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

/kind bug

Description

Steps to reproduce the issue:

  1. podman run -d --name mycnt quay.io/libpod/alpine sleep 60

  2. podman inspect mycnt > mycnt

  3. podman container clone mycnt

  4. podman inspect mycnt-clone > mycnt-clone

  5. diff mycnt mycnt-clone

Describe the results you received:

<                "MemorySwappiness": 0,
---
>                "MemorySwappiness": -1,

Describe the results you expected:
the container configuration should be identical after cloning

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

Output of podman version:

[ajia@Fedora35 podman]$ ./bin/podman --version
podman version 4.0.0-dev

Output of podman info --debug:

[ajia@Fedora35 podman]$ ./bin/podman info --debug
host:
  arch: amd64
  buildahVersion: 1.26.0-dev
  cgroupControllers:
  - cpu
  - io
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.0-2.fc35.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.0, commit: '
  cpus: 8
  distribution:
    distribution: fedora
    variant: workstation
    version: "35"
  eventLogger: journald
  hostname: Fedora35
  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.16.11-200.fc35.x86_64
  linkmode: dynamic
  logDriver: journald
  memFree: 4162207744
  memTotal: 16651931648
  networkBackend: cni
  ociRuntime:
    name: crun
    package: crun-1.4.2-1.fc35.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.4.2
      commit: f6fbc8f840df1a414f31a60953ae514fa497c748
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +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: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.12-2.fc35.x86_64
    version: |-
      slirp4netns version 1.1.12
      commit: 7a104a101aa3278a2152351a082a6df71f57c9a3
      libslirp: 4.6.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.3
  swapFree: 8589930496
  swapTotal: 8589930496
  uptime: 176h 56m 43.68s (Approximately 7.33 days)
plugins:
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /home/ajia/.config/containers/storage.conf
  containerStore:
    number: 5
    paused: 0
    running: 0
    stopped: 5
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/ajia/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 13
  runRoot: /run/user/1000/containers
  volumePath: /home/ajia/.local/share/containers/storage/volumes
version:
  APIVersion: 4.0.0-dev
  Built: 1649841217
  BuiltTime: Wed Apr 13 17:13:37 2022
  GitCommit: 8586b4856fb2b3de8aed45300ce8ec324f5f6bcd
  GoVersion: go1.16.14
  Os: linux
  OsArch: linux/amd64
  Version: 4.0.0-dev

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

[ajia@Fedora35 podman]$ git rev-parse HEAD
8586b4856fb2b3de8aed45300ce8ec324f5f6bcd

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

Yes

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

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 13, 2022
@rhatdan
Copy link
Member

rhatdan commented Apr 13, 2022

@cdoern PTAL

@cdoern
Copy link
Contributor

cdoern commented Apr 13, 2022

I think this might be the same exact issue I just dealt with in #13839 just a different path where it is exposed...

@cdoern
Copy link
Contributor

cdoern commented Apr 13, 2022

I will fix this today

@cdoern cdoern self-assigned this Apr 13, 2022
cdoern pushed a commit to cdoern/podman that referenced this issue Apr 14, 2022
`DefineCreateFlags` was excluding clone from using the memory-swappiness flag leading the value to be zero
when our deafult is -1. Rearrange the if/else to give clone these memory related options

resolves containers#13856

Signed-off-by: cdoern <[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 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 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.

3 participants