Skip to content

Commit

Permalink
Delete the lb configuration files during cleanup
Browse files Browse the repository at this point in the history
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
  • Loading branch information
numansiddique committed Dec 5, 2014
1 parent a3c3f08 commit ad84c27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vnsw/agent/oper/namespace_manager.cc
Expand Up @@ -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;
Expand Down

0 comments on commit ad84c27

Please sign in to comment.