[MCOL-943] multi-node postConfigure fails when mysql password is set. Created: 2017-09-27  Updated: 2023-10-26  Resolved: 2017-11-04

Status: Closed
Project: MariaDB ColumnStore
Component/s: ?
Affects Version/s: 1.0.11, 1.1.0
Fix Version/s: 1.0.12, 1.1.1

Type: Bug Priority: Minor
Reporter: David Hill (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Environment:

multi-node um and pm system


Sprint: 2017-20, 2017-21, 2017-22

 Description   

Customer reported that the postConfigure install failed when they had the mysql password configured in the $HOME/.my.cnf file.

So it looks like postConfigure and the installs scripts arent checking for a mysql password that is configured. It does have a command line argument for it.



 Comments   
Comment by Geoff Montee (Inactive) [ 2017-09-28 ]

See also MCOL-947.

Comment by David Hill (Inactive) [ 2017-10-20 ]

fixed in 1.0, 1.1 and 1.2

1.0

commit 539edb51beac372555681ddf8aa0934fb264e86a
Merge: 9f8c57e 9d0bb31
Author: david hill <david.hill@mariadb.com>
Date: Fri Oct 20 17:00:47 2017 -0500

1.1

commit 8f5748d50a8c272fdb0b779aa32a7c6523b92100
Author: david hill <david.hill@mariadb.com>
Date: Fri Oct 20 16:38:45 2017 -0500

1.2

commit d21eac4951b81a419e107de1132d944f51aecc66
Author: david hill <david.hill@mariadb.com>
Date: Fri Oct 20 16:37:47 2017 -0500

Comment by David Hill (Inactive) [ 2017-10-23 ]

To test out the mysql password setup, follow these instructions to setup the .my.cnf file

https://mariadb.com/kb/en/library/mariadb-columnstore-system-usage/#mysql-root-user-password

here is an example I tested with:

[mariadb-user@ip-172-30-0-161 ~]$ cat .my.cnf
[mysqladmin]
user = root
password = Calpont1

so to test...

1. do installs without a password including local query
a. run the mcsadmin disableMySQLReplication and enableMySQLReplication (hum, we might want to change that name)
2. negative test - add password to um1 mysql without a .my.cnf file, install will fail
3. add password to um1 mysql with a .my.cnf file on um1 only, install should pass. code is changed to push .my.cnf to other nodes.
a. run the mcsadmin disableMySQLReplication and enableMySQLReplication

Comment by David Hill (Inactive) [ 2017-11-01 ]

NOTES from Daniel Lee

Build tested: 1.1.1-1

Because of the issue of MCOL-998, and for the sake of testing this ticket. I did testing using the following steps:

1) Installed a 1um2pm local query stack (replication is not working because of MCOL-998)
2) setup a mysql password and a .my.cnf file on all three nodes.
3) verified that mcsmysql is working using the .my.cnf file

Here is the content of my .my.cnf file

[client]
user=root
password=calpont1

The bug ticket indicated that the section name should be [mysqladmin], but it did not work for me.

4) shutdownsystem
5) rerun postConfigure
at the end of postConfigure:

post-mysqld-install Successfully Completed
Error running post-mysql-install, password is needed. check /root/.my.cnf
Exiting...

debug.log contains:

Nov 1 21:50:55 localhost oamcpp[4498]: 55.278856 |0|0|0| D 08 CAL0000: getMySQLPassword: checking: /root/.my.cnf
Nov 1 21:50:55 localhost oamcpp[4498]: 55.278880 |0|0|0| D 08 CAL0000: getMySQLPassword: doesn't exist: /root/.my.cnf

I was able to start the columnstore mysql service manually. mcsmysql then worked with .my.cnf.

I also did a shutsystem again and startsystem, the stack came up and mcsmysql work with .my.cnf on all nodes.

I also add a addmodule test and the .my.cnf file did get push to the newly added module.

Comment by David Hill (Inactive) [ 2017-11-01 ]

Also Daniel discovered the client should be in the .my.cnf file with username and password. When client is there, mysqld will automatically log in. With this being the case, OAM code doesnt need to try to parse the .my.cnf file to extract the password and pass it in via command line argument.

Will test that out and hopefully will resolve the issues Daniel is having..

Comment by David Hill (Inactive) [ 2017-11-02 ]

all of our scripts where we are calling mysqld will now just have mysqld extract the password from .my.cnf. previous code OAM was parsing the password from this file and passing it as a command line argument... Daniel showed me yesterday that is you setup .my.cnf with 'client' subsection, then mysqld will automatically read the password from there... so no need for our code to pass it as a command line argument..

Comment by David Hill (Inactive) [ 2017-11-02 ]

commit f9bdec3225cf383811fbdd6aa61754473a950221
Author: david hill <david.hill@mariadb.com>
Date: Thu Nov 2 16:32:38 2017 -0500

MCOL-943 - change to use defauly mysql password logic, reading from the .my.cnf file. changesfrom defaults-file to defulats-extra-file

Generated at Thu Feb 08 02:24:59 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.