From ad84c274b10f181e831499caf788d7d13b217576 Mon Sep 17 00:00:00 2001 From: Numan Siddique Date: Fri, 5 Dec 2014 16:08:38 +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: I0b22c985aacee9173f1537f029fdc51c6db0324b Closes-bug: #1399241 --- src/vnsw/agent/oper/namespace_manager.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vnsw/agent/oper/namespace_manager.cc b/src/vnsw/agent/oper/namespace_manager.cc index 300e72a4c12..0a259977f05 100644 --- a/src/vnsw/agent/oper/namespace_manager.cc +++ b/src/vnsw/agent/oper/namespace_manager.cc @@ -696,7 +696,7 @@ void NamespaceManager::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;