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

[Bug]: FlexibleServer Resource on Observe-only management policy causes provider pod to panic #667

Closed
1 task done
andrewjc03 opened this issue Mar 11, 2024 · 3 comments
Closed
1 task done

Comments

@andrewjc03
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Affected Resource(s)

dbforpostgresql.azure.upbound.io/v1beta1 - FlexibleServer

Resource MRs required to reproduce the bug

FlexibleServer

Steps to Reproduce

  1. Deploy a FlexibleServer resource to create an external resource
  2. Delete the MR but keep the external resource
  3. Deploy the same FlexibleServer resource, but this time on observe-only for its management policy
  4. Check the dbforpostgresql provider pod for the logs

What happened?

The pod logs showed that it panicked, saying "interface conversion: interface {} is nil, not string" (full error in the next box).

Relevant Error Output Snippet

E0311 23:21:47.528797       1 runtime.go:79] Observed a panic: &runtime.TypeAssertionError{_interface:(*runtime._type)(0x357ac00), concrete:(*runtime._type)(nil), asserted:(*runtime._type)(0x34c9cc0), missingMethod:""} (interface conversion: interface {} is nil, not string)
goroutine 4413 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic({0x37056a0?, 0xc0016604b0})
	k8s.io/[email protected]/pkg/util/runtime/runtime.go:75 +0x99
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile.func1()
	sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:108 +0xc5
panic({0x37056a0, 0xc0016604b0})
	runtime/panic.go:884 +0x213
github.com/upbound/provider-azure/config/postgresql.Configure.func9.1(0xc0016602a0?)
	github.com/upbound/provider-azure/config/postgresql/config.go:108 +0x30a
github.com/crossplane/upjet/pkg/resource.GetConnectionDetails(0xc000628500?, {0x7fc9024a89c0?, 0xc000628500?}, 0xc003b16000)
	github.com/crossplane/[email protected]/pkg/resource/sensitive.go:73 +0x87
github.com/crossplane/upjet/pkg/controller.(*external).Import(0xc0014664d0, {0x43e4460?, 0xc0017ec210?}, {0x7fc9024a89c0?, 0xc000628500?})
	github.com/crossplane/[email protected]/pkg/controller/external.go:467 +0x185
github.com/crossplane/upjet/pkg/controller.(*external).Observe(0xc0014664d0, {0x43e4460, 0xc0017ec210}, {0x441dc08?, 0xc000628500?})
	github.com/crossplane/[email protected]/pkg/controller/external.go:210 +0xdb7
github.com/crossplane/crossplane-runtime/pkg/reconciler/managed.(*Reconciler).Reconcile(0xc001d540f0, {0x43e4498, 0xc0017ec120}, {{{0x0, 0x0}, {0xc0018e8f40, 0x1b}}})
	github.com/crossplane/[email protected]/pkg/reconciler/managed/reconciler.go:903 +0x2b9f
github.com/crossplane/crossplane-runtime/pkg/ratelimiter.(*Reconciler).Reconcile(0xc003b7e640, {0x43e4498, 0xc0017ec120}, {{{0x0?, 0x5?}, {0xc0018e8f40?, 0xc000e8fd48?}}})
	github.com/crossplane/[email protected]/pkg/ratelimiter/reconciler.go:54 +0x16b
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile(0x43e7ee0?, {0x43e4498?, 0xc0017ec120?}, {{{0x0?, 0xb?}, {0xc0018e8f40?, 0x0?}}})
	sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:119 +0xc8
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc003b7a780, {0x43e43f0, 0xc000354ff0}, {0x383d580?, 0xc001782120?})
	sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:316 +0x3ca
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc003b7a780, {0x43e43f0, 0xc000354ff0})
	sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266 +0x1d9
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2()
	sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227 +0x85
created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2
	sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:223 +0x587
2024-03-11T23:21:47Z	ERROR	Reconciler error	{"controller": "managed/dbforpostgresql.azure.upbound.io/v1beta1, kind=flexibleserver", "namespace": "", "name": "test-postgresql-5qb86-ckz4t", "reconcileID": "0bb755aa-b822-4abe-8fce-cb35a064c4d9", "error": "panic: interface conversion: interface {} is nil, not string [recovered]"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:329
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227

Crossplane Version

1.14.5

Provider Version

0.40.0

Kubernetes Version

1.27

Kubernetes Distribution

No response

Additional Info

No response

@andrewjc03 andrewjc03 added bug Something isn't working needs:triage labels Mar 11, 2024
@turkenf
Copy link
Collaborator

turkenf commented May 7, 2024

Hi @andrewjc03, thank you for raising this, could you please try this with the latest provider version and let us know?

Copy link

github-actions bot commented Aug 6, 2024

This provider repo does not have enough maintainers to address every issue. Since there has been no activity in the last 90 days it is now marked as stale. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

@github-actions github-actions bot added the stale label Aug 6, 2024
Copy link

This issue is being closed since there has been no activity for 14 days since marking it as stale. If you still need help, feel free to comment or reopen the issue!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants