oracle / oracle-database-operator

The Oracle Database Operator for Kubernetes (a.k.a. OraOperator) helps developers, DBAs, DevOps and GitOps teams reduce the time and complexity of deploying and managing Oracle Databases. It eliminates the dependency on a human operator or administrator for the majority of database operations.
Universal Permissive License v1.0
139 stars 45 forks source link

OraOperator incorrectly reporting Unhealthy status with 23.4.0.24.05 on OKE #108

Closed raekins closed 3 months ago

raekins commented 4 months ago

% kubectl get singleinstancedatabase/freedb-livelabs -n oracle-namespace NAME EDITION STATUS ROLE VERSION CONNECT STR TCPS CONNECT STR OEM EXPRESS URL freedb-livelabs Free Unhealthy Unavailable Unavailable Unavailable Unavailable Unavailable

% kubectl describe singleinstancedatabase/freedb-livelabs -n oracle-namespace

Events: Type Reason Age From Message


Normal Database Pending 22m (x7 over 24m) SingleInstanceDatabase waiting for a pod to get to running state Normal Database Unhealthy 21m (x6 over 22m) SingleInstanceDatabase datafiles exists

% kubectl logs pods/freedb-livelabs-xfcba -n oracle-namespace Defaulted container "freedb-livelabs" out of: freedb-livelabs, init-prebuiltdb (init) Starting Oracle Net Listener. Oracle Net Listener started. Starting Oracle Database instance FREE. Oracle Database instance FREE started. The Oracle base remains unchanged with value /opt/oracle

SQL*Plus: Release 23.0.0.0.0 - Production on Thu May 30 12:36:18 2024 Version 23.4.0.24.05

SQL> Disconnected from Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free Version 23.4.0.24.05 The Oracle base remains unchanged with value /opt/oracle ######################### DATABASE IS READY TO USE! #########################

% kubectl exec -it pods/freedb-livelabs-xfcba -n oracle-namespace -- sqlplus system/LiveLabs1@FREE Defaulted container "freedb-livelabs" out of: freedb-livelabs, init-prebuiltdb (init)

SQL*Plus: Release 23.0.0.0.0 - Production on Thu May 30 13:12:04 2024 Version 23.4.0.24.05

Copyright (c) 1982, 2024, Oracle. All rights reserved.

Last Successful login time: Wed Apr 24 2024 21:23:00 +00:00

Connected to: Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free Version 23.4.0.24.05

SQL> select INSTANCE_NAME, HOST_NAME, VERSION_FULL, EDITION from v$instance; INSTANCE_NAME HOST_NAME VERSION_FULL EDITION


FREE freedb-livelabs-xfcba 23.4.0.24.05 FREE

yunus-qureshi commented 4 months ago

@raekins have you applied the RBAC yamls in rbac/ folder?

raekins commented 4 months ago

Hi Yunus, I was using the cluster-role-binding.yaml to manage all namespaces, will try using a namespace scoped deployment. Thanks

yunus-qureshi commented 4 months ago

@raekins sure. But in either case SIDB needs https://github.com/oracle/oracle-database-operator/blob/main/rbac/node-rbac.yaml

More info here: https://github.com/oracle/oracle-database-operator/tree/main/docs/sidb#prerequisites

IshaanDesai45 commented 3 months ago

@raekins is the issue resolved once you apply https://github.com/oracle/oracle-database-operator/blob/main/rbac/node-rbac.yaml.

Note :- If you are using k8s native nodeport service for the singleinstancedatabase resource, it is mandatory to apply the above file.....because we need node ip for set the connect strings

raekins commented 3 months ago

Yes, all now resolved, was a fixed by applying dependencies.

rekins@rekins--Mac14 ~ % kubectl get singleinstancedatabase freedb-livelabs -n oracle23ai -o "jsonpath={.status.status}" Healthy%

raekins commented 3 months ago

thanks you for your assistance