Skip to content

Commit

Permalink
Merge pull request #152 from nodeset-org/fix-139
Browse files Browse the repository at this point in the history
Add list of available logs to `daemon-logs`
  • Loading branch information
jclapis authored Sep 30, 2024
2 parents 7d99e7f + dfb0d59 commit 7094a27
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 15 deletions.
11 changes: 6 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ toolchain go1.22.7
require (
github.com/alessio/shellescape v1.4.2
github.com/blang/semver/v4 v4.0.0
github.com/docker/docker v27.0.3+incompatible
github.com/docker/docker v27.3.1+incompatible
github.com/dustin/go-humanize v1.0.1
github.com/ethereum/go-ethereum v1.14.8
github.com/fatih/color v1.17.0
github.com/gdamore/tcell/v2 v2.7.4
github.com/goccy/go-json v0.10.3
github.com/mholt/archiver/v4 v4.0.0-alpha.8
github.com/mitchellh/go-homedir v1.1.0
github.com/nodeset-org/hyperdrive-constellation v1.0.0-b1
github.com/nodeset-org/hyperdrive-daemon v1.1.0-b1.0.20240925062001-b632dbb34408
github.com/nodeset-org/hyperdrive-constellation v1.0.0-b1.0.20240927181424-49653a316a20
github.com/nodeset-org/hyperdrive-daemon v1.1.0-b1.0.20240927170333-9fee16a048f0
github.com/nodeset-org/hyperdrive-stakewise v1.1.0-b1.0.20240925070320-bce5c78f04f8
github.com/nodeset-org/osha v0.3.0
github.com/nodeset-org/osha v0.3.1-0.20240927160812-d66358d4e091
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58
github.com/rivo/tview v0.0.0-20230208211350-7dfff1ce7854 // DO NOT UPGRADE
github.com/rocket-pool/node-manager-core v0.5.2-0.20240918224929-a9cee1201bee
Expand Down Expand Up @@ -124,6 +124,7 @@ require (
github.com/moby/sys/signal v0.7.0 // indirect
github.com/moby/sys/symlink v0.2.0 // indirect
github.com/moby/sys/user v0.1.0 // indirect
github.com/moby/sys/userns v0.1.0 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/morikuni/aec v1.0.0 // indirect
Expand All @@ -134,7 +135,7 @@ require (
github.com/multiformats/go-multihash v0.2.3 // indirect
github.com/multiformats/go-varint v0.0.7 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nodeset-org/nodeset-client-go v1.0.0 // indirect
github.com/nodeset-org/nodeset-client-go v1.0.1-0.20240927160821-e348e05e2363 // indirect
github.com/nwaples/rardecode/v2 v2.0.0-beta.2 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
Expand Down
22 changes: 12 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5Qvfr
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v27.0.3+incompatible h1:aBGI9TeQ4MPlhquTQKq9XbK79rKFVwXNUAYz9aXyEBE=
github.com/docker/docker v27.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v27.3.1+incompatible h1:KttF0XoteNTicmUtBO0L2tP+J7FGRFTjaEF4k6WdhfI=
github.com/docker/docker v27.3.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8=
Expand Down Expand Up @@ -414,6 +414,8 @@ github.com/moby/sys/symlink v0.2.0 h1:tk1rOM+Ljp0nFmfOIBtlV3rTDlWOwFRhjEeAhZB0nZ
github.com/moby/sys/symlink v0.2.0/go.mod h1:7uZVF2dqJjG/NsClqul95CqKOBRQyYSNnJ6BMgR/gFs=
github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg=
github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU=
github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g=
github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28=
github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=
github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
Expand Down Expand Up @@ -442,16 +444,16 @@ github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOEL
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/nodeset-org/hyperdrive-constellation v1.0.0-b1 h1:vCfp3lmem13o/0v8MvIUhpN+dc9jeINflPWTAH68lXA=
github.com/nodeset-org/hyperdrive-constellation v1.0.0-b1/go.mod h1:QSgHk/fUfxGV0b9xP+9InyGhWQVvX1s0L8EA2PN7vfo=
github.com/nodeset-org/hyperdrive-daemon v1.1.0-b1.0.20240925062001-b632dbb34408 h1:OScvvo1bQlPLM8Kc0PaCc2qf4O7e4wvnIi/Yl2b6izA=
github.com/nodeset-org/hyperdrive-daemon v1.1.0-b1.0.20240925062001-b632dbb34408/go.mod h1:jrX22jxBfFxbmFYm+4TknWPVrOG2RZL0zglG7+Mijf4=
github.com/nodeset-org/hyperdrive-constellation v1.0.0-b1.0.20240927181424-49653a316a20 h1:ssX0iJNwUwm3eMjxGWR4YnyGaObhXQnkkS4zWQa0QSY=
github.com/nodeset-org/hyperdrive-constellation v1.0.0-b1.0.20240927181424-49653a316a20/go.mod h1:8gvihGSvHp1gxmI6ky7GZjKMfM8qEBi/KWBBlDYHebg=
github.com/nodeset-org/hyperdrive-daemon v1.1.0-b1.0.20240927170333-9fee16a048f0 h1:E0k1xWwUBGA00P5cA2dtt0TdrN+k33hBmsWbUZ1w49Y=
github.com/nodeset-org/hyperdrive-daemon v1.1.0-b1.0.20240927170333-9fee16a048f0/go.mod h1:sT7SE+9qhmATtO1Rvyfo5D+752OfZa7UEVEYsMnmtEE=
github.com/nodeset-org/hyperdrive-stakewise v1.1.0-b1.0.20240925070320-bce5c78f04f8 h1:IGCTYVbOYINLxNJ4pY9x9C4qNcjinWotATc+JY8vaJM=
github.com/nodeset-org/hyperdrive-stakewise v1.1.0-b1.0.20240925070320-bce5c78f04f8/go.mod h1:U6fGpE2EgXxpDYQ+YGQqq8Wm3uVl3SW8jl8XJ0YV50I=
github.com/nodeset-org/nodeset-client-go v1.0.0 h1:ZbYdP3nEFuZMT3Yt0nbBIYMdQZ4rAHMccvKjnUPZxhc=
github.com/nodeset-org/nodeset-client-go v1.0.0/go.mod h1:slpwejkJ/vYU9SKA3SYw4hIPJLzDUeQxcx+Cm04kkIA=
github.com/nodeset-org/osha v0.3.0 h1:oX9ZrFLKXhhxCWbABY4VAvsqvGUH790XNeENl46a4EY=
github.com/nodeset-org/osha v0.3.0/go.mod h1:jGCgmYNYxI97YgITz2Xwpy8689vVnCF8fDsmB4Q32F8=
github.com/nodeset-org/nodeset-client-go v1.0.1-0.20240927160821-e348e05e2363 h1:iivCknAFZlpxPwbIDjPc9E2bnj55c2STrXT9MvuMzQM=
github.com/nodeset-org/nodeset-client-go v1.0.1-0.20240927160821-e348e05e2363/go.mod h1:slpwejkJ/vYU9SKA3SYw4hIPJLzDUeQxcx+Cm04kkIA=
github.com/nodeset-org/osha v0.3.1-0.20240927160812-d66358d4e091 h1:oAs4/Yx4jnsNdWh3vTKum1sXC8VCvsY1H2VFSRRkgjc=
github.com/nodeset-org/osha v0.3.1-0.20240927160812-d66358d4e091/go.mod h1:47D6kYMuxYDTbul3w/YtE1LKA0hfzbXzCEC3M9oQlOU=
github.com/nodeset-org/rocketpool-smartnode/v2 v2.0.0-olddev.0.20240729151944-127e460038df h1:6QxnKZQMlkPD33l1Q1dOhg1cHgr4kl0t/P/0JTf1BzU=
github.com/nodeset-org/rocketpool-smartnode/v2 v2.0.0-olddev.0.20240729151944-127e460038df/go.mod h1:7YhZ9H66Y3wKVX6he8ljqBeex3fgPTumyfgqsBdKbBU=
github.com/nwaples/rardecode/v2 v2.0.0-beta.2 h1:e3mzJFJs4k83GXBEiTaQ5HgSc/kOK8q0rDaRO0MPaOk=
Expand Down
11 changes: 11 additions & 0 deletions hyperdrive-cli/commands/service/daemon-logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func daemonLogs(c *cli.Context, serviceNames ...string) error {

// Get the module log file arg names => log file names
moduleLogLookup := map[string]string{}
argNames := []string{"api", "tasks"}
for _, mod := range cfg.GetAllModuleConfigs() {
modName := mod.GetModuleName()
shortModName := mod.GetShortName()
Expand All @@ -41,9 +42,19 @@ func daemonLogs(c *cli.Context, serviceNames ...string) error {
argName := shortModName + "-" + strings.TrimSuffix(logFileName, ext)
absLogFilePath := cfg.Hyperdrive.GetModuleLogFilePath(modName, logFileName)
moduleLogLookup[argName] = absLogFilePath
argNames = append(argNames, argName)
}
}

// Print available options if there are no service names
if len(serviceNames) == 0 {
fmt.Println("Available service logs:")
for _, name := range argNames {
fmt.Println("\t" + name)
}
return nil
}

// TODO: Get log paths from service names
logPaths := []string{}
for _, service := range serviceNames {
Expand Down
4 changes: 4 additions & 0 deletions install/packages/debian/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
hyperdrive (1.1.0~b2) UNRELEASED; urgency=medium

* The StakeWise module now functions correctly again.
* `hyperdrive service install` now works properly when upgrading from v1.0.1 to v1.1.0.
* `hyperdrive cs n r` now verifies that your node has been registered with your nodeset.io account before attempting to register with Constellation.
* The `service stats` command has been deprecated; for people that wanted to track container stats, we recommend just running `docker stats -a` instead.
* Calling `service daemon-logs` without any further arguments will now print the list of logs you can pass into the call.

-- NodeSet Inc. <[email protected]> Thu, 26 Sep 2024 20:23:47 +0000

Expand Down

0 comments on commit 7094a27

Please sign in to comment.