Merge "Add debug message for each recovery operation"
This commit is contained in:
commit
3ff690d9d4
@ -67,6 +67,12 @@ class Manager(periodic_task.PeriodicTasks):
|
|||||||
def restore_running_container(self, context, container, current_status):
|
def restore_running_container(self, context, container, current_status):
|
||||||
if (container.status == consts.RUNNING and
|
if (container.status == consts.RUNNING and
|
||||||
current_status == consts.STOPPED):
|
current_status == consts.STOPPED):
|
||||||
|
LOG.debug("Container %(container_uuid)s was recorded in state "
|
||||||
|
"(%(old_status)s) and current state is "
|
||||||
|
"(%(current_status)s), triggering reboot",
|
||||||
|
{'container_uuid': container.uuid,
|
||||||
|
'old_status': container.status,
|
||||||
|
'current_status': current_status})
|
||||||
self.container_reboot(context, container, 10)
|
self.container_reboot(context, container, 10)
|
||||||
|
|
||||||
def init_containers(self, context):
|
def init_containers(self, context):
|
||||||
@ -98,20 +104,32 @@ class Manager(periodic_task.PeriodicTasks):
|
|||||||
|
|
||||||
if (container.status == consts.DELETING or
|
if (container.status == consts.DELETING or
|
||||||
container.task_state == consts.CONTAINER_DELETING):
|
container.task_state == consts.CONTAINER_DELETING):
|
||||||
|
LOG.debug("Container %s in transitional state %s at start-up "
|
||||||
|
"retrying delete request",
|
||||||
|
container.uuid, container.task_state)
|
||||||
self.container_delete(context, container, force=True)
|
self.container_delete(context, container, force=True)
|
||||||
return
|
return
|
||||||
|
|
||||||
if container.task_state == consts.CONTAINER_REBOOTING:
|
if container.task_state == consts.CONTAINER_REBOOTING:
|
||||||
|
LOG.debug("Container %s in transitional state %s at start-up "
|
||||||
|
"retrying reboot request",
|
||||||
|
container.uuid, container.task_state)
|
||||||
self.container_reboot(context, container,
|
self.container_reboot(context, container,
|
||||||
CONF.docker.default_timeout)
|
CONF.docker.default_timeout)
|
||||||
return
|
return
|
||||||
|
|
||||||
if container.task_state == consts.CONTAINER_STOPPING:
|
if container.task_state == consts.CONTAINER_STOPPING:
|
||||||
|
LOG.debug("Container %s in transitional state %s at start-up "
|
||||||
|
"retrying stop request",
|
||||||
|
container.uuid, container.task_state)
|
||||||
self.container_stop(context, container,
|
self.container_stop(context, container,
|
||||||
CONF.docker.default_timeout)
|
CONF.docker.default_timeout)
|
||||||
return
|
return
|
||||||
|
|
||||||
if container.task_state == consts.CONTAINER_STARTING:
|
if container.task_state == consts.CONTAINER_STARTING:
|
||||||
|
LOG.debug("Container %s in transitional state %s at start-up "
|
||||||
|
"retrying start request",
|
||||||
|
container.uuid, container.task_state)
|
||||||
self.container_start(context, container)
|
self.container_start(context, container)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user