nodeup: include underlying error in error message

This commit is contained in:
André Carvalho 2018-12-28 17:26:01 -02:00
parent 7af77bb79c
commit 2f273d6e35
1 changed files with 2 additions and 3 deletions

View File

@ -26,12 +26,11 @@ import (
"strings"
"time"
"github.com/golang/glog"
"k8s.io/kops/upup/pkg/fi"
"k8s.io/kops/upup/pkg/fi/nodeup/cloudinit"
"k8s.io/kops/upup/pkg/fi/nodeup/local"
"k8s.io/kops/upup/pkg/fi/nodeup/tags"
"github.com/golang/glog"
)
const (
@ -328,7 +327,7 @@ func (_ *Service) RenderLocal(t *local.LocalTarget, a, e, changes *Service) erro
} else {
startedAtTime, err := time.Parse("Mon 2006-01-02 15:04:05 MST", startedAt)
if err != nil {
return fmt.Errorf("unable to parse service ExecMainStartTimestamp: %q", startedAt)
return fmt.Errorf("unable to parse service ExecMainStartTimestamp %q: %v", startedAt, err)
}
if startedAtTime.Before(newest) {
glog.V(2).Infof("will restart service %q because dependency changed after service start", serviceName)