netbox-docker-plugin icon indicating copy to clipboard operation
netbox-docker-plugin copied to clipboard

Can't delete broken container

Open vamitrou opened this issue 1 year ago • 1 comments

Netbox version Plugin Version Agent version Docker API Version
3.6.9 1.6.1 1.45

Actual Behavior

Some times for unknown reason the container ends up in a state None. When i try to delete it, Netbox complains that it can't be deleted because it is running. I end up with a dead container which i can't get rid of.

Desired Behavior

When a container is in a "None" state I should still be able to delete it.

vamitrou avatar Dec 19 '24 21:12 vamitrou

A workaround is to use the API to PATCH the state field into a deletable value.

I think, being able to delete a container in state none is reasonable.

@lvenier you can assign me the issue, I'll make a PR for it.

linkdd avatar Dec 19 '24 21:12 linkdd