Files
zun/zun/container/driver.py
Hongbin Lu dd5e21858d Sync container's host in periodic task
The container's host needs to be synced periodically because the
value of the host is mutable (in config file). If the value of
a host is changed but it is not synced to containers, the rpc
request will send to the old host which will fail.

In order to squeeze the logic of syncing host, the existing
periodic task was re-written because the original task was mainly
designed to sync a single container state (i.e. status). This
commit re-wrote the implementation make it generic and can be
leveraged to sync various container states (i.e. host, status).

In addition, this commit moved the implementation to container
driver since syncing container states seems to be driver-specific.

Change-Id: I998af06989363b5329ae1f853dd01388ddaeb1cc
2017-04-14 21:23:56 -04:00

5.9 KiB