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

Commit be0c3c2

Browse files
author
Dongsu Park
committed
Merge pull request #1715 from endocode/dongsu/fleetctl-fix-err-msg
fleetctl: remove unnecessary error messages
2 parents 6bc1478 + c5985b9 commit be0c3c2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

fleetctl/fleetctl.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,9 +1059,8 @@ func assertUnitState(name string, js job.JobState, out io.Writer) bool {
10591059
fmt.Fprintln(out, msg)
10601060
return nil
10611061
}
1062-
timeout, err := waitForState(fetchUnitState)
1062+
_, err := waitForState(fetchUnitState)
10631063
if err != nil {
1064-
log.Errorf("Failed to find unit %s within %v, err: %v", name, timeout, err)
10651064
return false
10661065
}
10671066

@@ -1237,13 +1236,13 @@ func waitForState(stateCheckFunc func() error) (time.Duration, error) {
12371236
for {
12381237
select {
12391238
case <-alarm:
1240-
return timeout, fmt.Errorf("Failed to fetch systemd active states within %v", timeout)
1239+
return timeout, fmt.Errorf("Failed to fetch states within %v", timeout)
12411240
case <-ticker:
12421241
err := stateCheckFunc()
12431242
if err == nil {
12441243
return timeout, nil
12451244
}
1246-
log.Debug("Retrying assertion of systemd active states. err: %v", err)
1245+
log.Debugf("Retrying assertion of states. err: %v", err)
12471246
}
12481247
}
12491248
}

0 commit comments

Comments
 (0)