reset the state of container
Now, we do not have a command, such as zun reset-status, to reset the status of container. I think we should have api to explicitly update the container state in the Zun database.
Whiteboard
@Haobing,
Do you minding filling more details. I mainly wanted to see how this reset operation is going to do and how it is going to be implemented. I would suggest simply outlining the design in the whiteboard of this blueprint but you can write a spec for it if you want.
-- hongbin 2017-03-18
@hongbin,
Sometime, zun-compute error or other exceptional situation, a container can be left in an intermediate state such as creating or deleting. So, we should have a mechanism to handle the above issues.
We can use the command such as `zun reset-state container_id --Running` to set the container status with `Running` and task_state with `None`. If we do not use the argument `--Running`, will set the container status with `Error` and task_state with `None`.
Proposed change
Add a command line such as `zun reset-state` in the zunclient.
Add an API that allows a tenant to reset zun state.
We just to Set the fields for the container directly in the database will allow operations on the container.
REST API impact
* Reset container state
* V1/<tenant id>/container/
* Method: POST
* JSON schema definition for V1::
{
{
}
}
I will write a spec in the coming days if need be.
Thanks!
-- haobing 2017-03-21
Gerrit topic: https:/
Addressed by: https:/
reset the state of container
As discussed at the team meeting, this BP doesn't seem to fit into the scope of the Zun project. Mark it as obsoleted for now.
-- hongbin 2017-05-13