Code Monkey home page Code Monkey logo

Comments (5)

IshaanDesai45 avatar IshaanDesai45 commented on June 4, 2024

Hi @andbos
you are basically cloning the primary sidb right and not one of the two standby sidbs ? if yes please also share the operator pod logs

from oracle-database-operator.

andbos avatar andbos commented on June 4, 2024

Hi,

Yes, I cloned the primary instance. I tried again, now with only one instance in total (a Primary) prior to the clone operation.

$ kubectl --kubeconfig ~/.kube/config-sinch-op-smsf-1-andbos -n oracle-database get singleinstancedatabase
NAME     EDITION      STATUS    ROLE      VERSION      CONNECT STR             TCPS CONNECT STR   OEM EXPRESS URL
zywiec   Enterprise   Healthy   PRIMARY   21.3.0.0.0   10.1.3.159:31170/ORAZ   Unavailable        https://10.1.3.159:30994/em

$ kubectl --kubeconfig -n oracle-database get pvc
NAME     STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
zywiec   Bound    pvc-37535c5d-f6df-489f-b91b-ed3656bd6e8e   50Gi       RWO            gp2            8d

$ kubectl -n oracle-database get pods
NAME           READY   STATUS    RESTARTS   AGE
zywiec-vpxps   1/1     Running   0          8d

$ kubectl -n oracle-database apply -f ~/oracle/singleinstancedatabase_clone.yaml
singleinstancedatabase.database.oracle.com/wisla created

$ kubectl -n oracle-database get pods
NAME           READY   STATUS    RESTARTS      AGE
wisla-wnnrh    0/1     Running   1 (72s ago)   3m54s
zywiec-vpxps   1/1     Running   0             8d

$ kubectl -n oracle-database get pvc
NAME     STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
wisla    Bound    pvc-1cec290e-f461-4b66-81fc-e0069a22480b   50Gi       RWO            gp2            3m58s
zywiec   Bound    pvc-37535c5d-f6df-489f-b91b-ed3656bd6e8e   50Gi       RWO            gp2            8d

$ kubectl -n oracle-database get singleinstancedatabase
NAME     EDITION      STATUS     ROLE          VERSION       CONNECT STR             TCPS CONNECT STR   OEM EXPRESS URL
wisla    Enterprise   Creating   Unavailable   Unavailable   10.1.1.7:30200/ORAW     Unavailable        Unavailable
zywiec   Enterprise   Healthy    PRIMARY       21.3.0.0.0    10.1.3.159:31170/ORAZ   Unavailable        https://10.1.3.159:30994/em

$ kubectl -n oracle-database logs -f wisla-wnnrh
Defaulted container "wisla" out of: wisla, init-permissions (init), init-wallet (init)
[2023:12:22 12:39:46]: Acquiring lock .ORAW.create_lck with heartbeat 30 secs
[2023:12:22 12:39:46]: Lock acquired
[2023:12:22 12:39:46]: Starting heartbeat
[2023:12:22 12:39:46]: Lock held .ORAW.create_lck
ORACLE EDITION: ENTERPRISE
[WARNING] [DBT-11217] Unable to check available shared memory on specified node(s) ([10]).
Prepare for db operation
[FATAL] [DBT-06006] Unable to create directory: (/opt/oracle/oradata/ORAW).
   CAUSE: Proper permissions are not granted to create the directory or there is no space left in the volume.
[ 2023-12-22 12:39:57.762 UTC ] [WARNING] [DBT-11217] Unable to check available shared memory on specified node(s) ([10]).
[ 2023-12-22 12:42:07.441 UTC ] Prepare for db operation
[ 2023-12-22 12:42:07.506 UTC ] [FATAL] [DBT-06006] Unable to create directory: (/opt/oracle/oradata/ORAW).

LSNRCTL for Linux: Version 21.0.0.0.0 - Production on 22-DEC-2023 12:42:07

Copyright (c) 1991, 2021, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
$ date
Fri Dec 22 13:42:27 CET 2023

oracle-database-operator-controller-manager_log.txt
singleinstancedatabase_clone.yaml.txt
singleinstancedatabase.yaml.txt

I have uploaded the operator-controller-manager pod logs (taken with stern so logs from all three pods are present) my YAML files.

Best regards,
Andreas

from oracle-database-operator.

IshaanDesai45 avatar IshaanDesai45 commented on June 4, 2024

@andbos please check if the /opt/oracle/oradata which is a directory mounted with a volume have enough space, if not then try expanding the volume source or using a new volume.

from oracle-database-operator.

andbos avatar andbos commented on June 4, 2024

Hi,

Thanks. It turns out I had assigned insufficient storage (tried to save money during testing). I doubled the storage to 100Gi and after that the creation of the clone went well. A bit strange that it was possible to create the initial primary with as little at 10Gi but not a clone. What's the minimal amount?

$ kubectl -n oracle-database apply -f ~/oracle/singleinstancedatabase_clone.yaml
singleinstancedatabase.database.oracle.com/wisla created

$ kubectl -n oracle-database get pods
NAME           READY   STATUS    RESTARTS   AGE
wisla-ly4z2    1/1     Running   0          14m
zywiec-q14pe   1/1     Running   0          26m

$ kubectl -n oracle-database get singleinstancedatabase
NAME     EDITION      STATUS    ROLE      VERSION      CONNECT STR            TCPS CONNECT STR   OEM EXPRESS URL
wisla    Enterprise   Healthy   PRIMARY   21.3.0.0.0   10.1.2.46:30531/ORAW   Unavailable        https://10.1.2.46:30474/em
zywiec   Enterprise   Healthy   PRIMARY   21.3.0.0.0   10.1.2.46:32102/ORAZ   Unavailable        https://10.1.2.46:31749/em

From above output it is impossible to know which instance is the original primary and which is the clone. Maybe that could be highlighted somehow in a future release? As far as I understand the clone is like a snapshot or a backup taken at a specific time and there is no syncing, the two primary instances are not clustered.

Best regards,
Andreas

from oracle-database-operator.

andbos avatar andbos commented on June 4, 2024

Aha now I see that you can determine which instance is a clone by checking Clone From under Status and Spec in the describe singleinstance output.

$ kubectl --kubeconfig ~/.kube/config-sinch-op-smsf-1-andbos -n oracle-database describe singleinstancedatabase wisla
Name:         wisla
Namespace:    oracle-database
Labels:       <none>
Annotations:  <none>
API Version:  database.oracle.com/v1alpha1
Kind:         SingleInstanceDatabase
Metadata:
  Creation Timestamp:  2024-02-02T08:57:59Z
  Finalizers:
    database.oracle.com/singleinstancedatabasefinalizer
  Generation:        1
  Resource Version:  156829610
  UID:               3a3ec8cc-302e-4320-aabc-22f2feebc918
Spec:
  Admin Password:
    Keep Secret:  true
    Secret Key:   oracle_pwd
    Secret Name:  db-admin-secret
  Clone From:     zywiec
  Image:
    Pull From:     container-registry.oracle.com/database/enterprise:latest
    Pull Secrets:  oracle-container-registry-secret
  Init Params:
  Pdb Name:  ORCLPDB1
  Persistence:
    Access Mode:    ReadWriteOnce
    Size:           100Gi
    Storage Class:  gp2
  Replicas:         1
  Sid:              ORAW
Status:
  Archive Log:             false
  Clone From:              zywiec

from oracle-database-operator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.