Name:             aodh-0adb-account-create-update-v2qxg
Namespace:        openstack
Priority:         0
Service Account:  galera-openstack
Node:             crc/192.168.126.11
Start Time:       Tue, 17 Feb 2026 14:32:40 +0000
Labels:           batch.kubernetes.io/controller-uid=18f50f93-3fe3-4724-93c5-4c53c89aec9b
                  batch.kubernetes.io/job-name=aodh-0adb-account-create-update
                  controller-uid=18f50f93-3fe3-4724-93c5-4c53c89aec9b
                  job-name=aodh-0adb-account-create-update
Annotations:      k8s.ovn.org/pod-networks:
                    {"default":{"ip_addresses":["10.217.0.242/23"],"mac_address":"0a:58:0a:d9:00:f2","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.242"
                        ],
                        "mac": "0a:58:0a:d9:00:f2",
                        "default": true,
                        "dns": {}
                    }]
                  openshift.io/scc: anyuid
Status:           Succeeded
IP:               10.217.0.242
IPs:
  IP:           10.217.0.242
Controlled By:  Job/aodh-0adb-account-create-update
Containers:
  mariadb-account-create-update:
    Container ID:  cri-o://6b56d7029a2965e5de4afa01619427cb94928a5a2b9f8f1aa928695001e8cc1d
    Image:         quay.io/podified-antelope-centos9/openstack-mariadb:current-podified
    Image ID:      quay.io/podified-antelope-centos9/openstack-mariadb@sha256:0f7943e02fbdd3daec1d3db72fa9396bf37ad3fdd6b0f3119c90e29629e095ed
    Port:          <none>
    Host Port:     <none>
    Command:
      /bin/sh
      -c
      #!/bin/bash
      
      MYSQL_REMOTE_HOST="openstack.openstack.svc" source /var/lib/operator-scripts/mysql_root_auth.sh
      
      export DatabasePassword=${DatabasePassword:?"Please specify a DatabasePassword variable."}
      
      MYSQL_CMD="mysql -h openstack.openstack.svc -u root -P 3306"
      
      if [ -n "aodh" ]; then
          GRANT_DATABASE="aodh"
      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 'aodh_0adb'@'localhost';
      CREATE USER IF NOT EXISTS 'aodh_0adb'@'%';
      
      ALTER USER 'aodh_0adb'@'localhost' IDENTIFIED BY '$DatabasePassword';
      ALTER USER 'aodh_0adb'@'%'  IDENTIFIED BY '$DatabasePassword';
      
      GRANT ALL PRIVILEGES ON ${GRANT_DATABASE}.* TO 'aodh_0adb'@'localhost';
      GRANT ALL PRIVILEGES ON ${GRANT_DATABASE}.* TO 'aodh_0adb'@'%';
      EOF
      
      # If we just changed the root password, update MYSQL_CMD to use the new password
      if [ "aodh_0adb" = "root" ]; then
          MYSQL_CMD="mysql -h openstack.openstack.svc -u root -p${DatabasePassword} -P 3306"
      fi
      
      # 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='aodh_0adb' and host='localhost';" )
      
      if [[ ${username} != "aodh_0adb" ]]; then
          exit 1
      fi
      
    State:          Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Tue, 17 Feb 2026 14:32:47 +0000
      Finished:     Tue, 17 Feb 2026 14:32:48 +0000
    Ready:          False
    Restart Count:  0
    Environment:
      DatabasePassword:  <set to the key 'DatabasePassword' in secret 'aodh-db-secret'>  Optional: false
    Mounts:
      /var/lib/operator-scripts from operator-scripts (ro)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-mzl6d (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-mzl6d:
    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       4m23s  default-scheduler  Successfully assigned openstack/aodh-0adb-account-create-update-v2qxg to crc
  Normal  AddedInterface  4m18s  multus             Add eth0 [10.217.0.242/23] from ovn-kubernetes
  Normal  Pulled          4m18s  kubelet            Container image "quay.io/podified-antelope-centos9/openstack-mariadb:current-podified" already present on machine
  Normal  Created         4m16s  kubelet            Created container mariadb-account-create-update
  Normal  Started         4m16s  kubelet            Started container mariadb-account-create-update
