Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1715 from endocode/dongsu/fleetctl-fix-err-msg
Browse files Browse the repository at this point in the history
fleetctl: remove unnecessary error messages
  • Loading branch information
Dongsu Park committed Dec 7, 2016
2 parents 6bc1478 + c5985b9 commit be0c3c2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions fleetctl/fleetctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -1059,9 +1059,8 @@ func assertUnitState(name string, js job.JobState, out io.Writer) bool {
fmt.Fprintln(out, msg)
return nil
}
timeout, err := waitForState(fetchUnitState)
_, err := waitForState(fetchUnitState)
if err != nil {
log.Errorf("Failed to find unit %s within %v, err: %v", name, timeout, err)
return false
}

Expand Down Expand Up @@ -1237,13 +1236,13 @@ func waitForState(stateCheckFunc func() error) (time.Duration, error) {
for {
select {
case <-alarm:
return timeout, fmt.Errorf("Failed to fetch systemd active states within %v", timeout)
return timeout, fmt.Errorf("Failed to fetch states within %v", timeout)
case <-ticker:
err := stateCheckFunc()
if err == nil {
return timeout, nil
}
log.Debug("Retrying assertion of systemd active states. err: %v", err)
log.Debugf("Retrying assertion of states. err: %v", err)
}
}
}

0 comments on commit be0c3c2

Please sign in to comment.