From ddabfd36c6b7397f4837cbaf60964d7c5bd95cd2 Mon Sep 17 00:00:00 2001 From: Jonathan Gimeno Date: Thu, 2 Sep 2021 17:38:07 +0200 Subject: [PATCH] fix: add some logs on the update (#10036) * add some logs on the update * changelog update --- cosmovisor/CHANGELOG.md | 1 + cosmovisor/process.go | 1 + cosmovisor/upgrade.go | 2 ++ 3 files changed, 4 insertions(+) diff --git a/cosmovisor/CHANGELOG.md b/cosmovisor/CHANGELOG.md index 97ae18eabf58..2064bfd93bbb 100644 --- a/cosmovisor/CHANGELOG.md +++ b/cosmovisor/CHANGELOG.md @@ -44,6 +44,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements + [\#10018](https://github.com/cosmos/cosmos-sdk/pull/10018) Strict boolean argument parsing: cosmovisor will fail if user will not set correctly a boolean variable. Correct values are: "true", "false", "" (not setting) - all case not sensitive. ++ [\#10036](https://github.com/cosmos/cosmos-sdk/pull/10036) Improve logs when downloading the binary. ## v0.1 2021-08-06 diff --git a/cosmovisor/process.go b/cosmovisor/process.go index 98e0b9ef5ee6..3059db9863fd 100644 --- a/cosmovisor/process.go +++ b/cosmovisor/process.go @@ -84,6 +84,7 @@ func (l Launcher) WaitForUpgradeOrExit(cmd *exec.Cmd) (bool, error) { select { case <-l.fw.MonitorUpdate(currentUpgrade): // upgrade - kill the process and restart + fmt.Println("[cosmovisor] Daemon shutting down in an attempt to restart") _ = cmd.Process.Kill() case err := <-cmdDone: l.fw.Stop() diff --git a/cosmovisor/upgrade.go b/cosmovisor/upgrade.go index f8000fdf9337..8ea5e91c6bb6 100644 --- a/cosmovisor/upgrade.go +++ b/cosmovisor/upgrade.go @@ -36,9 +36,11 @@ func DoUpgrade(cfg *Config, info UpgradeInfo) error { } // If not there, then we try to download it... maybe + fmt.Println("[cosmovisor] No upgrade binary found, beginning to download it") if err := DownloadBinary(cfg, info); err != nil { return fmt.Errorf("cannot download binary. %w", err) } + fmt.Println("[cosmovisor] Downloading binary complete") // and then set the binary again if err := EnsureBinary(cfg.UpgradeBin(info.Name)); err != nil {