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

Documentation feedback: issue with step one of the Prerequisites for Migrating databases to the control plane

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • rhos-18.0.z
    • rhos-18.0.z
    • documentation
    • None
    • 1
    • False
    • Hide

      None

      Show
      None
    • False
    • ?
    • rhos-ops-day1day2-upgrades
    • None
    • RHOS Upgrades 2025 Sprint 12
    • 1
    • Important

      https://docs.redhat.com/en/documentation/red_hat_openstack_services_on_openshift/18.0/html/adopting_a_red_hat_openstack_platform_director_operator_environment/migrating-databases-to-the-control-plane_configuring-network

      PASSWORD_FILE="$HOME/overcloud-passwords.yaml"
      MARIADB_IMAGE=registry.redhat.io/rhoso/openstack-mariadb-rhel9:18.0
      declare -A TRIPLEO_PASSWORDS
      CELLS="default"
      for CELL in $(echo $CELLS); do
          oc get secret tripleo-passwords -o json | jq -r '.data["tripleo-overcloud-passwords.yaml"]' | base64 -d >"$TRIPLEO_PASSWORDS[$CELL]"
      done
      declare -A SOURCE_DB_ROOT_PASSWORD
      for CELL in $(echo $CELLS); do
          SOURCE_DB_ROOT_PASSWORD[$CELL]=$(cat ${TRIPLEO_PASSWORDS[$CELL]} | grep ' MysqlRootPassword:' | awk -F ': ' '{ print $2; }')
      done 

       

       

      The variable TRIPLEO_PASSWORDS is used inconsistently

      First it is defined as an array 

      declare -A TRIPLEO_PASSWORDS 

      Next it is used as file 

       base64 -d >"$TRIPLEO_PASSWORDS[$CELL]" 

      Lastly it is used is is used as an array but parsed as a file 

      SOURCE_DB_ROOT_PASSWORD[$CELL]=$(cat ${TRIPLEO_PASSWORDS[$CELL]} 

      Removing the {} from 

      ${TRIPLEO_PASSWORDS[$CELL]} 

      Allows this to work cause it can cat the file '[default]' created. 

      I know this type of array can work in bash, but I don't believe it is technically supported and can behave in unexpected ways between versions

              kgilliga@redhat.com Katie Gilligan
              rhn-support-dsedgmen David Sedgmen
              pini komarov
              rhos-dfg-upgrades
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: