Zun

reset the state of container

Registered by haobing1

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.

Blueprint information

Status:
Complete
Approver:
hongbin
Priority:
Medium
Drafter:
haobing1
Direction:
Approved
Assignee:
haobing1
Definition:
Obsolete
Series goal:
None
Implementation:
Started
Milestone target:
None
Started by
haobing1
Completed by
hongbin

Related branches

Sprints

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/<container uuid>
  * Method: POST
  * JSON schema definition for V1::

        {
            "container":
            {
                "status": state
            }
        }

I will write a spec in the coming days if need be.
Thanks!

-- haobing 2017-03-21

Gerrit topic: https://review.openstack.org/#q,topic:bp/reset-state-container,n,z

Addressed by: https://review.openstack.org/456172
    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

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.