undercloud mysql root has not password set

Bug #1742191 reported by Michele Baldessari
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Michele Baldessari

Bug Description

We currently have no password set for the root user on the undercloud:
[stack@instack ~]$ mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 5978
Server version: 5.5.47-MariaDB MariaDB Server

Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> select user,host,password from mysql.user where user like 'root';
+------+---------------------+----------+
| user | host | password |
+------+---------------------+----------+
| root | localhost | |
| root | instack.localdomain | |
| root | 127.0.0.1 | |
| root | ::1 | |
+------+---------------------+----------+
4 rows in set (0.00 sec)

This is not as grave as it sounds since the port is firewalled off by default. But we should fix this nonetheless.

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
Michele Baldessari (michele) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to instack-undercloud (master)

Reviewed: https://review.openstack.org/532221
Committed: https://git.openstack.org/cgit/openstack/instack-undercloud/commit/?id=955c339af3ddf040fab4a153f1e6c249aefe0989
Submitter: Zuul
Branch: master

commit 955c339af3ddf040fab4a153f1e6c249aefe0989
Author: Michele Baldessari <email address hidden>
Date: Tue Jan 9 15:56:27 2018 +0100

    Set password for mysql root user on undercloud

    The port is firewalled off by default so mysql is not reachable except
    to localhost users. In any case it is good to set a password for the
    mysql root user.

    We are 'reusing' the user_db_password parameter, because it is actually
    unused, instead of adding yet another parameter.

    Tested this change against an existing undercloud and observed that
    the mysql root user got a correct password and that the /root/.my.cnf
    file got generated.

    Closes-Bug: #1742191

    Change-Id: I408ce3a0fe2ab8e86bcc280256cdb51688efde75

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to instack-undercloud (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/532805

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to instack-undercloud (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/532806

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to instack-undercloud (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/532807

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to instack-undercloud (stable/ocata)

Reviewed: https://review.openstack.org/532806
Committed: https://git.openstack.org/cgit/openstack/instack-undercloud/commit/?id=7e65c96eceb2794c4d4f7fb5fbafe6188408f3a4
Submitter: Zuul
Branch: stable/ocata

commit 7e65c96eceb2794c4d4f7fb5fbafe6188408f3a4
Author: Michele Baldessari <email address hidden>
Date: Tue Jan 9 15:56:27 2018 +0100

    Set password for mysql root user on undercloud

    The port is firewalled off by default so mysql is not reachable except
    to localhost users. In any case it is good to set a password for the
    mysql root user.

    We are 'reusing' the user_db_password parameter, because it is actually
    unused, instead of adding yet another parameter.

    Tested this change against an existing undercloud and observed that
    the mysql root user got a correct password and that the /root/.my.cnf
    file got generated.

    Closes-Bug: #1742191

    Change-Id: I408ce3a0fe2ab8e86bcc280256cdb51688efde75
    (cherry picked from commit 955c339af3ddf040fab4a153f1e6c249aefe0989)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to instack-undercloud (stable/pike)

Reviewed: https://review.openstack.org/532805
Committed: https://git.openstack.org/cgit/openstack/instack-undercloud/commit/?id=242756f75178d90f204609f630d86ffc6738d199
Submitter: Zuul
Branch: stable/pike

commit 242756f75178d90f204609f630d86ffc6738d199
Author: Michele Baldessari <email address hidden>
Date: Tue Jan 9 15:56:27 2018 +0100

    Set password for mysql root user on undercloud

    The port is firewalled off by default so mysql is not reachable except
    to localhost users. In any case it is good to set a password for the
    mysql root user.

    We are 'reusing' the user_db_password parameter, because it is actually
    unused, instead of adding yet another parameter.

    Tested this change against an existing undercloud and observed that
    the mysql root user got a correct password and that the /root/.my.cnf
    file got generated.

    Closes-Bug: #1742191

    Change-Id: I408ce3a0fe2ab8e86bcc280256cdb51688efde75
    (cherry picked from commit 955c339af3ddf040fab4a153f1e6c249aefe0989)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to instack-undercloud (stable/newton)

Reviewed: https://review.openstack.org/532807
Committed: https://git.openstack.org/cgit/openstack/instack-undercloud/commit/?id=6842a3cdc6c7ef625316696b538dd7d75ec088c0
Submitter: Zuul
Branch: stable/newton

commit 6842a3cdc6c7ef625316696b538dd7d75ec088c0
Author: Michele Baldessari <email address hidden>
Date: Tue Jan 9 15:56:27 2018 +0100

    Set password for mysql root user on undercloud

    The port is firewalled off by default so mysql is not reachable except
    to localhost users. In any case it is good to set a password for the
    mysql root user.

    We are 'reusing' the user_db_password parameter, because it is actually
    unused, instead of adding yet another parameter.

    Tested this change against an existing undercloud and observed that
    the mysql root user got a correct password and that the /root/.my.cnf
    file got generated.

    Closes-Bug: #1742191

    Change-Id: I408ce3a0fe2ab8e86bcc280256cdb51688efde75
    (cherry picked from commit 955c339af3ddf040fab4a153f1e6c249aefe0989)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/instack-undercloud 5.3.7

This issue was fixed in the openstack/instack-undercloud 5.3.7 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/instack-undercloud 7.4.8

This issue was fixed in the openstack/instack-undercloud 7.4.8 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/instack-undercloud 6.1.4

This issue was fixed in the openstack/instack-undercloud 6.1.4 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to instack-undercloud (stable/pike)

Related fix proposed to branch: stable/pike
Review: https://review.openstack.org/538226

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to instack-undercloud (stable/ocata)

Related fix proposed to branch: stable/ocata
Review: https://review.openstack.org/538227

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to instack-undercloud (stable/pike)

Reviewed: https://review.openstack.org/538226
Committed: https://git.openstack.org/cgit/openstack/instack-undercloud/commit/?id=900a198335c70566423cd2b48964d981e7ecb2e0
Submitter: Zuul
Branch: stable/pike

commit 900a198335c70566423cd2b48964d981e7ecb2e0
Author: Carlos Camacho <email address hidden>
Date: Tue Nov 7 10:43:59 2017 +0000

    Load undercloud DB password to a mistral environment

    This patch adds a new variable to the mistral
    environment 'tripleo.undercloud-config' allowing
    to retrieve the root password for the MySQL
    databases. Now this variable can be accessed from any
    Mistral workflow.
    Also, this patch adds the ability of checking if
    the variables are not loaded properly due to
    an upgrade, in that case we update the Mistral
    environment to have all the variables in place.

    Change-Id: I822c3d96b5805909656d8e92e963b851f3bd77de
    (cherry picked from commit be3bd48214e6719db9bd364f020ea5b652b9a536)
    Related-Bug: 1742191

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/instack-undercloud 8.2.0

This issue was fixed in the openstack/instack-undercloud 8.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to instack-undercloud (stable/ocata)

Reviewed: https://review.openstack.org/538227
Committed: https://git.openstack.org/cgit/openstack/instack-undercloud/commit/?id=aeac66c9ec7413f6cc80e045046ae82598d168e5
Submitter: Zuul
Branch: stable/ocata

commit aeac66c9ec7413f6cc80e045046ae82598d168e5
Author: Carlos Camacho <email address hidden>
Date: Tue Nov 7 10:43:59 2017 +0000

    Load undercloud DB password to a mistral environment

    This patch adds a new variable to the mistral
    environment 'tripleo.undercloud-config' allowing
    to retrieve the root password for the MySQL
    databases. Now this variable can be accessed from any
    Mistral workflow.
    Also, this patch adds the ability of checking if
    the variables are not loaded properly due to
    an upgrade, in that case we update the Mistral
    environment to have all the variables in place.

    (cherry picked from commit be3bd48214e6719db9bd364f020ea5b652b9a536)
    Change-Id: I822c3d96b5805909656d8e92e963b851f3bd77de
    Related-Bug: 1742191

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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