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

Reconciling DatabaseSecretEngineConfig logs in twice instead of once. #113

Open
ameyp opened this issue Jan 14, 2023 · 4 comments
Open

Reconciling DatabaseSecretEngineConfig logs in twice instead of once. #113

ameyp opened this issue Jan 14, 2023 · 4 comments

Comments

@ameyp
Copy link
Contributor

ameyp commented Jan 14, 2023

If logging in to the database fails, the operator sends a login to vault twice for each DatabaseSecretEngineConfig resource:

2023-01-10T15:56:30.084Z	INFO	Logging in for vault object database/postgresql/config/my-db	{"controller": "databasesecretengineconfig", "controllerGroup": "redhatcop.redhat.io", "controllerKind": "DatabaseSecretEngineConfig", "DatabaseSecretEngineConfig": {"name":"my-db","namespace":"vault"}, "namespace": "vault", "name": "my-db", "reconcileID": "2dff9e6f-dc86-4745-afac-32d13948e1de"}
2023-01-10T15:56:30.039Z	INFO	Logging in for vault object database/postgresql/config/my-db	{"controller": "databasesecretengineconfig", "controllerGroup": "redhatcop.redhat.io", "controllerKind": "DatabaseSecretEngineConfig", "DatabaseSecretEngineConfig": {"name":"my-db","namespace":"vault"}, "namespace": "vault", "name": "my-db", "reconcileID": "a582e812-04ae-466e-8006-a16cec81035b"}

There's of course an accompanying stacktrace, which I've not included above but can if it'll help. This is happening at an increasing interval, so I'm guessing there's some sort of backoff on retries, which is good. However, it does look like the operator tries to reconcile each resource twice in each retry? There are two different reconcileID values in each "cycle".

@raffaelespazzoli
Copy link
Collaborator

I saw the same, it seems un-armful, but we should still fix it. This resource is not different than the others, are all the resources doing it?

@ameyp
Copy link
Contributor Author

ameyp commented Feb 4, 2023

Not sure, I only noticed it for this resource

@ameyp
Copy link
Contributor Author

ameyp commented Feb 4, 2023

I can try adding logs for other resources to check

@raffaelespazzoli
Copy link
Collaborator

It might be because we update the resource with the finalizer. but that is a new change, 3 weeks ago it wasn't there.... so I don't know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants