Skip to content

Commit

Permalink
Merge pull request #7478 from filecoin-project/chore/depupgrade-2021-…
Browse files Browse the repository at this point in the history
…10-08

Dep upgrade pass
  • Loading branch information
Stebalien authored Oct 8, 2021
2 parents 734a03c + 8b01725 commit c776811
Show file tree
Hide file tree
Showing 4 changed files with 228 additions and 91 deletions.
2 changes: 1 addition & 1 deletion cmd/lotus-health/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ var watchHeadCmd = &cli.Command{
return
}()

restart, err := notifyHandler(name, nCh, sCh)
restart, err := notifyHandler(ctx, name, nCh, sCh)
if err != nil {
return err
}
Expand Down
7 changes: 4 additions & 3 deletions cmd/lotus-health/notify.go
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
package main

import (
"context"
"os"

"github.com/coreos/go-systemd/v22/dbus"
)

func notifyHandler(n string, ch chan interface{}, sCh chan os.Signal) (string, error) {
func notifyHandler(ctx context.Context, n string, ch chan interface{}, sCh chan os.Signal) (string, error) {
select {
// alerts to restart systemd unit
case <-ch:
statusCh := make(chan string, 1)
c, err := dbus.New()
c, err := dbus.NewWithContext(ctx)
if err != nil {
return "", err
}
_, err = c.TryRestartUnit(n, "fail", statusCh)
_, err = c.TryRestartUnitContext(ctx, n, "fail", statusCh)
if err != nil {
return "", err
}
Expand Down
59 changes: 29 additions & 30 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,42 @@ module github.com/filecoin-project/lotus
go 1.16

require (
contrib.go.opencensus.io/exporter/jaeger v0.1.0
contrib.go.opencensus.io/exporter/jaeger v0.2.1
contrib.go.opencensus.io/exporter/prometheus v0.4.0
github.com/BurntSushi/toml v0.3.1
github.com/GeertJohan/go.rice v1.0.0
github.com/BurntSushi/toml v0.4.1
github.com/GeertJohan/go.rice v1.0.2
github.com/Gurpartap/async v0.0.0-20180927173644-4f7f499dd9ee
github.com/Kubuxu/imtui v0.0.0-20210401140320-41663d68d0fa
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
github.com/alecthomas/jsonschema v0.0.0-20200530073317-71f438968921
github.com/buger/goterm v0.0.0-20200322175922-2f3e71b85129
github.com/buger/goterm v1.0.3
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
github.com/cockroachdb/pebble v0.0.0-20201001221639-879f3bfeef07
github.com/coreos/go-systemd/v22 v22.1.0
github.com/coreos/go-systemd/v22 v22.3.2
github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e
github.com/dgraph-io/badger/v2 v2.2007.2
github.com/docker/go-units v0.4.0
github.com/drand/drand v1.2.1
github.com/drand/kyber v1.1.4
github.com/dustin/go-humanize v1.0.0
github.com/elastic/go-sysinfo v1.3.0
github.com/elastic/gosigar v0.12.0
github.com/elastic/go-sysinfo v1.7.0
github.com/elastic/gosigar v0.14.1
github.com/etclabscore/go-openrpc-reflect v0.0.36
github.com/fatih/color v1.9.0
github.com/fatih/color v1.13.0
github.com/filecoin-project/dagstore v0.4.3
github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200910194244-f640612a1a1f
github.com/filecoin-project/go-address v0.0.5
github.com/filecoin-project/go-address v0.0.6
github.com/filecoin-project/go-bitfield v0.2.4
github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2
github.com/filecoin-project/go-commp-utils v0.1.1-0.20210427191551-70bf140d31c7
github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03
github.com/filecoin-project/go-cbor-util v0.0.1
github.com/filecoin-project/go-commp-utils v0.1.2
github.com/filecoin-project/go-crypto v0.0.1
github.com/filecoin-project/go-data-transfer v1.11.1
github.com/filecoin-project/go-fil-commcid v0.1.0
github.com/filecoin-project/go-fil-commp-hashhash v0.1.0
github.com/filecoin-project/go-fil-markets v1.13.1
github.com/filecoin-project/go-jsonrpc v0.1.4-0.20210217175800-45ea43ac2bec
github.com/filecoin-project/go-padreader v0.0.0-20210723183308-812a16dc01b1
github.com/filecoin-project/go-jsonrpc v0.1.5
github.com/filecoin-project/go-padreader v0.0.1
github.com/filecoin-project/go-paramfetch v0.0.2
github.com/filecoin-project/go-state-types v0.1.1-0.20210915140513-d354ccf10379
github.com/filecoin-project/go-statemachine v1.0.1
Expand All @@ -52,10 +52,9 @@ require (
github.com/filecoin-project/specs-actors/v6 v6.0.0-20211001193936-c3afe7fa3c5c
github.com/filecoin-project/specs-storage v0.1.1-0.20201105051918-5188d9774506
github.com/filecoin-project/test-vectors/schema v0.0.5
github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1
github.com/gbrlsnchs/jwt/v3 v3.0.1
github.com/gdamore/tcell/v2 v2.2.0
github.com/go-kit/kit v0.10.0
github.com/go-ole/go-ole v1.2.4 // indirect
github.com/go-kit/kit v0.12.0
github.com/golang/mock v1.6.0
github.com/google/uuid v1.3.0
github.com/gorilla/mux v1.7.4
Expand All @@ -65,11 +64,11 @@ require (
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/golang-lru v0.5.4
github.com/icza/backscanner v0.0.0-20210726202459-ac2ffc679f94
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d
github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab
github.com/ipfs/bbloom v0.0.4
github.com/ipfs/go-bitswap v0.3.4
github.com/ipfs/go-block-format v0.0.3
github.com/ipfs/go-blockservice v0.1.5
github.com/ipfs/go-blockservice v0.1.7
github.com/ipfs/go-cid v0.1.0
github.com/ipfs/go-cidutil v0.0.2
github.com/ipfs/go-datastore v0.4.6
Expand All @@ -85,14 +84,14 @@ require (
github.com/ipfs/go-ipfs-ds-help v1.0.0
github.com/ipfs/go-ipfs-exchange-interface v0.0.1
github.com/ipfs/go-ipfs-exchange-offline v0.0.1
github.com/ipfs/go-ipfs-files v0.0.8
github.com/ipfs/go-ipfs-files v0.0.9
github.com/ipfs/go-ipfs-http-client v0.0.6
github.com/ipfs/go-ipfs-routing v0.1.0
github.com/ipfs/go-ipfs-util v0.0.2
github.com/ipfs/go-ipld-cbor v0.0.5
github.com/ipfs/go-ipld-format v0.2.0
github.com/ipfs/go-log/v2 v2.3.0
github.com/ipfs/go-merkledag v0.3.2
github.com/ipfs/go-merkledag v0.4.1
github.com/ipfs/go-metrics-interface v0.0.1
github.com/ipfs/go-metrics-prometheus v0.0.2
github.com/ipfs/go-path v0.0.7
Expand Down Expand Up @@ -122,14 +121,14 @@ require (
github.com/libp2p/go-libp2p-tls v0.2.0
github.com/libp2p/go-libp2p-yamux v0.5.4
github.com/libp2p/go-maddr-filter v0.1.0
github.com/mattn/go-isatty v0.0.13
github.com/mattn/go-isatty v0.0.14
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1
github.com/mitchellh/go-homedir v1.1.0
github.com/multiformats/go-base32 v0.0.3
github.com/multiformats/go-multiaddr v0.4.0
github.com/multiformats/go-base32 v0.0.4
github.com/multiformats/go-multiaddr v0.4.1
github.com/multiformats/go-multiaddr-dns v0.3.1
github.com/multiformats/go-multibase v0.0.3
github.com/multiformats/go-multihash v0.0.15
github.com/multiformats/go-multihash v0.0.16
github.com/multiformats/go-varint v0.0.6
github.com/open-rpc/meta-schema v0.0.0-20201029221707-1b72ef2ea333
github.com/opentracing/opentracing-go v1.2.0
Expand All @@ -151,11 +150,11 @@ require (
go.uber.org/dig v1.10.0 // indirect
go.uber.org/fx v1.9.0
go.uber.org/multierr v1.7.0
go.uber.org/zap v1.19.0
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d
go.uber.org/zap v1.19.1
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912
golang.org/x/time v0.0.0-20191024005414-555d28b269f0
golang.org/x/sys v0.0.0-20210917161153-d61c044b1678
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac
golang.org/x/tools v0.1.5
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
gopkg.in/cheggaaa/pb.v1 v1.0.28
Expand Down
Loading

0 comments on commit c776811

Please sign in to comment.