oracle / oracle/oracle-database-operator

Unable to delete oraclerestdataservice resource on AKS

Open
#32 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
192
Forks
69
Avg merge
16h 13m
Merged PRs (30d)
1

Description

Hi all, we are testing the operator with an Azure deployment and we are facing this issue.

We deployed the sample singleinstancedatabase example with success

NAME EDITION STATUS VERSION CONNECT STR OEM EXPRESS URL
sidb-sample Enterprise Healthy 19.3.0.0.0 10.240.0.6:31515/ORCL1 https://10.240.0.6:30613/em
but the oraclerestdataservice creation thrown this error

2022-09-07T19:09:37Z    ERROR    controllers.OracleRestDataService    Internal error occurred: failed calling webhook "[moraclerestdataservice.kb.io](http://moraclerestdataservice.kb.io/)": failed to call webhook: Post "[https://oracle-database-operator-webhook-service.oracle-database-operator-system.svc:443/mutate-database-oracle-com-v1alpha1-oraclerestdataservice?timeout=10s](https://oracle-database-operator-webhook-service.oracle-database-operator-system.svc/mutate-database-oracle-com-v1alpha1-oraclerestdataservice?timeout=10s)": proxy error from [127.0.0.1:6443](http://127.0.0.1:6443/) while dialing [10.244.1.245:9443](http://10.244.1.245:9443/), code 500: 500 Internal Server Error    {"manageOracleRestDataServiceDeletion": "db-oracle/ords-sample", "error": "Internal error occurred: failed calling webhook \"[moraclerestdataservice.kb.io](http://moraclerestdataservice.kb.io/)\": failed to call webhook: Post \"[https://oracle-database-operator-webhook-service.oracle-database-operator-system.svc:443/mutate-database-oracle-com-v1alpha1-oraclerestdataservice?timeout=10s\](https://oracle-database-operator-webhook-service.oracle-database-operator-system.svc/mutate-database-oracle-com-v1alpha1-oraclerestdataservice?timeout=10s%5C)": proxy error from [127.0.0.1:6443](http://127.0.0.1:6443/) while dialing [10.244.1.245:9443](http://10.244.1.245:9443/), code 500: 500 Internal Server Error"}
[github.com/oracle/oracle-database-operator/controllers/database.(*OracleRestDataServiceReconciler).Reconcile](http://github.com/oracle/oracle-database-operator/controllers/database.%28*OracleRestDataServiceReconciler%29.Reconcile)
    /workspace/controllers/database/oraclerestdataservice_controller.go:151
[sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile](http://sigs.k8s.io/controller-runtime/pkg/internal/controller.%28*Controller%29.Reconcile)
    /go/pkg/mod/[sigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:114](http://sigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:114)
[sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler](http://sigs.k8s.io/controller-runtime/pkg/internal/controller.%28*Controller%29.reconcileHandler)
    /go/pkg/mod/[sigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:311](http://sigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:311)
[sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem](http://sigs.k8s.io/controller-runtime/pkg/internal/controller.%28*Controller%29.processNextWorkItem)
    /go/pkg/mod/[sigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:266](http://sigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:266)
[sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2](http://sigs.k8s.io/controller-runtime/pkg/internal/controller.%28*Controller%29.Start.func2.2)
    /go/pkg/mod/[sigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:227](http://sigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:227)

and we are not able to delete it anymore.
We tried to remove the finalizers, the CRDs, reinstall the operator without luck

kubectl describe oraclerestdataservice ords-sample

Name:         ords-sample
Namespace:    db-oracle
Labels:       <none>
Annotations:  <none>
API Version:  database.oracle.com/v1alpha1
Kind:         OracleRestDataService
Metadata:
  Creation Timestamp:             2022-09-07T16:20:56Z
  Deletion Grace Period Seconds:  0
  Deletion Timestamp:             2022-09-07T17:39:48Z
  Finalizers:
    database.oracle.com/oraclerestdataservicefinalizer
  Generation:  2
  Managed Fields:
    API Version:  database.oracle.com/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .:
          f:kubectl.kubernetes.io/last-applied-configuration:
      f:spec:
        .:
        f:adminPassword:
          .:
          f:secretKey:
          f:secretName:
        f:databaseRef:
        f:image:
          .:
          f:pullFrom:
          f:pullSecrets:
        f:ordsPassword:
          .:
          f:secretKey:
          f:secretName:
        f:restEnableSchemas:
    Manager:      kubectl-client-side-apply
    Operation:    Update
    Time:         2022-09-07T16:20:56Z
    API Version:  database.oracle.com/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:status:
        .:
        f:apexUrl:
        f:databaseActionsUrl:
        f:databaseApiUrl:
        f:databaseRef:
        f:image:
          .:
          f:pullFrom:
          f:pullSecrets:
        f:loadBalancer:
    Manager:      manager
    Operation:    Update
    Time:         2022-09-07T16:34:42Z
    API Version:  database.oracle.com/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:status:
        f:status:
    Manager:         manager
    Operation:       Update
    Subresource:     status
    Time:            2022-09-07T16:58:25Z
  Resource Version:  310396
  UID:               ea244096-0034-496c-8274-b7dc472ddb25
Spec:
  Admin Password:
    Keep Secret:  true
    Secret Key:   oracle_pwd
    Secret Name:  <secretName>
  Apex Password:
    Keep Secret:  true
    Secret Key:   oracle_pwd
    Secret Name:
  Database Ref:   sidb-sample
  Image:
    Pull From:     <imagePath>
    Pull Secrets:  azurecrkey
  Ords Password:
    Keep Secret:  true
    Secret Key:   oracle_pwd
    Secret Name:  ords-secret
  Persistence:
  Replicas:  1
  Rest Enable Schemas:
    Enable:       true
    Schema Name:  <schemaName>
Status:
  Apex URL:              Unavailable
  Database Actions URL:  Unavailable
  Database API URL:      Unavailable
  Database Ref:          sidb-sample
  Image:
    Pull From:     commerceimages.azurecr.io/oracle-db/ords:21.4.2-gh
    Pull Secrets:  azurecrkey
  Load Balancer:   false
  Status:          Error
Events:            <none>

Any idea?
We cannot proceed with any tests and we would really like to fully test this interesting option.

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with controllers/database/oraclerestdataservice_controller.go around line 151 and inspect the deletion and webhook calls involved in the OracleRestDataService finalizer. Use the reported kubectl describe output and webhook error to reproduce the blocked deletion. Done means an OracleRestDataService can be deleted on AKS without remaining stuck on its finalizer.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.