Db2

 View Only

db2 on Openshift create instance error

  • 1.  db2 on Openshift create instance error

    Posted Wed April 13, 2022 09:01 AM
    Hi, i am installing db2 on openshift my test environment. (ocp 4.10.5)

    db2 operator is success. But when create instance (sampledb) instdb error state. (ldap pods running)

    [root@ocpbastion ocpinstall]# oc get pods
    NAME READY STATUS RESTARTS AGE
    c-db2ucluster-sample-instdb-5dwc2 0/1 Error 0 35m
    c-db2ucluster-sample-instdb-grzp7 0/1 Error 0 35m
    c-db2ucluster-sample-instdb-jsclb 0/1 Error 0 35m
    c-db2ucluster-sample-instdb-k2v4r 0/1 Error 0 34m
    c-db2ucluster-sample-instdb-n9pmd 0/1 Error 0 34m
    c-db2ucluster-sample-instdb-qpllj 0/1 Error 0 35m
    c-db2ucluster-sample-instdb-vp9ts 0/1 Error 0 35m
    c-db2ucluster-sample-ldap-5c775858fb-25zcr 1/1 Running 0 35m
    db2u-operator-manager-5f6998bf74-mzj7c 1/1 Running 2 25h

    [root@ocpbastion ocpinstall]# oc get pvc
    NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
    c-db2ucluster-sample-data Bound pvc-6844fe4d-eb18-49f0-a5cd-6f5ff0ac86ed 50Gi RWX managed-nfs-storage 37m
    c-db2ucluster-sample-meta Bound pvc-680b5b32-7f86-49a4-ae16-c16892d8fe02 10Gi RWX managed-nfs-storage 37m

    pods logs here, it has many permission error, i checked ldap pods /mnt path correctly mount and working. What is my problem?  

    Implementing the pre-initialization mechanism
    + echo 'Implementing the pre-initialization mechanism'
    + echo 'Setting up Db2 configuration'
    Setting up Db2 configuration
    + sudo chmod 777 /mnt/blumeta0
    sudo: unable to send audit message: Operation not permitted
    + [[ -d /mnt/blumeta0/home ]]
    + sudo rm -rf /mnt/blumeta0/home
    sudo: unable to send audit message: Operation not permitted
    + mkdir /mnt/blumeta0/home
    + chmod 755 /mnt/blumeta0/home
    + sudo tar -C /mnt/blumeta0/home --same-owner -zxvpf /Db2wh_preinit/db2oltp/DB2_CONFIG.tgz
    sudo: unable to send audit message: Operation not permitted
    ./
    ./db2fenc1/
    tar: ./db2fenc1: Cannot mkdir: Permission denied
    ./db2fenc1/.bash_profile
    tar: ./db2fenc1: Cannot mkdir: Permission denied
    tar: ./db2fenc1/.bash_profile: Cannot open: No such file or directory./db2fenc1/.bashrc

    tar: ./db2fenc1: Cannot mkdir: Permission denied
    tar: ./db2fenc1/.bashrc: Cannot open: No such file or directory
    ./db2fenc1/.mkshrc
    tar: ./db2fenc1: Cannot mkdir: Permission denied
    tar: ./db2fenc1/.mkshrc: Cannot open: No such file or directory
    ./db2fenc1/.kshrc
    tar: ./db2fenc1: Cannot mkdir: Permission denied
    tar: ./db2fenc1/.kshrc: Cannot open: No such file or directory
    ./db2fenc1/.bash_logout
    tar: ./db2fenc1: Cannot mkdir: Permission denied
    tar: ./db2fenc1/.bash_logout: Cannot open: No such file or directory
    ..
    ..
    tar: ./db2inst1/.profile: Cannot open: No such file or directory
    tar: .: Cannot utime: Operation not permitted
    tar: .: Cannot change ownership to uid 0, gid 0: Operation not permitted
    tar: Exiting with failure status due to previous errors
    + echo '* ERROR: Db2 configuration tar file not extracted successfully. Instdb Job will fail now'
    * ERROR: Db2 configuration tar file not extracted successfully. Instdb Job will fail now
    + exit 1

    db2 instance yaml here,

    apiVersion: db2u.databases.ibm.com/v1
    kind: Db2uCluster
    metadata:
    name: db2ucluster-sample
    spec:
    license:
    accept: true
    account:
    privileged: true
    imagePullSecrets:
    - ibm-registry
    version: "11.5.7.0-cn3"
    size: 1
    podConfig:
    db2u:
    resource:
    db2u:
    requests:
    cpu: 2
    memory: 4Gi
    limits:
    cpu: 2
    memory: 4Gi
    environment:
    dbType: db2oltp
    database:
    name: sampledb
    instance:
    password: cicdtest
    addOns:
    rest:
    enabled: false
    graph:
    enabled: false
    storage:
    - name: meta
    type: "create"
    spec:
    storageClassName: "managed-nfs-storage"
    accessModes:
    - ReadWriteMany
    resources:
    requests:
    storage: 10Gi
    - name: data
    type: "create"
    spec:
    storageClassName: "managed-nfs-storage"
    accessModes:
    - ReadWriteOnce
    resources:
    requests:
    storage: 50Gi


    thank you

    ------------------------------
    Gökhan ORHON
    IT Manager
    32Bit
    Kocaeli
    9.05323E+11
    ------------------------------

    #Db2