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: I48ced8fc1ef86063127ff50d42a40592082d27cb
Closes-bug: #1399241
  • Loading branch information
numansiddique committed Dec 4, 2014
1 parent 54421e9 commit b0f8f5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vnsw/agent/oper/instance_manager.cc
Expand Up @@ -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;
Expand Down

0 comments on commit b0f8f5a

Please sign in to comment.