From 7f1ca3f4bcf5589f990b5d679eadf29d348c9455 Mon Sep 17 00:00:00 2001 From: Sylvain Afchain Date: Tue, 30 Jun 2015 14:01:26 +0000 Subject: [PATCH] Re-add the on error callback to instance tasks This patch sets the error callback for the instance tasks created so that the instance manager reports the error output via its introspec. This report was present in precedent version. So this patch re-introduce this behavior Change-Id: Ic4393ab107e882a110714704dea4b78170f94b82 Closes-Bug: #1470122 --- src/vnsw/agent/oper/instance_manager.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vnsw/agent/oper/instance_manager.cc b/src/vnsw/agent/oper/instance_manager.cc index e70b56e4061..826b2418eff 100644 --- a/src/vnsw/agent/oper/instance_manager.cc +++ b/src/vnsw/agent/oper/instance_manager.cc @@ -278,7 +278,6 @@ void InstanceManager::OnErrorEventHandler(InstanceManagerChildEvent event) { UnregisterSvcInstance(event.task); } } - ScheduleNextTask(event.task_queue); } bool InstanceManager::DequeueEvent(InstanceManagerChildEvent event) { @@ -576,6 +575,8 @@ void InstanceManager::StartServiceInstance(ServiceInstance *svc_instance, if (adapter != NULL) { InstanceTask *task = adapter->CreateStartTask(props, update); if (task != NULL) { + task->set_on_error_cb(boost::bind(&InstanceManager::OnError, + this, _1, _2)); state->set_properties(props); RegisterSvcInstance(task, svc_instance); std::stringstream info;