Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add some logs on the update #10036

Merged
merged 4 commits into from
Sep 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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