You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question to following scenario:
Suppose I want to delete a container and then add it as new one with the podman-api. For our project, the operations should be synchronized that first the delete is done completely and then the create can start, otherwise the creation of the container can fail in some certain circumstances.
I am talking about this delete function in the documentation: pub async fn delete(&self, opts: &opts::ContainerDeleteOpts) -> Result<()>
The expected workflow shall be like this:
Delete container is requested by api call
Create container is requested by api call
Delete container is exectued
Create container is executed => create is only done after deletion was actually executed completely
My question is now, is a delete immediately executed as task or does the podman api just return and give positive feedback that it is deleted, but the task is then put into a task queue and the container might be deleted later but not immediately?
If it would be put into a task queue and scheduled, then the real workflow can deviate from the expected workflow, resulting in the wrong order:
Delete container is requested
Create container is requested
Create container is executed
Delete container is executed only now
Step 3) is then failing.
If the task is not guaranteed to be executed immediately or like the requested order, how can be ensured that the order is like we want to have (expected workflow) when working with the podman-api?
Or is podman-api's remove function better as delete ?
The text was updated successfully, but these errors were encountered:
Hello,
I have a question to following scenario:
Suppose I want to delete a container and then add it as new one with the podman-api. For our project, the operations should be synchronized that first the delete is done completely and then the create can start, otherwise the creation of the container can fail in some certain circumstances.
I am talking about this delete function in the documentation:
pub async fn delete(&self, opts: &opts::ContainerDeleteOpts) -> Result<()>
The expected workflow shall be like this:
My question is now, is a delete immediately executed as task or does the podman api just return and give positive feedback that it is deleted, but the task is then put into a task queue and the container might be deleted later but not immediately?
If it would be put into a task queue and scheduled, then the real workflow can deviate from the expected workflow, resulting in the wrong order:
Step 3) is then failing.
If the task is not guaranteed to be executed immediately or like the requested order, how can be ensured that the order is like we want to have (expected workflow) when working with the podman-api?
Or is podman-api's remove function better as delete ?
The text was updated successfully, but these errors were encountered: