diff --git a/bootstrap/bootstrap-pod.yaml b/bootstrap/bootstrap-pod.yaml index dcc113497..6a84dc6b0 100644 --- a/bootstrap/bootstrap-pod.yaml +++ b/bootstrap/bootstrap-pod.yaml @@ -16,7 +16,7 @@ spec: - "--enable-auto-update=false" - "--enable-default-cluster-version=false" - "--listen=" - - "--v=5" + - "--v=2" - "--kubeconfig=/etc/kubernetes/kubeconfig" securityContext: privileged: true diff --git a/install/0000_00_cluster-version-operator_03_deployment.yaml b/install/0000_00_cluster-version-operator_03_deployment.yaml index 470e379e3..df06871e2 100644 --- a/install/0000_00_cluster-version-operator_03_deployment.yaml +++ b/install/0000_00_cluster-version-operator_03_deployment.yaml @@ -36,7 +36,7 @@ spec: - "--listen=0.0.0.0:9099" - "--serving-cert-file=/etc/tls/serving-cert/tls.crt" - "--serving-key-file=/etc/tls/serving-cert/tls.key" - - "--v=5" + - "--v=2" resources: requests: cpu: 20m diff --git a/lib/resourcebuilder/batch.go b/lib/resourcebuilder/batch.go index 5a58e0c28..187eb1485 100644 --- a/lib/resourcebuilder/batch.go +++ b/lib/resourcebuilder/batch.go @@ -18,7 +18,7 @@ func WaitForJobCompletion(ctx context.Context, client batchclientv1.JobsGetter, klog.Error(err) return false, nil } else if !done { - klog.V(4).Infof("Job %s in namespace %s is not ready, continuing to wait.", job.ObjectMeta.Name, job.ObjectMeta.Namespace) + klog.V(2).Infof("Job %s in namespace %s is not ready, continuing to wait.", job.ObjectMeta.Name, job.ObjectMeta.Namespace) return false, nil } return true, nil diff --git a/pkg/autoupdate/autoupdate.go b/pkg/autoupdate/autoupdate.go index af59adc85..d3c7acc25 100644 --- a/pkg/autoupdate/autoupdate.go +++ b/pkg/autoupdate/autoupdate.go @@ -149,9 +149,9 @@ func (ctrl *Controller) handleErr(err error, key interface{}) { func (ctrl *Controller) sync(ctx context.Context, key string) error { startTime := time.Now() - klog.V(4).Infof("Started syncing auto-updates %q (%v)", key, startTime) + klog.V(2).Infof("Started syncing auto-updates %q (%v)", key, startTime) defer func() { - klog.V(4).Infof("Finished syncing auto-updates %q (%v)", key, time.Since(startTime)) + klog.V(2).Infof("Finished syncing auto-updates %q (%v)", key, time.Since(startTime)) }() clusterversion, err := ctrl.cvLister.Get(ctrl.name) diff --git a/pkg/cincinnati/cincinnati.go b/pkg/cincinnati/cincinnati.go index 07f97a367..31324e5ef 100644 --- a/pkg/cincinnati/cincinnati.go +++ b/pkg/cincinnati/cincinnati.go @@ -80,16 +80,16 @@ func (c Client) GetUpdates(ctx context.Context, uri *url.URL, arch string, chann req.Header.Add("Accept", GraphMediaType) if c.transport != nil && c.transport.TLSClientConfig != nil { if c.transport.TLSClientConfig.ClientCAs == nil { - klog.V(5).Infof("Using a root CA pool with 0 root CA subjects to request updates from %s", uri) + klog.V(2).Infof("Using a root CA pool with 0 root CA subjects to request updates from %s", uri) } else { - klog.V(5).Infof("Using a root CA pool with %n root CA subjects to request updates from %s", len(c.transport.TLSClientConfig.RootCAs.Subjects()), uri) + klog.V(2).Infof("Using a root CA pool with %n root CA subjects to request updates from %s", len(c.transport.TLSClientConfig.RootCAs.Subjects()), uri) } } if c.transport != nil && c.transport.Proxy != nil { proxy, err := c.transport.Proxy(req) if err == nil && proxy != nil { - klog.V(5).Infof("Using proxy %s to request updates from %s", proxy.Host, uri) + klog.V(2).Infof("Using proxy %s to request updates from %s", proxy.Host, uri) } } diff --git a/pkg/cvo/availableupdates.go b/pkg/cvo/availableupdates.go index 049e99c16..d794c4f52 100644 --- a/pkg/cvo/availableupdates.go +++ b/pkg/cvo/availableupdates.go @@ -39,7 +39,7 @@ func (optr *Operator) syncAvailableUpdates(ctx context.Context, config *configv1 // updates are only checked at most once per minimumUpdateCheckInterval or if the generation changes u := optr.getAvailableUpdates() if u != nil && u.Upstream == upstream && u.Channel == channel && u.RecentlyChanged(optr.minimumUpdateCheckInterval) { - klog.V(4).Infof("Available updates were recently retrieved, will try later.") + klog.V(2).Infof("Available updates were recently retrieved, will try later.") return nil } diff --git a/pkg/cvo/cvo.go b/pkg/cvo/cvo.go index 07703ef2c..b9298973f 100644 --- a/pkg/cvo/cvo.go +++ b/pkg/cvo/cvo.go @@ -478,9 +478,9 @@ func handleErr(ctx context.Context, queue workqueue.RateLimitingInterface, err e // It returns an error if it could not update the cluster version object. func (optr *Operator) sync(ctx context.Context, key string) error { startTime := time.Now() - klog.V(4).Infof("Started syncing cluster version %q (%v)", key, startTime) + klog.V(2).Infof("Started syncing cluster version %q (%v)", key, startTime) defer func() { - klog.V(4).Infof("Finished syncing cluster version %q (%v)", key, time.Since(startTime)) + klog.V(2).Infof("Finished syncing cluster version %q (%v)", key, time.Since(startTime)) }() // ensure the cluster version exists, that the object is valid, and that @@ -490,11 +490,11 @@ func (optr *Operator) sync(ctx context.Context, key string) error { return err } if changed { - klog.V(4).Infof("Cluster version changed, waiting for newer event") + klog.V(2).Infof("Cluster version changed, waiting for newer event") return nil } if original == nil { - klog.V(4).Infof("No ClusterVersion object and defaulting not enabled, waiting for one") + klog.V(2).Infof("No ClusterVersion object and defaulting not enabled, waiting for one") return nil } @@ -507,14 +507,14 @@ func (optr *Operator) sync(ctx context.Context, key string) error { // identify the desired next version desired, ok := findUpdateFromConfig(config) if ok { - klog.V(4).Infof("Desired version from spec is %#v", desired) + klog.V(2).Infof("Desired version from spec is %#v", desired) } else { currentVersion := optr.currentVersion() desired = configv1.Update{ Version: currentVersion.Version, Image: currentVersion.Image, } - klog.V(4).Infof("Desired version from operator is %#v", desired) + klog.V(2).Infof("Desired version from operator is %#v", desired) } // handle the case of a misconfigured CVO by doing nothing @@ -549,9 +549,9 @@ func (optr *Operator) sync(ctx context.Context, key string) error { // sync available updates. It only modifies cluster version. func (optr *Operator) availableUpdatesSync(ctx context.Context, key string) error { startTime := time.Now() - klog.V(4).Infof("Started syncing available updates %q (%v)", key, startTime) + klog.V(2).Infof("Started syncing available updates %q (%v)", key, startTime) defer func() { - klog.V(4).Infof("Finished syncing available updates %q (%v)", key, time.Since(startTime)) + klog.V(2).Infof("Finished syncing available updates %q (%v)", key, time.Since(startTime)) }() config, err := optr.cvLister.Get(optr.name) @@ -571,9 +571,9 @@ func (optr *Operator) availableUpdatesSync(ctx context.Context, key string) erro // sync upgradeableCondition. It only modifies cluster version. func (optr *Operator) upgradeableSync(ctx context.Context, key string) error { startTime := time.Now() - klog.V(4).Infof("Started syncing upgradeable %q (%v)", key, startTime) + klog.V(2).Infof("Started syncing upgradeable %q (%v)", key, startTime) defer func() { - klog.V(4).Infof("Finished syncing upgradeable %q (%v)", key, time.Since(startTime)) + klog.V(2).Infof("Finished syncing upgradeable %q (%v)", key, time.Since(startTime)) }() config, err := optr.cvLister.Get(optr.name) diff --git a/pkg/cvo/cvo_test.go b/pkg/cvo/cvo_test.go index b6427b8c0..dad91abb5 100644 --- a/pkg/cvo/cvo_test.go +++ b/pkg/cvo/cvo_test.go @@ -4099,7 +4099,7 @@ func fakeClientsetWithUpdates(obj *configv1.ClusterVersion) *fake.Clientset { obj.Status = update.Status rv, _ := strconv.Atoi(update.ResourceVersion) obj.ResourceVersion = strconv.Itoa(rv + 1) - klog.V(5).Infof("updated object to %#v", obj) + klog.V(2).Infof("updated object to %#v", obj) return true, obj.DeepCopy(), nil } return false, nil, fmt.Errorf("unrecognized") diff --git a/pkg/cvo/metrics.go b/pkg/cvo/metrics.go index b63bc5dd6..4fb0dff46 100644 --- a/pkg/cvo/metrics.go +++ b/pkg/cvo/metrics.go @@ -323,7 +323,7 @@ func (m *operatorMetrics) Collect(ch chan<- prometheus.Metric) { for _, condition := range cv.Status.Conditions { if condition.Status != configv1.ConditionFalse && condition.Status != configv1.ConditionTrue { - klog.V(4).Infof("skipping metrics for ClusterVersion condition %s=%s (neither True nor False)", condition.Type, condition.Status) + klog.V(2).Infof("skipping metrics for ClusterVersion condition %s=%s (neither True nor False)", condition.Type, condition.Status) continue } g := m.clusterOperatorConditions.WithLabelValues("version", string(condition.Type), string(condition.Reason)) @@ -355,7 +355,7 @@ func (m *operatorMetrics) Collect(ch chan<- prometheus.Metric) { } } if version == "" { - klog.V(4).Infof("ClusterOperator %s is not setting the 'operator' version", op.Name) + klog.V(2).Infof("ClusterOperator %s is not setting the 'operator' version", op.Name) } g := m.clusterOperatorUp.WithLabelValues(op.Name, version) if resourcemerge.IsOperatorStatusConditionTrue(op.Status.Conditions, configv1.OperatorAvailable) { @@ -366,7 +366,7 @@ func (m *operatorMetrics) Collect(ch chan<- prometheus.Metric) { ch <- g for _, condition := range op.Status.Conditions { if condition.Status != configv1.ConditionFalse && condition.Status != configv1.ConditionTrue { - klog.V(4).Infof("skipping metrics for %s ClusterOperator condition %s=%s (neither True nor False)", op.Name, condition.Type, condition.Status) + klog.V(2).Infof("skipping metrics for %s ClusterOperator condition %s=%s (neither True nor False)", op.Name, condition.Type, condition.Status) continue } g := m.clusterOperatorConditions.WithLabelValues(op.Name, string(condition.Type), string(condition.Reason)) diff --git a/pkg/cvo/status.go b/pkg/cvo/status.go index e2b24dd9e..b96894edc 100644 --- a/pkg/cvo/status.go +++ b/pkg/cvo/status.go @@ -61,7 +61,7 @@ func mergeOperatorHistory(config *configv1.ClusterVersion, desired configv1.Rele } if len(config.Status.History) == 0 { - klog.V(5).Infof("initialize new history completed=%t desired=%#v", completed, desired) + klog.V(2).Infof("initialize new history completed=%t desired=%#v", completed, desired) config.Status.History = append(config.Status.History, configv1.UpdateHistory{ Version: desired.Version, Image: desired.Image, @@ -78,7 +78,7 @@ func mergeOperatorHistory(config *configv1.ClusterVersion, desired configv1.Rele } if mergeEqualVersions(last, desired) { - klog.V(5).Infof("merge into existing history completed=%t desired=%#v last=%#v", completed, desired, last) + klog.V(2).Infof("merge into existing history completed=%t desired=%#v last=%#v", completed, desired, last) if completed { last.State = configv1.CompletedUpdate if last.CompletionTime == nil { @@ -86,7 +86,7 @@ func mergeOperatorHistory(config *configv1.ClusterVersion, desired configv1.Rele } } } else { - klog.V(5).Infof("must add a new history entry completed=%t desired=%#v != last=%#v", completed, desired, last) + klog.V(2).Infof("must add a new history entry completed=%t desired=%#v != last=%#v", completed, desired, last) if last.CompletionTime == nil { last.CompletionTime = &now } @@ -115,7 +115,7 @@ func mergeOperatorHistory(config *configv1.ClusterVersion, desired configv1.Rele } // leave this here in case we find other future history bugs and need to debug it - if klog.V(5).Enabled() && len(config.Status.History) > 1 { + if klog.V(2).Enabled() && len(config.Status.History) > 1 { if config.Status.History[0].Image == config.Status.History[1].Image && config.Status.History[0].Version == config.Status.History[1].Version { data, _ := json.MarshalIndent(config.Status.History, "", " ") panic(fmt.Errorf("tried to update cluster version history to contain duplicate image entries: %s", string(data))) @@ -158,7 +158,7 @@ const ClusterVersionInvalid configv1.ClusterStatusConditionType = "Invalid" // syncStatus calculates the new status of the ClusterVersion based on the current sync state and any // validation errors found. We allow the caller to pass the original object to avoid DeepCopying twice. func (optr *Operator) syncStatus(ctx context.Context, original, config *configv1.ClusterVersion, status *SyncWorkerStatus, validationErrs field.ErrorList) error { - klog.V(5).Infof("Synchronizing errs=%#v status=%#v", validationErrs, status) + klog.V(2).Infof("Synchronizing errs=%#v status=%#v", validationErrs, status) cvUpdated := false // update the config with the latest available updates diff --git a/pkg/cvo/sync_worker.go b/pkg/cvo/sync_worker.go index 6c2d98fe0..54be9c68b 100644 --- a/pkg/cvo/sync_worker.go +++ b/pkg/cvo/sync_worker.go @@ -219,12 +219,12 @@ func (w *SyncWorker) Update(generation int64, desired configv1.Update, overrides } if work.Empty() { - klog.V(5).Info("Update work has no release image; ignoring requested change") + klog.V(2).Info("Update work has no release image; ignoring requested change") return w.status.DeepCopy() } if equalSyncWork(w.work, work, state) { - klog.V(5).Info("Update work is equal to current target; no change required") + klog.V(2).Info("Update work is equal to current target; no change required") return w.status.DeepCopy() } @@ -245,15 +245,15 @@ func (w *SyncWorker) Update(generation int64, desired configv1.Update, overrides // notify the sync loop that we changed config w.work = work if w.cancelFn != nil { - klog.V(5).Info("Cancel the sync worker's current loop") + klog.V(2).Info("Cancel the sync worker's current loop") w.cancelFn() w.cancelFn = nil } select { case w.notify <- struct{}{}: - klog.V(5).Info("Notify the sync worker that new work is available") + klog.V(2).Info("Notify the sync worker that new work is available") default: - klog.V(5).Info("The sync worker has already been notified that new work is available") + klog.V(2).Info("The sync worker has already been notified that new work is available") } return w.status.DeepCopy() @@ -263,7 +263,7 @@ func (w *SyncWorker) Update(generation int64, desired configv1.Update, overrides // It is edge-triggered when Update() is invoked and level-driven after the // syncOnce() has succeeded for a given input (we are said to be "reconciling"). func (w *SyncWorker) Start(ctx context.Context, maxWorkers int, cvoOptrName string, lister configlistersv1.ClusterVersionLister) { - klog.V(5).Infof("Starting sync worker") + klog.V(2).Infof("Starting sync worker") work := &SyncWork{} @@ -276,26 +276,26 @@ func (w *SyncWorker) Start(ctx context.Context, maxWorkers int, cvoOptrName stri waitingToReconcile := work.State == payload.ReconcilingPayload select { case <-ctx.Done(): - klog.V(5).Infof("Stopped worker") + klog.V(2).Infof("Stopped worker") return case <-next: waitingToReconcile = false - klog.V(5).Infof("Wait finished") + klog.V(2).Infof("Wait finished") case <-w.notify: - klog.V(5).Infof("Work updated") + klog.V(2).Infof("Work updated") } // determine whether we need to do work changed := w.calculateNext(work) if !changed && waitingToReconcile { - klog.V(5).Infof("No change, waiting") + klog.V(2).Infof("No change, waiting") continue } // until Update() has been called at least once, we do nothing if work.Empty() { next = time.After(w.minimumReconcileInterval) - klog.V(5).Infof("No work, waiting") + klog.V(2).Infof("No work, waiting") continue } @@ -334,7 +334,7 @@ func (w *SyncWorker) Start(ctx context.Context, maxWorkers int, cvoOptrName stri // reporter hides status updates that occur earlier than the previous failure, // so that we don't fail, then immediately start reporting an earlier status reporter := &statusWrapper{w: w, previousStatus: w.Status()} - klog.V(5).Infof("Previous sync status: %#v", reporter.previousStatus) + klog.V(2).Infof("Previous sync status: %#v", reporter.previousStatus) return w.syncOnce(ctx, work, maxWorkers, reporter, config) }() if err != nil { @@ -355,7 +355,7 @@ func (w *SyncWorker) Start(ctx context.Context, maxWorkers int, cvoOptrName stri continue } if work.State != payload.ReconcilingPayload { - klog.V(4).Infof("Sync succeeded, transitioning from %s to %s", work.State, payload.ReconcilingPayload) + klog.V(2).Infof("Sync succeeded, transitioning from %s to %s", work.State, payload.ReconcilingPayload) } work.Completed++ @@ -365,7 +365,7 @@ func (w *SyncWorker) Start(ctx context.Context, maxWorkers int, cvoOptrName stri } }, 10*time.Millisecond, ctx.Done()) - klog.V(5).Infof("Worker shut down") + klog.V(2).Infof("Worker shut down") } // statusWrapper prevents a newer status update from overwriting a previous @@ -388,7 +388,7 @@ func (w *statusWrapper) Report(status SyncWorkerStatus) { if p.Failure != nil && status.Failure == nil { if p.Actual.Image == status.Actual.Image { if fractionComplete < previousFractionComplete { - klog.V(5).Infof("Dropping status report from earlier in sync loop") + klog.V(2).Infof("Dropping status report from earlier in sync loop") return } } @@ -489,7 +489,7 @@ func equalSyncWork(a, b *SyncWork, state payload.State) bool { klog.Warningf("Ignoring detected %s during payload initialization", detected) return true } - klog.V(5).Infof("Detected %s", detected) + klog.V(2).Infof("Detected %s", detected) return false } return true @@ -538,7 +538,7 @@ func (w *SyncWorker) syncOnce(ctx context.Context, work *SyncWork, maxWorkers in Version: work.Desired.Version, Image: work.Desired.Image, } - klog.V(4).Infof("Running sync %s (force=%t) on generation %d in state %s at attempt %d", versionString(desired), work.Desired.Force, work.Generation, work.State, work.Attempt) + klog.V(2).Infof("Running sync %s (force=%t) on generation %d in state %s at attempt %d", versionString(desired), work.Desired.Force, work.Generation, work.State, work.Attempt) if work.Attempt == 0 { payload.InitCOUpdateStartTimes() @@ -550,7 +550,7 @@ func (w *SyncWorker) syncOnce(ctx context.Context, work *SyncWork, maxWorkers in // possibly complain here if Version, etc. diverges from the payload content desired = validPayload.Release } else if validPayload == nil || !equalUpdate(configv1.Update{Image: validPayload.Release.Image}, configv1.Update{Image: desired.Image}) { - klog.V(4).Infof("Loading payload") + klog.V(2).Infof("Loading payload") cvoObjectRef := &corev1.ObjectReference{APIVersion: "config.openshift.io/v1", Kind: "ClusterVersion", Name: "version", Namespace: "openshift-cluster-version"} w.eventRecorder.Eventf(cvoObjectRef, corev1.EventTypeNormal, "RetrievePayload", "retrieving payload version=%q image=%q", desired.Version, desired.Image) reporter.Report(SyncWorkerStatus{ @@ -613,9 +613,9 @@ func (w *SyncWorker) syncOnce(ctx context.Context, work *SyncWork, maxWorkers in // need to make sure the payload is only set when the preconditions have been successful if len(w.preconditions) == 0 { - klog.V(4).Info("No preconditions configured.") + klog.V(2).Info("No preconditions configured.") } else if info.Local { - klog.V(4).Info("Skipping preconditions for a local operator image payload.") + klog.V(2).Info("Skipping preconditions for a local operator image payload.") } else { reporter.Report(SyncWorkerStatus{ Generation: work.Generation, @@ -627,7 +627,7 @@ func (w *SyncWorker) syncOnce(ctx context.Context, work *SyncWork, maxWorkers in }) if err := precondition.Summarize(w.preconditions.RunAll(ctx, precondition.ReleaseContext{DesiredVersion: payloadUpdate.Release.Version}, clusterVersion)); err != nil { if work.Desired.Force { - klog.V(4).Infof("Forcing past precondition failures: %s", err) + klog.V(2).Infof("Forcing past precondition failures: %s", err) w.eventRecorder.Eventf(cvoObjectRef, corev1.EventTypeWarning, "PreconditionsForced", "preconditions forced for payload loaded version=%q image=%q failures=%v", desired.Version, desired.Image, err) } else { w.eventRecorder.Eventf(cvoObjectRef, corev1.EventTypeWarning, "PreconditionsFailed", "preconditions failed for payload loaded version=%q image=%q failures=%v", desired.Version, desired.Image, err) @@ -648,7 +648,7 @@ func (w *SyncWorker) syncOnce(ctx context.Context, work *SyncWork, maxWorkers in w.payload = payloadUpdate w.eventRecorder.Eventf(cvoObjectRef, corev1.EventTypeNormal, "PayloadLoaded", "payload loaded version=%q image=%q", desired.Version, desired.Image) - klog.V(4).Infof("Payload loaded from %s with hash %s", desired.Image, payloadUpdate.ManifestHash) + klog.V(2).Infof("Payload loaded from %s with hash %s", desired.Image, payloadUpdate.ManifestHash) } return w.apply(ctx, w.payload, work, maxWorkers, reporter) @@ -732,14 +732,14 @@ func (w *SyncWorker) apply(ctx context.Context, payloadUpdate *payload.Update, w } ov, ok := getOverrideForManifest(work.Overrides, task.Manifest) if ok && ov.Unmanaged { - klog.V(4).Infof("Skipping precreation of %s as unmanaged", task) + klog.V(2).Infof("Skipping precreation of %s as unmanaged", task) continue } if err := w.builder.Apply(ctx, task.Manifest, payload.PrecreatingPayload); err != nil { klog.V(2).Infof("Unable to precreate resource %s: %v", task, err) continue } - klog.V(4).Infof("Precreated resource %s", task) + klog.V(2).Infof("Precreated resource %s", task) } } @@ -749,11 +749,11 @@ func (w *SyncWorker) apply(ctx context.Context, payloadUpdate *payload.Update, w } cr.Update() - klog.V(4).Infof("Running sync for %s", task) + klog.V(2).Infof("Running sync for %s", task) ov, ok := getOverrideForManifest(work.Overrides, task.Manifest) if ok && ov.Unmanaged { - klog.V(4).Infof("Skipping %s as unmanaged", task) + klog.V(2).Infof("Skipping %s as unmanaged", task) continue } @@ -761,7 +761,7 @@ func (w *SyncWorker) apply(ctx context.Context, payloadUpdate *payload.Update, w return err } cr.Inc() - klog.V(4).Infof("Done syncing for %s", task) + klog.V(2).Infof("Done syncing for %s", task) } return nil }) @@ -905,7 +905,7 @@ func summarizeTaskGraphErrors(errs []error) error { // server err := errors.FilterOut(errors.NewAggregate(errs), isContextError) if err == nil { - klog.V(4).Infof("All errors were context errors: %v", errs) + klog.V(2).Infof("All errors were context errors: %v", errs) return nil } agg, ok := err.(errors.Aggregate) @@ -916,7 +916,7 @@ func summarizeTaskGraphErrors(errs []error) error { } // log the errors to assist in debugging future summarization - if klog.V(4).Enabled() { + if klog.V(2).Enabled() { klog.Infof("Summarizing %d errors", len(errs)) for _, err := range errs { if uErr, ok := err.(*payload.UpdateError); ok { diff --git a/pkg/cvo/updatepayload.go b/pkg/cvo/updatepayload.go index 33c88252a..a841bc463 100644 --- a/pkg/cvo/updatepayload.go +++ b/pkg/cvo/updatepayload.go @@ -98,7 +98,7 @@ func (r *payloadRetriever) RetrievePayload(ctx context.Context, update configv1. if deadline, deadlineSet := ctx.Deadline(); deadlineSet { timeout = time.Until(deadline) / 2 } - klog.V(4).Infof("Forced update so reducing payload signature verification timeout to %s", timeout) + klog.V(2).Infof("Forced update so reducing payload signature verification timeout to %s", timeout) var cancel context.CancelFunc verifyCtx, cancel = context.WithTimeout(ctx, timeout) defer cancel() diff --git a/pkg/cvo/upgradeable.go b/pkg/cvo/upgradeable.go index ae44b5500..d9b57705a 100644 --- a/pkg/cvo/upgradeable.go +++ b/pkg/cvo/upgradeable.go @@ -38,7 +38,7 @@ func (optr *Operator) syncUpgradeable() error { // updates are only checked at most once per minimumUpdateCheckInterval or if the generation changes u := optr.getUpgradeable() if u != nil && u.RecentlyChanged(optr.minimumUpdateCheckInterval) { - klog.V(4).Infof("Upgradeable conditions were recently checked, will try later.") + klog.V(2).Infof("Upgradeable conditions were recently checked, will try later.") return nil } optr.setUpgradeableConditions() @@ -379,7 +379,7 @@ func (optr *Operator) defaultUpgradeableChecks() []upgradeableCheck { func (optr *Operator) addFunc(obj interface{}) { cm := obj.(*corev1.ConfigMap) if cm.Name == internal.AdminGatesConfigMap || cm.Name == internal.AdminAcksConfigMap { - klog.V(4).Infof("ConfigMap %s/%s added.", cm.Namespace, cm.Name) + klog.V(2).Infof("ConfigMap %s/%s added.", cm.Namespace, cm.Name) optr.setUpgradeableConditions() } } @@ -389,7 +389,7 @@ func (optr *Operator) updateFunc(oldObj, newObj interface{}) { if cm.Name == internal.AdminGatesConfigMap || cm.Name == internal.AdminAcksConfigMap { oldCm := oldObj.(*corev1.ConfigMap) if !equality.Semantic.DeepEqual(cm, oldCm) { - klog.V(4).Infof("ConfigMap %s/%s updated.", cm.Namespace, cm.Name) + klog.V(2).Infof("ConfigMap %s/%s updated.", cm.Namespace, cm.Name) optr.setUpgradeableConditions() } } @@ -398,7 +398,7 @@ func (optr *Operator) updateFunc(oldObj, newObj interface{}) { func (optr *Operator) deleteFunc(obj interface{}) { cm := obj.(*corev1.ConfigMap) if cm.Name == internal.AdminGatesConfigMap || cm.Name == internal.AdminAcksConfigMap { - klog.V(4).Infof("ConfigMap %s/%s deleted.", cm.Namespace, cm.Name) + klog.V(2).Infof("ConfigMap %s/%s deleted.", cm.Namespace, cm.Name) optr.setUpgradeableConditions() } } diff --git a/pkg/payload/payload.go b/pkg/payload/payload.go index d4b458ced..3590bb406 100644 --- a/pkg/payload/payload.go +++ b/pkg/payload/payload.go @@ -257,7 +257,7 @@ type payloadTasks struct { } func loadUpdatePayloadMetadata(dir, releaseImage, clusterProfile string) (*Update, []payloadTasks, error) { - klog.V(4).Infof("Loading updatepayload from %q", dir) + klog.V(2).Infof("Loading updatepayload from %q", dir) if err := ValidateDirectory(dir); err != nil { return nil, nil, err } diff --git a/pkg/payload/precondition/clusterversion/upgradeable.go b/pkg/payload/precondition/clusterversion/upgradeable.go index 0e316d2ad..f90d9d7c2 100644 --- a/pkg/payload/precondition/clusterversion/upgradeable.go +++ b/pkg/payload/precondition/clusterversion/upgradeable.go @@ -68,31 +68,31 @@ func (pf *Upgradeable) Run(ctx context.Context, releaseContext precondition.Rele // if we are upgradeable==true we can always upgrade up := resourcemerge.FindOperatorStatusCondition(cv.Status.Conditions, configv1.OperatorUpgradeable) if up == nil { - klog.V(4).Infof("Precondition %s passed: no Upgradeable condition on ClusterVersion.", pf.Name()) + klog.V(2).Infof("Precondition %s passed: no Upgradeable condition on ClusterVersion.", pf.Name()) return nil } 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) + klog.V(2).Infof("Precondition %s passed: Upgradeable %s since %v: %s: %s", pf.Name(), up.Status, up.LastTransitionTime, up.Reason, up.Message) return nil } // we can always allow the upgrade if there isn't a version already installed if len(cv.Status.History) == 0 { - klog.V(4).Infof("Precondition %s passed: no release history.", pf.Name()) + klog.V(2).Infof("Precondition %s passed: no release history.", pf.Name()) return nil } currentVersion := GetCurrentVersion(cv.Status.History) currentMinor := GetEffectiveMinor(currentVersion) desiredMinor := GetEffectiveMinor(releaseContext.DesiredVersion) - klog.V(5).Infof("currentMinor %s releaseContext.DesiredVersion %s desiredMinor %s", currentMinor, releaseContext.DesiredVersion, desiredMinor) + klog.V(2).Infof("currentMinor %s releaseContext.DesiredVersion %s desiredMinor %s", currentMinor, releaseContext.DesiredVersion, desiredMinor) // 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 no cluster overrides have been set 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(), currentVersion, releaseContext.DesiredVersion, currentMinor) + klog.V(2).Infof("Precondition %q passed: minor from the current %s matches minor from the target %s (both %s).", pf.Name(), currentVersion, releaseContext.DesiredVersion, currentMinor) if condition := ClusterVersionOverridesCondition(clusterVersion); condition != nil { - klog.V(4).Infof("Update from %s to %s blocked by %s: %s", currentVersion, releaseContext.DesiredVersion, condition.Reason, condition.Message) + klog.V(2).Infof("Update from %s to %s blocked by %s: %s", currentVersion, releaseContext.DesiredVersion, condition.Reason, condition.Message) return &precondition.Error{ Reason: condition.Reason, @@ -196,7 +196,7 @@ func (pf *RecentEtcdBackup) Name() string { return "EtcdRecentBackup" } func GetCurrentVersion(history []configv1.UpdateHistory) string { for _, h := range history { if h.State == configv1.CompletedUpdate { - klog.V(5).Infof("Cluster current version=%s", h.Version) + klog.V(2).Infof("Cluster current version=%s", h.Version) return h.Version } } diff --git a/pkg/payload/task_graph.go b/pkg/payload/task_graph.go index 4ae457748..d957d0188 100644 --- a/pkg/payload/task_graph.go +++ b/pkg/payload/task_graph.go @@ -480,10 +480,10 @@ func RunGraph(ctx context.Context, graph *TaskGraph, maxParallelism int, fn func for { select { case <-ctx.Done(): - klog.V(4).Infof("Canceled worker %d while waiting for work", job) + klog.V(2).Infof("Canceled worker %d while waiting for work", job) return case runTask := <-workCh: - klog.V(4).Infof("Running %d on worker %d", runTask.index, job) + klog.V(2).Infof("Running %d on worker %d", runTask.index, job) err := fn(ctx, runTask.tasks) resultCh <- taskStatus{index: runTask.index, error: err} } @@ -529,7 +529,7 @@ func RunGraph(ctx context.Context, graph *TaskGraph, maxParallelism int, fn func cancelFn() wg.Wait() - klog.V(4).Infof("Workers finished") + klog.V(2).Infof("Workers finished") var errs []error var firstIncompleteNode *TaskNode @@ -552,7 +552,7 @@ func RunGraph(ctx context.Context, graph *TaskGraph, maxParallelism int, fn func } } - klog.V(4).Infof("Result of work: %v", errs) + klog.V(2).Infof("Result of work: %v", errs) if len(errs) > 0 { return errs }