Skip to content

Commit

Permalink
fix: add some logs on the update (#10036)
Browse files Browse the repository at this point in the history
* add some logs on the update

* changelog update
  • Loading branch information
jgimeno authored Sep 2, 2021
1 parent 5cf2dae commit ddabfd3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions cosmovisor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions cosmovisor/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 2 additions & 0 deletions cosmovisor/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ddabfd3

Please sign in to comment.