Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-16719

MySQL adoption fails when tripleo_passwords is different than ~/$HOME/overcloud-passwords.yaml

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Can't Do
    • Icon: Minor Minor
    • None
    • None
    • data-plane-adoption
    • None
    • False
    • False
    • ?
    • None
    • Important

      Multicellular refactoring didn't get into account that passwords can be placed somewhere else. In RHEV Job there is a secrets.yaml with the following content

      secrets.yaml:tripleo_passwords: ~/overcloud-deploy/overcloud/overcloud-passwords.yaml # CUSTOMIZE_THIS
      

      so the job fails as

      TASK [get_services_configuration : test connection to the original DB] *********
      Thursday 15 May 2025  23:07:59 +0000 (0:00:00.021)       0:01:23.298 ********** 
      fatal: [localhost]: FAILED! => {"changed": true, "cmd": "export KUBECONFIG=~/adoption/kubeconfig\n\nset -euxo pipefail\n\n\nPASSWORD_FILE=\"$HOME/overcloud-passwords.yaml\"\n\nSTORAGE_CLASS=local-storage\nMARIADB_IMAGE=quay.io/podified-antelope-centos9/openstack-mariadb:current-podified\n\nCELLS=\"default\"\nDEFAULT_CELL_NAME=cell1\nRENAMED_CELLS=\"cell1\"\n\n\ndeclare -A TRIPLEO_PASSWORDS\nfor CELL in $(echo $CELLS); do\n    TRIPLEO_PASSWORDS[$CELL]=\"$PASSWORD_FILE\"\ndone\n\nRUN_OVERRIDES=' '\nMARIADB_CLIENT_ANNOTATIONS=--annotations=k8s.v1.cni.cncf.io/networks=internalapi\nMARIADB_RUN_OVERRIDES=$MARIADB_CLIENT_ANNOTATIONS\n\nOSPDO_MARIADB_CLIENT_ANNOTATIONS='[{\"name\": \"internalapi-static\",\"ips\": [\"172.15.2.99/24\"]}]'\n\nCONTROLLER1_SSH=\"ssh -o StrictHostKeyChecking=no stack@192.168.23.7\"\nCONTROLLER2_SSH=\"ssh -o StrictHostKeyChecking=no stack@192.168.23.8\"\nCONTROLLER3_SSH=\"ssh -o StrictHostKeyChecking=no stack@192.168.23.9\"\n\n\ndeclare -A SOURCE_DB_ROOT_PASSWORD\nfor CELL in $(echo $CELLS); do\n  SOURCE_DB_ROOT_PASSWORD[$CELL]=$(cat ${TRIPLEO_PASSWORDS[$CELL]} | grep ' MysqlRootPassword:' | awk -F ': ' '{ print $2; }')\ndone\n\ndeclare -A SOURCE_MARIADB_IP\nSOURCE_MARIADB_IP[default]=172.15.2.4\n\nunset PULL_OPENSTACK_CONFIGURATION_DATABASES\ndeclare -xA PULL_OPENSTACK_CONFIGURATION_DATABASES\nfor CELL in $(echo $CELLS); do\n    PULL_OPENSTACK_CONFIGURATION_DATABASES[$CELL]=$(oc run mariadb-client-1-$CELL ${MARIADB_RUN_OVERRIDES} -q --image ${MARIADB_IMAGE} -i --rm --restart=Never --        mysql -rsh \"${SOURCE_MARIADB_IP[$CELL]}\" -uroot -p\"${SOURCE_DB_ROOT_PASSWORD[$CELL]}\" -e 'SHOW databases;')\ndone\n", "delta": "0:00:00.006982", "end": "2025-05-15 23:07:59.745751", "msg": "non-zero return code", "rc": 1, "start": "2025-05-15 23:07:59.738769", "stderr": "+ PASSWORD_FILE=/home/stack/overcloud-passwords.yaml\n+ STORAGE_CLASS=local-storage\n+ MARIADB_IMAGE=quay.io/podified-antelope-centos9/openstack-mariadb:current-podified\n+ CELLS=default\n+ DEFAULT_CELL_NAME=cell1\n+ RENAMED_CELLS=cell1\n+ declare -A TRIPLEO_PASSWORDS\n++ echo default\n+ for CELL in $(echo $CELLS)\n+ TRIPLEO_PASSWORDS[$CELL]=/home/stack/overcloud-passwords.yaml\n+ RUN_OVERRIDES=' '\n+ MARIADB_CLIENT_ANNOTATIONS=--annotations=k8s.v1.cni.cncf.io/networks=internalapi\n+ MARIADB_RUN_OVERRIDES=--annotations=k8s.v1.cni.cncf.io/networks=internalapi\n+ OSPDO_MARIADB_CLIENT_ANNOTATIONS='[{\"name\": \"internalapi-static\",\"ips\": [\"172.15.2.99/24\"]}]'\n+ CONTROLLER1_SSH='ssh -o StrictHostKeyChecking=no stack@192.168.23.7'\n+ CONTROLLER2_SSH='ssh -o StrictHostKeyChecking=no stack@192.168.23.8'\n+ CONTROLLER3_SSH='ssh -o StrictHostKeyChecking=no stack@192.168.23.9'\n+ declare -A SOURCE_DB_ROOT_PASSWORD\n++ echo default\n+ for CELL in $(echo $CELLS)\n++ cat /home/stack/overcloud-passwords.yaml\n++ grep ' MysqlRootPassword:'\n++ awk -F ': ' '{ print $2; }'\ncat: /home/stack/overcloud-passwords.yaml: No such file or directory\n+ SOURCE_DB_ROOT_PASSWORD[$CELL]=", "stderr_lines": ["+ PASSWORD_FILE=/home/stack/overcloud-passwords.yaml", "+ STORAGE_CLASS=local-storage", "+ MARIADB_IMAGE=quay.io/podified-antelope-centos9/openstack-mariadb:current-podified", "+ CELLS=default", "+ DEFAULT_CELL_NAME=cell1", "+ RENAMED_CELLS=cell1", "+ declare -A TRIPLEO_PASSWORDS", "++ echo default", "+ for CELL in $(echo $CELLS)", "+ TRIPLEO_PASSWORDS[$CELL]=/home/stack/overcloud-passwords.yaml", "+ RUN_OVERRIDES=' '", "+ MARIADB_CLIENT_ANNOTATIONS=--annotations=k8s.v1.cni.cncf.io/networks=internalapi", "+ MARIADB_RUN_OVERRIDES=--annotations=k8s.v1.cni.cncf.io/networks=internalapi", "+ OSPDO_MARIADB_CLIENT_ANNOTATIONS='[{\"name\": \"internalapi-static\",\"ips\": [\"172.15.2.99/24\"]}]'", "+ CONTROLLER1_SSH='ssh -o StrictHostKeyChecking=no stack@192.168.23.7'", "+ CONTROLLER2_SSH='ssh -o StrictHostKeyChecking=no stack@192.168.23.8'", "+ CONTROLLER3_SSH='ssh -o StrictHostKeyChecking=no stack@192.168.23.9'", "+ declare -A SOURCE_DB_ROOT_PASSWORD", "++ echo default", "+ for CELL in $(echo $CELLS)", "++ cat /home/stack/overcloud-passwords.yaml", "++ grep ' MysqlRootPassword:'", "++ awk -F ': ' '{ print $2; }'", "cat: /home/stack/overcloud-passwords.yaml: No such file or directory", "+ SOURCE_DB_ROOT_PASSWORD[$CELL]="], "stdout": "", "stdout_lines": []}
      

      as refactored code has the requires secrets as

      tests/roles/common_defaults/defaults/main.yaml:  PASSWORD_FILE="$HOME/overcloud-passwords.yaml"
      

              bdobreli@redhat.com Bohdan Dobrelia
              rhn-engineering-sgolovat Sergii Golovatiuk
              rhos-dfg-upgrades
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: