Commit Graph

20 Commits

Author SHA1 Message Date
dependabot[bot]
fccfefdb58
build(deps): bump golang.org/x/sys in /healthcheck
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.0.0-20211216021012-1d35b9e2eb4e to 0.1.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-25 08:08:46 +00:00
bruwbird
274938ed45
fix typo liveliness 2022-11-25 21:52:00 +09:00
Oliver Gugger
ad8e25cbc9
multi: don't access loop variables in goroutines
This commit makes sure that no loop variables or other temporary
variables are accessed directly in a goroutine but are instead passed
into the goroutine through a parameter. This makes sure a copy of the
value is put on the stack and is not changed while the outside loop
continues.
2022-11-21 13:54:23 +01:00
Oliver Gugger
2b34c1e7ed
mod+healthcheck: remove local replace directive 2022-03-22 14:06:05 +01:00
Oliver Gugger
fa919781e2
mod+healthcheck: use new tor submodule
Using the tor module instead of whole lnd in healthcheck allows us to
get rid of a lot of indirect dependencies.
2022-03-21 20:41:34 +01:00
Oliver Gugger
7dfe4018ce
multi: use btcd's btcec/v2 and btcutil modules
This commit was previously split into the following parts to ease
review:
 - 2d746f68: replace imports
 - 4008f0fd: use ecdsa.Signature
 - 849e33d1: remove btcec.S256()
 - b8f6ebbd: use v2 library correctly
 - fa80bca9: bump go modules
2022-03-09 19:02:37 +01:00
Oliver Gugger
5155ebc405
tor+healthcheck: fix healthcheck for multiple services
Fixes #6013.
This commit fixes the Tor healthcheck that would previously fail if
there were multiple hidden service registered.
In the controller, we only need to know that our service is contained in
the list of active services. But we can't do a string equality check
since there might be multiple services, comma separated.
2021-11-23 09:53:36 +01:00
naveen
06433d351e
Upgrade to go 1.16 for the left over packages
Upgraded the go to 1.16 for the rest of the packages.
2021-10-19 03:55:13 +00:00
yyforyongyu
ca13750b2c
healthcheck: add CheckTorServiceStatus to monitor Tor connection 2021-10-11 13:11:54 +08:00
Oliver Gugger
0b4e03f5fc
multi: add golang 1.17 compatible build tags
With go 1.17 a change to the build flags was implemented:
https://go.googlesource.com/proposal/+/master/design/draft-gobuild.md

The formatter now automatically adds the forward-compatible build tag
format and the linter checks for them, so we need to include them in our
code.
2021-09-29 17:31:37 -07:00
yyforyongyu
d19ee28089
healthcheck: stop checking when max attempts are reached
This commit adds a check to the returned error from calling retryCheck
such that when the max number of attempts is reached, the health check
will quit.
2021-09-15 19:52:03 +08:00
Oliver Gugger
a35031ca2e
healthcheck: fix missing import 2021-07-28 11:01:27 +02:00
Oliver Gugger
537880e634
healthcheck: exclude unsupported syscalls from JS builds
Because the health check uses OS specific syscalls for determining the
available space on a disk that aren't available in JS/WASM builds, we
need to make sure we don't reference that code at all. Otherwise we
can't use parts of lnd as a library in projects that are being compiled
down to a WASM binary.
2021-07-22 09:47:37 +02:00
Andras Banki-Horvath
ad586c6bf1
healthcheck: separate lnd/healthcheck into submodule 2021-05-05 15:33:19 +02:00
Andras Banki-Horvath
cee832b749
healthcheck: disable default healthcheck logger
Disable logging by default in the healthcheck submodule to cut
dependency on lnd/build as we are hooking the logger separately
during lnd init.
2021-05-05 15:33:14 +02:00
Oliver Gugger
35c1fad517
server+healthcheck: rename function, add absolute disk space function
With this commit we rename the existing AvailableDiskSpace function to
its correct name AvailableDiskSpaceRatio as it only returns a ratio. We
then go ahead and add a new function that returns the actual number of
free bytes available on a file system.

This also fixes some comments and always returns an error instead of
panicking.
2020-11-13 10:19:50 +01:00
Olaoluwa Osuntokun
35a2dbcabb healthcheck: bump logging for failed healthchecks to info
In this commit, we bump up the logging for failed healthchecks from
`debug` to `info`. This should help us get to the bottom of the current
set of reported false positives that are causing `lnd` nodes to
erroneously shutdown.
2020-10-04 16:31:51 -07:00
Olaoluwa Osuntokun
9887b2d731
healtcheck: add extra build tags+files for netbsd and openbsd
Without these changes, the disk check portions won't compile on these
platforms.
2020-09-15 18:26:11 -07:00
carla
5a73029442
multi: add minimum disk space check 2020-08-24 09:38:11 +02:00
carla
c365a16656
healthcheck: monitor access to chain backend
Add a new health check package which will periodically poll health
check functions and shutdown if we do not succeed after our set number
of attempts. The first check that we add is one for our chain backend,
to ensure that we are connected to a bitcoin node.
2020-08-24 09:35:36 +02:00