oracle-database-operator icon indicating copy to clipboard operation
oracle-database-operator copied to clipboard

Unable to delete oraclerestdataservice resource on AKS

Open mfabbri opened this issue 3 years ago • 1 comments

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/[email protected]/pkg/internal/controller/controller.go:114](http://sigs.k8s.io/[email protected]/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/[email protected]/pkg/internal/controller/controller.go:311](http://sigs.k8s.io/[email protected]/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/[email protected]/pkg/internal/controller/controller.go:266](http://sigs.k8s.io/[email protected]/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/[email protected]/pkg/internal/controller/controller.go:227](http://sigs.k8s.io/[email protected]/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

mfabbri avatar Sep 08 '22 12:09 mfabbri

@mfabbri what is holding up the deletion? Are the pods in a terminating state?

yunus-qureshi avatar Sep 13 '22 06:09 yunus-qureshi