-
-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cookbook tries to set root password on every run instead of first install only #174
Comments
Hi! Thanks for reporting this. This behaviour doesn't sound very familiar though, my experience with this cookbook has been setting/managing the root password via the cookbook. That said I'm happy to help restore previous behaviour but I can't see how that worked before. Cheers, |
Hi Stephen, Sorry I appreciate I was a bit rushed when filing the report! We too are setting/managing the root password with the cookbook using the following attributes:
You are correct - that piece of code hasn't changed - but the trigger for it did. Previously it was called from the lines immediate above you link: https://github.com/sinfomicien/mariadb/blob/v1.5.1/recipes/_redhat_server.rb#L34-L43 You can see that This would ultimately mean the password is only set on first install, as it should be. However, now, these lines trigger the post install recipe regardless, and the post install recipe now triggers the password reset regardless, unless it is empty. Ultimately you could add a check to the post install script like: EG, if you can show databases without a password, the password is blank and needs to be set - obviously this would need to be combined with the existing empty password check. Sorry I would submit a patch but I have no way of testing on our boxes at the moment. |
Thanks for the additional info! I see what you mean - no problem re patch, I think I have enough to work something out. Unfortunately I am short on time for the next two days, but should have the fix released on Thursday. I've created #175 as a reminder to write some documentation in the README on using Test Kitchen to do some troubleshooting/testing patches. |
@damacus this is definitely a bug and not a documentation issue :) |
Agreed - updated labels and should have some time this afternoon to sort this out. |
Fail... Sorry about that.. I shouldn't be changing labels that late at night :D |
In looking at these lines: case node['mariadb']['install']['type']
when 'package'
include_recipe platform_post_install_recipe
end
include_recipe "#{cookbook_name}::_mariadb_postinstall" ... I had a little trouble understanding why _redhat_server_postinstall existed at all if /etc/mariadb_grants contained In any event, I was able to reproduce this bug with a .kitchen.local.yml file of: ---
suites:
#
# default
#
- name: default
run_list:
- recipe[mariadb::default]
attributes:
mariadb:
use_default_repository: true
server_root_password: 'NEWPASSWORD'
forbid_remote_root: false
allow_root_pass_change: true Executing After #176, I was able to execute |
PR has been merged, I need some time to update the metadata to reflect this cookbook's now with Sous Chefs. I'll update when it's in the supermarket. Thanks @mjuszczak ! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Looks like changes a few days ago no longer check whether this is a fresh install for RH7 - the post install script just repeatedly tries to set the root password regardless.
This was introduced in 1.5.2 (which has affected us as we use pessimistic locking and this is quite a large change for minor patch release).
Edit:
Can confirm rolling back to a hard lock on 1.5.1 fixes this in the short term, so it is a regression introduced in 1.5.2 #173
The text was updated successfully, but these errors were encountered: