Skip to content

Commit d85a925

Browse files
authored
Merge pull request #2478 from threefoldtech/add-current-version-to-logs
add current zos version to zos logs on upgrades
2 parents f3dade9 + e7b3252 commit d85a925

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

pkg/upgrade/upgrade.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ func (u *Upgrader) Version() semver.Version {
231231
func (u *Upgrader) nextUpdate() time.Duration {
232232
jitter := rand.Intn(checkJitter)
233233
next := checkForUpdateEvery + (time.Duration(jitter) * time.Minute)
234-
log.Info().Str("after", next.String()).Msg("checking for update after")
234+
log.Info().Str("after", next.String()).Msg("checking for update")
235235
return next
236236
}
237237

@@ -295,7 +295,7 @@ func (u *Upgrader) update() error {
295295
}
296296
}
297297

298-
log.Info().Str("version", filepath.Base(remote.Target)).Msg("updating system...")
298+
log.Info().Str("running version", u.Version().String()).Str("updating to version", filepath.Base(remote.Target)).Msg("updating system...")
299299
if err := u.updateTo(remote, &current); err != nil {
300300
return errors.Wrapf(err, "failed to update to new tag '%s'", remote.Target)
301301
}
@@ -436,9 +436,11 @@ func newInMemoryCache() (*inMemoryCache, error) {
436436
func (c *inMemoryCache) flistCache() string {
437437
return c.flist
438438
}
439+
439440
func (c *inMemoryCache) fileCache() string {
440441
return c.file
441442
}
443+
442444
func (c *inMemoryCache) clean() {
443445
os.RemoveAll(c.root)
444446
}

0 commit comments

Comments
 (0)