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

Reconnect if syncthing is not healthy #745

Merged
merged 5 commits into from
Mar 4, 2020
Merged

Conversation

rberrelleza
Copy link
Member

Try and reconnect if we can't talk to syncthing.

Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>
Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>
Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>
Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>
@@ -51,8 +52,8 @@ func (s *Syncthing) Monitor(ctx context.Context, disconnect chan error) {
continue
}
if !connected {
log.Info("syncthing not connected, sending disconnect signal")
disconnect <- err
log.Info("syncthing not connected, sending disconnect signal: %s", err)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

printf: Info call has possible formatting directive %s (from govet)

Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>
@codecov
Copy link

codecov bot commented Mar 4, 2020

Codecov Report

Merging #745 into master will decrease coverage by 0.1%.
The diff coverage is 4.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #745      +/-   ##
==========================================
- Coverage   32.06%   31.96%   -0.11%     
==========================================
  Files          59       59              
  Lines        4615     4627      +12     
==========================================
- Hits         1480     1479       -1     
- Misses       3036     3049      +13     
  Partials       99       99
Impacted Files Coverage Δ
pkg/syncthing/syncthing.go 0.57% <0%> (-0.01%) ⬇️
pkg/k8s/forward/manager.go 32.84% <0%> (ø) ⬆️
pkg/syncthing/monitor.go 0% <0%> (ø) ⬆️
cmd/up.go 5.63% <7.14%> (-0.37%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ba860f5...8d9bb87. Read the comment docs.

@rberrelleza rberrelleza merged commit 702986a into master Mar 4, 2020
@rberrelleza rberrelleza deleted the disconnect-resilliency branch March 4, 2020 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants