From 42f74eef0905b826985e4fd47fb5049ea9674ba6 Mon Sep 17 00:00:00 2001 From: Joe Lanford Date: Wed, 9 Oct 2019 22:26:32 -0400 Subject: [PATCH 1/2] pkg/ansible/controller/reconcile.go: fix invalid logger.Info usage --- pkg/ansible/controller/reconcile.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/ansible/controller/reconcile.go b/pkg/ansible/controller/reconcile.go index c6e17bf45a..fceb7a78aa 100644 --- a/pkg/ansible/controller/reconcile.go +++ b/pkg/ansible/controller/reconcile.go @@ -271,7 +271,7 @@ func (r *AnsibleOperatorReconciler) markError(u *unstructured.Unstructured, name // Get the latest resource to prevent updating a stale status err := r.Client.Get(context.TODO(), namespacedName, u) if apierrors.IsNotFound(err) { - logger.Info("Resource not found, assuming it was deleted", err) + logger.Info("Resource not found, assuming it was deleted") return nil } if err != nil { @@ -310,7 +310,7 @@ func (r *AnsibleOperatorReconciler) markDone(u *unstructured.Unstructured, names // Get the latest resource to prevent updating a stale status err := r.Client.Get(context.TODO(), namespacedName, u) if apierrors.IsNotFound(err) { - logger.Info("Resource not found, assuming it was deleted", err) + logger.Info("Resource not found, assuming it was deleted") return nil } if err != nil { From d5a8d51081411aed6b8774c51467984a11883a86 Mon Sep 17 00:00:00 2001 From: Joe Lanford Date: Wed, 9 Oct 2019 22:38:54 -0400 Subject: [PATCH 2/2] CHANGELOG.md: add line for #2031 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e2be7432d..df2c3236c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,6 +68,7 @@ - Fixed an issue in `operator-sdk olm-catalog gen-csv` where the generated CSV is missing the expected set of owned CRDs. ([#2017](https://github.com/operator-framework/operator-sdk/pull/2017)) - The command `operator-sdk olm-catalog gen-csv --csv-version= --update-crds` would fail to copy over CRD manifests into `deploy/olm-catalog` for manifests whose name didn't end with a `_crd.yaml` suffix. This has been fixed so `gen-csv` now copies all CRD manifests specified by `deploy/olm-catalog/csv_config.yaml` by checking the type of the manifest rather than the filename suffix. ([#2015](https://github.com/operator-framework/operator-sdk/pull/2015)) - Added missing `jmespath` dependency to Ansible-based Operator .travis.yml file template. ([#2027](https://github.com/operator-framework/operator-sdk/pull/2027)) +- Fixed invalid usage of `logr.Logger.Info()` in the Ansible-based operator implementation, which caused unnecessary operator panics. ([#2031](https://github.com/operator-framework/operator-sdk/pull/2031)) ## v0.10.0