Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add more logging around removal of upstreams #185

Merged
merged 2 commits into from
Jun 7, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ public void updateService(BaragonRequest request) throws Exception {
String removePath = String.format(UPSTREAM_FORMAT, serviceId, getRemovePath(currentUpstreams, upstreamInfo));
if (nodeExists(removePath)) {
pathsToDelete.add(removePath);
LOG.info("Deleting {}", removePath);
transaction.delete().forPath(removePath).and();
} else {
LOG.warn("No upstream node found to delete for {}, calculated path to remove was {}, current upstream nodes are {}", upstreamInfo, removePath, currentUpstreams);
}
}
for (UpstreamInfo upstreamInfo : request.getAddUpstreams()) {
Expand All @@ -135,7 +138,7 @@ public void updateService(BaragonRequest request) throws Exception {
for (String matchingPath : matchingUpstreamPaths) {
String fullPath = String.format(UPSTREAM_FORMAT, serviceId, matchingPath);
if (nodeExists(fullPath) && !pathsToDelete.contains(fullPath) && !fullPath.equals(addPath)) {
LOG.info(String.format("Deleting %s", fullPath));
LOG.info("Deleting {}", fullPath);
pathsToDelete.add(fullPath);
transaction.delete().forPath(fullPath).and();
}
Expand Down