non-default mysql/mariadb port not supported in kolla ansible

Bug #1576151 reported by Waldemar Znoinski
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Fix Released
Critical
Waldemar Znoinski
Mitaka
Won't Fix
Critical
Waldemar Znoinski

Bug Description

when set non-default mariadb_port in all.yml many ansible steps fail, due to not connecting to the proper mysql server:

i.e.:
TASK: [nova | Creating Nova database user and setting permissions] ************
<localhost> REMOTE_MODULE command docker exec -t kolla_toolbox /usr/bin/ansible localhost -m mysql_user -a "login_host='10.237.214.148' login_user='root' login_password=VALUE_HIDDEN name='nova' password=VALUE_HIDDEN host='%' priv='nova.*:ALL' append_privs='yes'"
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1461841393.92-180876756604958 && echo $HOME/.ansible/tmp/ansible-tmp-1461841393.92-180876756604958']
<localhost> PUT /tmp/tmp3fnMSb TO /root/.ansible/tmp/ansible-tmp-1461841393.92-180876756604958/command
<localhost> EXEC ['/bin/sh', '-c', u'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1461841393.92-180876756604958/command; rm -rf /root/.ansible/tmp/ansible-tmp-1461841393.92-180876756604958/ >/dev/null 2>&1']
failed: [localhost -> localhost] => {"changed": false, "cmd": ["docker", "exec", "-t", "kolla_toolbox", "/usr/bin/ansible", "localhost", "-m", "mysql_user", "-a", "login_host='10.237.214.148' login_user='root' login_password='H8rz3o9ABka9LcXlzuDr2lxf14HsgBS6a0W1faCQ' name='nova' password='ZqXTt4ytEPqayBziNnCw5QvFV88NdUH8CVKTSKCa' host='%' priv='nova.*:ALL' append_privs='yes'"], "delta": "0:00:00.527297", "end": "2016-04-28 12:03:14.496836", "failed": true, "failed_when_result": true, "rc": 2, "start": "2016-04-28 12:03:13.969539", "stdout_lines": ["localhost | FAILED! => {", " \"changed\": false, ", " \"failed\": true, ", " \"msg\": \"unable to connect to database, check login_user and login_password are correct or /home/ansible/.my.cnf has the credentials. Exception message: (2003, 'Can\\\\'t connect to MySQL server on \\\\'10.237.214.148\\\\' (111 \\\"Connection refused\\\")')\"", "}"], "warnings": []}
stdout: localhost | FAILED! => {
    "changed": false,
    "failed": true,
    "msg": "unable to connect to database, check login_user and login_password are correct or /home/ansible/.my.cnf has the credentials. Exception message: (2003, 'Can\\'t connect to MySQL server on \\'10.237.214.148\\' (111 \"Connection refused\")')"

ansible yml files have to have a notion of login_port for 'mysql_user' module and in many other places

Changed in kolla:
assignee: nobody → Waldemar Znoinski (wznoinsk)
Steven Dake (sdake)
Changed in kolla:
status: New → Confirmed
importance: Undecided → Critical
milestone: none → newton-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (master)

Fix proposed to branch: master
Review: https://review.openstack.org/313595

Changed in kolla:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (master)

Reviewed: https://review.openstack.org/313595
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=a2c2eba34fb7077346d651918dfb22a53a63cb00
Submitter: Jenkins
Branch: master

commit a2c2eba34fb7077346d651918dfb22a53a63cb00
Author: Waldemar Znoinski <email address hidden>
Date: Fri May 6 15:51:55 2016 +0100

    add support for non-default database_port in kolla/ansible

    This change makes each step of the kolla deployment aware
    of the port database was configured to listen on.
    It defaults mariadb_port to database_port.

    Change-Id: I8e85d5732015afc0a5481cb33e0b629fdfa84a1b
    Closes-Bug: #1576151
    DocImpact

Changed in kolla:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/kolla 3.0.0.0b1

This issue was fixed in the openstack/kolla 3.0.0.0b1 development milestone.

Revision history for this message
Waldemar Znoinski (wznoinsk) wrote :
no longer affects: kolla/liberty
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.