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] Remove Resourceusage error log #79

Open
sdischer-sap opened this issue Dec 18, 2024 · 0 comments
Open

[BUG] Remove Resourceusage error log #79

sdischer-sap opened this issue Dec 18, 2024 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@sdischer-sap
Copy link
Member

Describe the bug
We often see those errors in stakeholders clusters:

2024-04-04T10:59:29Z    DEBUG    events    Blocking deletion while target still exist    {"type": "Warning", "object": {"kind":"ResourceUsage","name":"2a3314ac-6f31-42ff-983e-470fb7e0d84d.da6b1384-4e92-4407-bede-0f9c11e04247","uid":"7be14b24-88b5-4221-80c1-7b3bd9abc29e","apiVersion":"account.btp.orchestrate.cloud.sap/v1alpha1","resourceVersion":"120726988"}, "reason": "UsageAccounting"}
2024-04-04T10:59:29Z    ERROR    Reconciler error    {"controller": "providerconfig/resourceusage.account.btp.orchestrate.cloud.sap", "controllerGroup": "account.btp.orchestrate.cloud.sap", "controllerKind": "ResourceUsage", "ResourceUsage": {"name":"2a3314ac-6f31-42ff-983e-470fb7e0d84d.da6b1384-4e92-4407-bede-0f9c11e04247"}, "namespace": "", "name": "2a3314ac-6f31-42ff-983e-470fb7e0d84d.da6b1384-4e92-4407-bede-0f9c11e04247", "reconcileID": "9e7ad8ba-10ab-495e-a43a-eb051e94a5f0", "error": "cannot update ResourceUsage status: resourceusages.account.btp.orchestrate.cloud.sap \"2a3314ac-6f31-42ff-983e-470fb7e0d84d.da6b1384-4e92-4407-bede-0f9c11e04247\" not found"}
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

Its not really harmful, but pollutes the logs massively, so we should get rid of it.

It appears whenever you attempt to delete a resourceusage resource that still links to an existing target. Probably because the update attempted there does not contain any changes. It realtes to this line.

Tested with Provider Version
ANY

To Reproduce
Steps to reproduce the behavior:

  1. Create Subaccount and ServiceManager
  2. Remove both of them by removing finializers and delete resources
  3. See error in logs

Expected behavior
No polluted logs

Additional Context
Its a while since I debugged this, but i think it comes from this line:
https://github.com/SAP/crossplane-provider-btp/blob/main/internal/controller/account/resourceusage/reconciler.go#L173

@sdischer-sap sdischer-sap added bug Something isn't working help wanted Extra attention is needed labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant