Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible operator markDone function causing DPANIC in reconcile.go #2025

Closed
rammohanc opened this issue Oct 9, 2019 · 0 comments · Fixed by #2031
Closed

Ansible operator markDone function causing DPANIC in reconcile.go #2025

rammohanc opened this issue Oct 9, 2019 · 0 comments · Fixed by #2031
Labels
kind/bug Categorizes issue or PR as related to a bug. language/ansible Issue is related to an Ansible operator project

Comments

@rammohanc
Copy link
Contributor

Bug Report

When deleting a CR , markDone function is causing DPANIC

2019-09-30T21:50:00.152Z DPANIC markDone odd number of arguments passed as key-value pairs for logging {"ignored key": "sabreprojects.ngp.sabre.com \"ram08291-free-tier\" not found"}
github.com/go-logr/zapr.handleFields
/root/go/pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:106
github.com/go-logr/zapr.(*infoLogger).Info
/root/go/pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:70
github.com/operator-framework/operator-sdk/pkg/ansible/controller.(*AnsibleOperatorReconciler).markDone
/home/rammohan/ansible-operator-v0.10.0+max_worker_fix/operator-sdk/pkg/ansible/controller/reconcile.go:313
github.com/operator-framework/operator-sdk/pkg/ansible/controller.(*AnsibleOperatorReconciler).Reconcile
/home/rammohan/ansible-operator-v0.10.0+max_worker_fix/operator-sdk/pkg/ansible/controller/reconcile.go:222
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/root/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.1.10/pkg/internal/controller/controller.go:215
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1
/root/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.1.10/pkg/internal/controller/controller.go:158
k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1
/root/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190221213512-86fb29eff628/pkg/util/wait/wait.go:133
k8s.io/apimachinery/pkg/util/wait.JitterUntil
/root/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190221213512-86fb29eff628/pkg/util/wait/wait.go:134
k8s.io/apimachinery/pkg/util/wait.Until
/root/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190221213512-86fb29eff628/pkg/util/wait/wait.go:88

What did you do?
Deleting CR is causing above issue

What did you expect to see?
markDone call should not cause DPANIC when it cannot find the Kubernetes object

What did you see instead? Under which circumstances?
During CR deletion, markDone function call is causing DPANIC

Environment

  • operator-sdk version: v0.10.x,

  • go version: go1.12.4

  • Kubernetes version information: v1.11.0+d4cacc0

  • Kubernetes cluster kind: Openshift v3.11.141

  • Are you writing your operator in ansible, helm, or go?
    Ansible

Possible Solution
Don not pass the 'err' object to the logger call below
logger.Info("Resource not found, assuming it was deleted", err)

@camilamacedo86 camilamacedo86 added language/ansible Issue is related to an Ansible operator project kind/bug Categorizes issue or PR as related to a bug. labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. language/ansible Issue is related to an Ansible operator project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants