Wrong dependencies for set_mysql_rootpw

Bug #1320842 reported by Bogdan Dobrelya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Invalid
Medium
Dmitry Ilyin

Bug Description

In the logs attached to the https://bugs.launchpad.net/fuel/+bug/1320210 ( https://bugs.launchpad.net/fuel/+bug/1320210/+attachment/4113861/+files/fuel-snapshot-2014-05-16_11-58-37.tgz )
there is a wrong exec order could be found for set_mysql_rootpw :
grep -e Access -e 'mysql.*Triggered' puppet-apply.log
2014-05-16T11:34:19.731655+00:00 debug: (/Stage[main]/Mysql::Password/Exec[set_mysql_rootpw]/unless) error: 'Access denied for user 'root'@'localhost' (using password: YES)'
2014-05-16T11:35:09.131943+00:00 notice: (/Stage[main]/Mysql::Config/Exec[mysqld-restart]) Triggered 'refresh' from 1 events

Mysql connection attempts must be done only after initial refresh for mysqld service.

Changed in fuel:
milestone: none → 5.0
importance: Undecided → High
assignee: nobody → Bogdan Dobrelya (bogdando)
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

Perhaps we should stop reinventing the wheel and use upstream synced mysql module (it has no issues with root passwords since v0.6.1)

Changed in fuel:
assignee: Bogdan Dobrelya (bogdando) → Dmitry Ilyin (idv1985)
status: New → Confirmed
Revision history for this message
Dmitry Ilyin (idv1985) wrote :

2014-05-16T11:34:19.361300+00:00 info: (/Stage[main]/Mysql::Password/Exec[set_mysql_rootpw]) Starting to evaluate the resource
2014-05-16T11:34:19.363676+00:00 debug: (Exec[set_mysql_rootpw](provider=posix)) Executing check 'mysqladmin -u root -pvz9NFsBx status > /dev/null'
2014-05-16T11:34:19.364213+00:00 debug: Executing 'mysqladmin -u root -pvz9NFsBx status > /dev/null'
2014-05-16T11:34:19.731012+00:00 debug: (/Stage[main]/Mysql::Password/Exec[set_mysql_rootpw]/unless) ^Gmysqladmin: connect to server at 'localhost' failed
2014-05-16T11:34:19.731655+00:00 debug: (/Stage[main]/Mysql::Password/Exec[set_mysql_rootpw]/unless) error: 'Access denied for user 'root'@'localhost' (using password: YES)'
2014-05-16T11:34:19.732524+00:00 debug: (Exec[set_mysql_rootpw](provider=posix)) Executing 'mysqladmin -u root password vz9NFsBx'
2014-05-16T11:34:19.733005+00:00 debug: Executing 'mysqladmin -u root password vz9NFsBx'
2014-05-16T11:34:19.977488+00:00 notice: (/Stage[main]/Mysql::Password/Exec[set_mysql_rootpw]/returns) executed successfully
2014-05-16T11:34:19.977760+00:00 debug: (/Stage[main]/Mysql::Password/Exec[set_mysql_rootpw]) The container Class[Mysql::Password] will propagate my refresh event
2014-05-16T11:34:19.978874+00:00 info: (/Stage[main]/Mysql::Password/Exec[set_mysql_rootpw]) Evaluated in 0.62 seconds

Well... Actually it's expected behaviour.

As You can see there was unless condition that tried to get mysql status using password. It was expected to fail because there was no password set and unless condition activated setting the password and it was set successfully.

The issue here is that command should be "mysqladmin -u root -pvz9NFsBx status 1> /dev/null 2>/dev/null" to hide misguiding erros from the log.

Changed in fuel:
importance: High → Low
milestone: 5.0 → 5.1
status: Confirmed → Triaged
Revision history for this message
Dmitry Ilyin (idv1985) wrote :

And, yes, updating mysql module to upstream would be great indeed.

Revision history for this message
Dmitry Ilyin (idv1985) wrote :

But there are SO many hacks and kludges related to Glera that we would not be able to update.

Changed in fuel:
importance: Low → Medium
Dmitry Ilyin (idv1985)
Changed in fuel:
status: Triaged → Invalid
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.