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

export checkpoints of redis container failed #8836

Closed
yufeifly opened this issue Dec 26, 2020 · 4 comments
Closed

export checkpoints of redis container failed #8836

yufeifly opened this issue Dec 26, 2020 · 4 comments
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

@yufeifly
Copy link

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

/kind bug

Description
checkpoint failed when I want to export the checkpoints of redis container.

Steps to reproduce the issue:

1.sudo podman run -p 35000:6379 -d --name=somename redis:latest

2.sudo podman container checkpoint 0ac9 -e checkpoint.tar.gz

Describe the results you received:
I received this error: Error: Cannot export checkpoints of containers with named volumes or dependencies

Describe the results you expected:
export checkpoints succeed.

Additional information you deem important (e.g. issue happens only occasionally):
In docker17.03, I can checkpoint redis server. However, in podman, I can checkpoint redis container, but I cannot export the checkpoints of it. From the debug info, I know that it may be due to the c.config.NamedVolumes. But it confuses me that for redis container, everything stores in memory, so why should this happen?
Output of podman version:

Version:      3.0.0-dev
API Version:  3.0.0
Go Version:   go1.15.6
Git Commit:   2708f827aac6a30647f3ea45e3148f679da88d34-dirty
Built:        Sat Dec 26 20:22:41 2020
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.19.0-dev
  cgroupManager: cgroupfs
  cgroupVersion: v1
  conmon:
    package: /usr/bin/conmon 由 conmon 1:2.0.21-1 所拥有
    path: /usr/bin/conmon
    version: 'conmon version 2.0.21, commit: 35a2fa83022e56e18af7e6a865ba5d7165fa2a4a'
  cpus: 4
  distribution:
    distribution: manjaro
    version: unknown
  eventLogger: journald
  hostname: manjaro
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
  kernel: 5.8.16-2-MANJARO
  linkmode: dynamic
  memFree: 136208384
  memTotal: 8318222336
  ociRuntime:
    name: runc
    package: /usr/bin/runc 由 runc 1.0.0rc92-1 所拥有
    path: /usr/bin/runc
    version: |-
      runc version 1.0.0-rc92
      commit: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
      spec: 1.0.2-dev
  os: linux
  remoteSocket:
    path: /run/user/1000/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_AUDIT_WRITE,CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_MKNOD,CAP_NET_BIND_SERVICE,CAP_NET_RAW,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    selinuxEnabled: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: /usr/bin/slirp4netns 由 slirp4netns 1.1.7-1 所拥有
    version: |-
      slirp4netns version 1.1.7
      commit: e62caa08b78f3e662422bd7bfbcd2df3d12dcab1
      libslirp: 4.3.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.4.2
  swapFree: 0
  swapTotal: 0
  uptime: 59h 34m 30.99s (Approximately 2.46 days)
registries:
  search:
  - docker.io
store:
  configFile: /home/alan/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: /usr/bin/fuse-overlayfs 由 fuse-overlayfs 1.3.0-1 所拥有
      Version: |-
        fusermount3 version: 3.10.0
        fuse-overlayfs: version 1.3
        FUSE library version 3.10.0
        using FUSE kernel interface version 7.31
  graphRoot: /home/alan/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 0
  runRoot: /run/user/1000/containers
  volumePath: /home/alan/.local/share/containers/storage/volumes
version:
  APIVersion: 3.0.0
  Built: 1608985361
  BuiltTime: Sat Dec 26 20:22:41 2020
  GitCommit: 2708f827aac6a30647f3ea45e3148f679da88d34-dirty
  GoVersion: go1.15.6
  OsArch: linux/amd64
  Version: 3.0.0-dev

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 26, 2020
@yufeifly
Copy link
Author

ping @adrianreber, please have a look at it.

@adrianreber
Copy link
Collaborator

@yufeifly Named volumes are currently not supported. There is pull request to fix this at #8781

Having a quick look at the redis:latest documentation I think mounting a host directory at '/data` should work around your problem.

Start the container with podman run -p 35000:6379 -v /tmp/redis:/data -d --name=somename redis:latest, then checkpointing should work with export. The data directory needs then to be manually copied form the the source to the destination host if you want to migrate the container.

But once #8781 gets merged it should be possible to migrate container including the named volumes.

@rst0git
Copy link
Contributor

rst0git commented Dec 29, 2020

Hi @yufeifly, as Adrian mentioned, this error message is shown because the redis container image creates a volume for /data.

In addition to the workaround above, you can use the --image-volume option to specify how such volumes are handled. To enable checkpoint/restore of such containers (with your current version of Podman) you can use either tmpfs or ignore, as shown in the example below.

podman run --image-volume tmpfs -p 35000:6379 -d --name=somename redis:latest

# or

podman run --image-volume ignore -p 35000:6379 -d --name=somename redis:latest

@yufeifly
Copy link
Author

Thank you very much @adrianreber @rst0git . Then I will close this issue.

@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
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

No branches or pull requests

4 participants