Skip to content

Commit

Permalink
Merge pull request #27 from go-graphite/rebalance/more-accurate-controls
Browse files Browse the repository at this point in the history
rebalance: introduce go-carbon health check with better sync rate control
  • Loading branch information
bom-d-van authored Oct 25, 2021
2 parents ee866ed + 2ec000e commit 9f5b3dc
Show file tree
Hide file tree
Showing 8 changed files with 746 additions and 68 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,17 @@ test: clean bucky buckyd
go run -mod vendor testing/rebalance.go $(REBALANCE_FLAGS)
go run -mod vendor testing/copy.go $(COPY_FLAGS)

# only works on linux
test_rebalance_health_check_setup:
sudo ip addr add 10.0.1.7 dev lo
sudo ip addr add 10.0.1.8 dev lo
sudo ip addr add 10.0.1.9 dev lo

test_rebalance_health_check: clean bucky buckyd
go run -mod vendor testing/rebalance_health_check.go $(REBALANCE_FLAGS)

clean_test:
rm -rf bucky buckyd
rm -rf testdata_rebalance_*
rm -rf testdata_copy_*

Expand Down
4 changes: 3 additions & 1 deletion cmd/bucky/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ func DeleteMetric(server, metric string) error {

switch resp.StatusCode {
case 200:
log.Printf("DELETED: %s", metric)
if msFlags.printDeletedMetrics {
log.Printf("DELETED: %s", metric)
}
case 404:
log.Printf("Not found / Not deleted: %s", metric)
return fmt.Errorf("Metric not found.")
Expand Down
Loading

0 comments on commit 9f5b3dc

Please sign in to comment.