zzzeek / user_restriction

0 stars 0 forks source link

straight delete of usernames and then a restore on different host seems to confuse heat #5

Open zzzeek opened 4 years ago

zzzeek commented 4 years ago

doing a restore, then doing an overcloud update, heat logs:

\"Error: Execution of '/usr/bin/mysql --defaults-extra-file=/root/.my.cnf --host= --database=mysql -e CREATE USER 'aodh'@'10.0.20.22' IDENTIFIED BY PASSWORD '*3BB1684CA61A6E39761DD91C73D0E8340B2012EB'' returned 1: ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'aodh'@'10.0.20.22'\",                    
        \"Error: /Stage[main]/Aodh::Db::Mysql/Openstacklib::Db::Mysql[aodh]/Openstacklib::Db::Mysql::Host_access[aodh_10.0.20.22]/Mysql_user[aodh@10.0.20.22]/ensure: change from absent to present failed: Execution of '/usr/bin/mysql --defaults-extra-file=/root/.my.cnf --host= --database=mysql -e CREATE USER 'aodh'@'10.0.20.22' IDENTIFIED BY PASSWORD '*3BB1684CA61A6E39761DD91C73D0E8340B2012EB'' returned 1: ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'aodh'@'10.0.20.22'\",
"Error: Execution of '/usr/bin/mysql --defaults-extra-file=/root/.my.cnf --host= --database=mysql -e CREATE USER 'cinder'@'10.0.20.11' IDENTIFIED BY PASSWORD '*E24F827931AE71D1EFAE239719C3125E9DBF4ACC'' returned 1: ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'cinder'@'10.0.20.11'\",
        \"Error: /Stage[main]/Cinder::Db::Mysql/Openstacklib::Db::Mysql[cinder]/Openstacklib::Db::Mysql::Host_access[cinder_10.0.20.11]/Mysql_user[cinder@10.0.20.11]/ensure: change from absent to present failed: Execution of '/usr/bin/mysql --defaults-extra-file=/root/.my.cnf --host= --database=mysql -e CREATE USER 'cinder'@'10.0.20.11' IDENTIFIED BY PASSWORD '*E24F827931AE71D1EFAE239719C3125E9DBF4ACC'' returned 1: ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'cinder'@'10.0.20.11'\",

etc

zzzeek commented 4 years ago

it's not clear why this happens because those usernames are there, so somehow puppet thinks these names are absent. overall it seems like we will need to restore the mysql.user table to a pristine form in order for this to work.