Zun

sync the status of a container in db by actual state

Registered by feng.shengqin@zte.com.cn

Sometimes the status of containers in database are different with the actual states.

Currently, we change the status of container to the status in db (https://github.com/openstack/zun/blob/master/zun/container/docker/driver.py#L327).

It's better to support a configuration items for users to choose :
a) sync db to actually status in host
b) sync actually status in host to db

Blueprint information

Status:
Not started
Approver:
hongbin
Priority:
Undefined
Drafter:
feng.shengqin@zte.com.cn
Direction:
Needs approval
Assignee:
None
Definition:
Discussion
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(hongbin 2017-01-13): Hi Shengqin, several questions here:
* What are the use cases of this feature?
* For "b) sync actually status in host to db", could you clarify what it means exactly? Does it mean any thing below?
1. If the container is "Running" at DB and the actual status is "Error" at Docker, zun-compute restarts the container? or delete and re-create the container?
2. If the container is "Running" at DB and the actual status is "Stopped" in Docker, zun-compute restarts the container? Is it the same as "--restart-policy always/on-failure/on-stop"?
3. If the container is "Running" at DB but it is not found at Docker, zun-compute re-create the container?
4. Any other example use cases?

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.