From b0f8f5a3f5103d21735b7d80ce42986de8d7cbc4 Mon Sep 17 00:00:00 2001 From: Numan Siddique Date: Thu, 4 Dec 2014 20:21:05 +0530 Subject: [PATCH] Delete the lb configuration files during cleanup The issue is seen because boost::filesystem::remove is used to delete the lb pool configuration directory. Since the directory is not empty, it is failing. This patch fixes the issue by calling boost::filesystem::remove_all instead of delete the files if the directory is not empty. Change-Id: I48ced8fc1ef86063127ff50d42a40592082d27cb Closes-bug: #1399241 --- src/vnsw/agent/oper/instance_manager.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vnsw/agent/oper/instance_manager.cc b/src/vnsw/agent/oper/instance_manager.cc index 3725c091b0a..694bf64229f 100644 --- a/src/vnsw/agent/oper/instance_manager.cc +++ b/src/vnsw/agent/oper/instance_manager.cc @@ -671,7 +671,7 @@ void InstanceManager::LoadbalancerObserver( haproxy_->GenerateConfig(pathgen.str(), loadbalancer->uuid(), *loadbalancer->properties()); } else { - boost::filesystem::remove(pathgen.str(), error); + boost::filesystem::remove_all(pathgen.str(), error); if (error) { LOG(ERROR, error.message()); return;