diff --git a/pkg/cvo/sync_worker.go b/pkg/cvo/sync_worker.go index fe4c16283..b06474eab 100644 --- a/pkg/cvo/sync_worker.go +++ b/pkg/cvo/sync_worker.go @@ -492,6 +492,7 @@ func (w *SyncWorker) syncOnce(ctx context.Context, work *SyncWork, maxWorkers in Reconciling: work.State.Reconciling(), Actual: update, }) + klog.Infof("RetrievePayload %v", err) return err } @@ -506,6 +507,7 @@ func (w *SyncWorker) syncOnce(ctx context.Context, work *SyncWork, maxWorkers in Actual: update, Verified: info.Verified, }) + klog.Infof("VerifyPayload %v", err) return err } payloadUpdate.VerifiedImage = info.Verified @@ -526,6 +528,7 @@ func (w *SyncWorker) syncOnce(ctx context.Context, work *SyncWork, maxWorkers in Verified: info.Verified, }) if err := precondition.Summarize(w.preconditions.RunAll(ctx, precondition.ReleaseContext{DesiredVersion: payloadUpdate.ReleaseVersion})); err != nil { + klog.Infof("precondition error %v", err) if update.Force { klog.V(4).Infof("Forcing past precondition failures: %s", err) } else { @@ -538,6 +541,7 @@ func (w *SyncWorker) syncOnce(ctx context.Context, work *SyncWork, maxWorkers in Actual: update, Verified: info.Verified, }) + klog.Infof("PreconditionChecks %v", err) return err } } @@ -642,35 +646,37 @@ func (w *SyncWorker) apply(ctx context.Context, payloadUpdate *payload.Update, w }) } - // update each object - errs := payload.RunGraph(ctx, graph, maxWorkers, func(ctx context.Context, tasks []*payload.Task) error { - for _, task := range tasks { - if contextIsCancelled(ctx) { - return cr.CancelError() - } - cr.Update() + /* + // update each object + errs := payload.RunGraph(ctx, graph, maxWorkers, func(ctx context.Context, tasks []*payload.Task) error { + for _, task := range tasks { + if contextIsCancelled(ctx) { + return cr.CancelError() + } + cr.Update() - klog.V(4).Infof("Running sync for %s", task) - klog.V(5).Infof("Manifest: %s", string(task.Manifest.Raw)) + klog.V(4).Infof("Running sync for %s", task) + klog.V(5).Infof("Manifest: %s", string(task.Manifest.Raw)) - ov, ok := getOverrideForManifest(work.Overrides, w.exclude, task.Manifest) - if ok && ov.Unmanaged { - klog.V(4).Infof("Skipping %s as unmanaged", task) - continue - } + ov, ok := getOverrideForManifest(work.Overrides, w.exclude, task.Manifest) + if ok && ov.Unmanaged { + klog.V(4).Infof("Skipping %s as unmanaged", task) + continue + } - if err := task.Run(ctx, version, w.builder, work.State); err != nil { - return err + if err := task.Run(ctx, version, w.builder, work.State); err != nil { + return err + } + cr.Inc() + klog.V(4).Infof("Done syncing for %s", task) } - cr.Inc() - klog.V(4).Infof("Done syncing for %s", task) + return nil + }) + if len(errs) > 0 { + err := cr.Errors(errs) + return err } - return nil - }) - if len(errs) > 0 { - err := cr.Errors(errs) - return err - } + */ // update the status cr.Complete() diff --git a/pkg/cvo/upgradeable.go b/pkg/cvo/upgradeable.go index 1ece7bcb5..d0b368d27 100644 --- a/pkg/cvo/upgradeable.go +++ b/pkg/cvo/upgradeable.go @@ -27,6 +27,8 @@ func (optr *Operator) syncUpgradeable(config *configv1.ClusterVersion) error { if u != nil && u.RecentlyChanged(optr.minimumUpdateCheckInterval) { klog.V(4).Infof("Upgradeable conditions were recently checked, will try later.") return nil + } else { + klog.Infof("Checking upgradeable conditions.") } now := metav1.Now() @@ -181,6 +183,7 @@ func (check *clusterOperatorsUpgradeable) Check() *configv1.ClusterOperatorStatu } cond.Reason = reason cond.Message = msg + klog.Infof("%s", msg) return cond } diff --git a/pkg/payload/precondition/clusterversion/upgradeable.go b/pkg/payload/precondition/clusterversion/upgradeable.go index 73f40319b..588d1c685 100644 --- a/pkg/payload/precondition/clusterversion/upgradeable.go +++ b/pkg/payload/precondition/clusterversion/upgradeable.go @@ -44,6 +44,7 @@ func (pf *Upgradeable) Run(ctx context.Context, releaseContext precondition.Rele Name: pf.Name(), } } + klog.Infof("pf.Name(): %s", pf.Name()) // if we are upgradeable==true we can always upgrade up := resourcemerge.FindOperatorStatusCondition(cv.Status.Conditions, configv1.OperatorUpgradeable) @@ -51,6 +52,7 @@ func (pf *Upgradeable) Run(ctx context.Context, releaseContext precondition.Rele klog.V(4).Infof("Precondition %s passed: no Upgradeable condition on ClusterVersion.", pf.Name()) return nil } + klog.Infof("Status: %s", up.Status) if up.Status != configv1.ConditionFalse { klog.V(4).Infof("Precondition %s passed: Upgradeable %s since %v: %s: %s", pf.Name(), up.Status, up.LastTransitionTime, up.Reason, up.Message) return nil @@ -63,16 +65,16 @@ func (pf *Upgradeable) Run(ctx context.Context, releaseContext precondition.Rele } // only perform minor version check if upgradeable is not false - if up.Status != configv1.ConditionFalse { - currentMinor := getEffectiveMinor(cv.Status.History[0].Version) - desiredMinor := getEffectiveMinor(releaseContext.DesiredVersion) + //if up.Status != configv1.ConditionFalse { + currentMinor := getEffectiveMinor(cv.Status.History[0].Version) + desiredMinor := getEffectiveMinor(releaseContext.DesiredVersion) - // if there is no difference in the minor version (4.y.z where 4.y is the same for current and desired), then we can still upgrade - if currentMinor == desiredMinor { - klog.V(4).Infof("Precondition %q passed: minor from the current %s matches minor from the target %s (both %s).", pf.Name(), cv.Status.History[0].Version, releaseContext.DesiredVersion, currentMinor) - return nil - } + // if there is no difference in the minor version (4.y.z where 4.y is the same for current and desired), then we can still upgrade + if currentMinor == desiredMinor { + klog.V(4).Infof("Precondition %q passed: minor from the current %s matches minor from the target %s (both %s).", pf.Name(), cv.Status.History[0].Version, releaseContext.DesiredVersion, currentMinor) + return nil } + //} return &precondition.Error{ Nested: err, diff --git a/pkg/payload/precondition/precondition.go b/pkg/payload/precondition/precondition.go index a52e63707..258526192 100644 --- a/pkg/payload/precondition/precondition.go +++ b/pkg/payload/precondition/precondition.go @@ -55,6 +55,7 @@ type List []Precondition func (pfList List) RunAll(ctx context.Context, releaseContext ReleaseContext) []error { var errs []error for _, pf := range pfList { + klog.Infof("Running precondition %q", pf.Name()) if err := pf.Run(ctx, releaseContext); err != nil { klog.Errorf("Precondition %q failed: %v", pf.Name(), err) errs = append(errs, err)