Name:             glance-6a8c-account-create-update-t2mvt
Namespace:        glance-kuttl-tests
Priority:         0
Service Account:  galera-openstack
Node:             crc/192.168.126.11
Start Time:       Tue, 25 Nov 2025 22:11:25 +0000
Labels:           batch.kubernetes.io/controller-uid=4509db3d-05c4-402c-8661-dc20f43a09a5
                  batch.kubernetes.io/job-name=glance-6a8c-account-create-update
                  controller-uid=4509db3d-05c4-402c-8661-dc20f43a09a5
                  job-name=glance-6a8c-account-create-update
Annotations:      k8s.ovn.org/pod-networks:
                    {"default":{"ip_addresses":["10.217.0.107/23"],"mac_address":"0a:58:0a:d9:00:6b","gateway_ips":["10.217.0.1"],"routes":[{"dest":"10.217.0....
                  k8s.v1.cni.cncf.io/network-status:
                    [{
                        "name": "ovn-kubernetes",
                        "interface": "eth0",
                        "ips": [
                            "10.217.0.107"
                        ],
                        "mac": "0a:58:0a:d9:00:6b",
                        "default": true,
                        "dns": {}
                    }]
                  openshift.io/scc: anyuid
Status:           Succeeded
IP:               10.217.0.107
IPs:
  IP:           10.217.0.107
Controlled By:  Job/glance-6a8c-account-create-update
Containers:
  mariadb-account-create-update:
    Container ID:  cri-o://902741845ac8789170899ec25fcba35ce5e4095b888512b806c7823cbca65d73
    Image:         quay.io/podified-antelope-centos9/openstack-mariadb@sha256:10452e2144368e2f128c8fb8ef9e54880b06ef1d71d9f084a0217dcb099c51ce
    Image ID:      quay.io/podified-antelope-centos9/openstack-mariadb@sha256:10452e2144368e2f128c8fb8ef9e54880b06ef1d71d9f084a0217dcb099c51ce
    Port:          <none>
    Host Port:     <none>
    Command:
      /bin/sh
      -c
      #!/bin/bash
      
      MYSQL_REMOTE_HOST=openstack.glance-kuttl-tests.svc source /var/lib/operator-scripts/mysql_root_auth.sh
      
      export DatabasePassword=${DatabasePassword:?"Please specify a DatabasePassword variable."}
      
      MYSQL_CMD="mysql -h openstack.glance-kuttl-tests.svc -u root -P 3306"
      
      if [ -n "glance" ]; then
          GRANT_DATABASE="glance"
      else
          GRANT_DATABASE="*"
      fi
      
      # going for maximum compatibility here:
      # 1. MySQL 8 no longer allows implicit create user when GRANT is used
      # 2. MariaDB has "CREATE OR REPLACE", but MySQL does not
      # 3. create user with CREATE but then do all password and TLS with ALTER to
      #    support updates
      
      $MYSQL_CMD <<EOF
      CREATE USER IF NOT EXISTS 'glance_6a8c'@'localhost';
      CREATE USER IF NOT EXISTS 'glance_6a8c'@'%';
      
      ALTER USER 'glance_6a8c'@'localhost' IDENTIFIED BY '$DatabasePassword';
      ALTER USER 'glance_6a8c'@'%'  IDENTIFIED BY '$DatabasePassword';
      
      GRANT ALL PRIVILEGES ON ${GRANT_DATABASE}.* TO 'glance_6a8c'@'localhost';
      GRANT ALL PRIVILEGES ON ${GRANT_DATABASE}.* TO 'glance_6a8c'@'%';
      EOF
      
      
      # search for the account.  not using SHOW CREATE USER to avoid displaying
      # password hash
      username=$($MYSQL_CMD -NB -e "select user from mysql.user where user='glance_6a8c' and host='localhost';" )
      
      if [[ ${username} != "glance_6a8c" ]]; then
          exit 1
      fi
      
    State:          Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Tue, 25 Nov 2025 22:11:26 +0000
      Finished:     Tue, 25 Nov 2025 22:11:26 +0000
    Ready:          False
    Restart Count:  0
    Environment:
      DatabasePassword:  <set to the key 'DatabasePassword' in secret 'glance-db-secret'>  Optional: false
    Mounts:
      /var/lib/operator-scripts from operator-scripts (ro)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-p8hnb (ro)
Conditions:
  Type                        Status
  PodReadyToStartContainers   False 
  Initialized                 True 
  Ready                       False 
  ContainersReady             False 
  PodScheduled                True 
Volumes:
  operator-scripts:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      openstack-scripts
    Optional:  false
  kube-api-access-p8hnb:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
    ConfigMapName:           openshift-service-ca.crt
    ConfigMapOptional:       <nil>
QoS Class:                   BestEffort
Node-Selectors:              <none>
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type    Reason          Age    From               Message
  ----    ------          ----   ----               -------
  Normal  Scheduled       6m48s  default-scheduler  Successfully assigned glance-kuttl-tests/glance-6a8c-account-create-update-t2mvt to crc
  Normal  AddedInterface  6m47s  multus             Add eth0 [10.217.0.107/23] from ovn-kubernetes
  Normal  Pulled          6m47s  kubelet            Container image "quay.io/podified-antelope-centos9/openstack-mariadb@sha256:10452e2144368e2f128c8fb8ef9e54880b06ef1d71d9f084a0217dcb099c51ce" already present on machine
  Normal  Created         6m47s  kubelet            Created container mariadb-account-create-update
  Normal  Started         6m47s  kubelet            Started container mariadb-account-create-update
