Skip to content

Unable to remove container #22945

@shivarammysore

Description

@shivarammysore

Issue Description

Running podman on Ubutun

$ uname -a
Linux ovs-intelsdn-2 6.8.0-35-generic #35-Ubuntu SMP PREEMPT_DYNAMIC Mon May 20 15:51:52 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
$ sudo podman -v
podman version 4.9.3
$ sudo podman images
REPOSITORY               TAG         IMAGE ID      CREATED      SIZE
docker.io/library/mongo  6.0         2a9f5cd13295  7 weeks ago  733 MB
$ sudo podman ps -a
CONTAINER ID  IMAGE                        COMMAND     CREATED      STATUS      PORTS       NAMES
e9675191a065  docker.io/library/mongo:6.0  mongod      3 hours ago  Stopping                mongo6
$ sudo podman rm -fv e9675191a065
WARN[0010] StopSignal SIGTERM failed to stop container mongo6 in 10 seconds, resorting to SIGKILL 
Error: cannot remove container e9675191a065bcf479cb8ee0ad60364deba5006167ebbdf3de9ea93644c8af1c as it could not be stopped: given PID did not die within timeout

I have been unable to remove this container image. Did perform:

$ sudo podman system prune -all
$ sudo podman image prune -a -f

and still did not help.

Steps to reproduce the issue

Steps to reproduce the issue

  1. Run an instance of mongo
sudo podman run -d -t \
	--name mongo6 \
	--network="host" \
	--volume $PWD/mongo/etc:/etc/mongo \
	--volume $PWD/mongo/var:/var \
	-e ADMIN_USERNAME=mongoadmin \
	-e ADMIN_PASS=secret \
	-e MONGODB_ROOT_USER=mongoadmin \
	-e MONGODB_ROOT_PASSWORD=secret \
	-e MONGODB_USERNAME=rcuser \
	-e MONGODB_PASSWORD=rcpass \
	-e MONGODB_ADVERTISED_PORT_NUMBER=true \
	-e ALLOW_EMPTY_PASSWORD=yes \
	docker.io/mongo:6.0
  1. Run sudo podman exec -it mongo6-rocketchat /bin/bash and exit out of the container. After this I have not been able to delete the image

Describe the results you received

$ sudo podman rmi --force 2a9f5cd13295 e9675191a065
WARN[0010] StopSignal SIGTERM failed to stop container mongo6 in 10 seconds, resorting to SIGKILL 
Error: removing image 2a9f5cd13295c4df8da0c26b0a0adb70b15aac6727dec193d18d82baa1549872: container e9675191a065bcf479cb8ee0ad60364deba5006167ebbdf3de9ea93644c8af1c using image could not be removed: cannot remove container e9675191a065bcf479cb8ee0ad60364deba5006167ebbdf3de9ea93644c8af1c as it could not be stopped: given PID did not die within timeout

Describe the results you expected

The image must be deleted

podman info output

If you are unable to run podman info for any reason, please provide the podman version, operating system and its version and the architecture you are running.

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.locked - please file new issue/PRAssist humans wanting to comment on an old issue or PR with locked comments.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions