-
Notifications
You must be signed in to change notification settings - Fork 134
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
Fixes #29184 - Add cdn-ssl param migration hook #477
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please have a look at the whitespace.
@ekohl updated to fix the rubocop issues. I did part of it in the pre hook since I noticed when doing everything in the post hook, we did not remove the parameter in the When I ran the installer again to confirm that the logic was working correctly, I noticed it removing the param from the |
That's a good point and indeed needed. I was only thinking about the |
@ehelms @ekohl updating and working :) I tested with the puppet-katello pr and here is the results of my testing: Pre Commit Hook: [ INFO 2020-03-19T13:39:22 verbose] Executing hooks in group pre_commit
[ INFO 2020-03-19T13:39:28 verbose] cdn_ssl_version param found, storing for post hook Removing it from [ WARN 2020-03-19T13:41:37 verbose] /Stage[main]/Katello::Application/File[/etc/foreman/plugins/katello.yaml]/content:
[ WARN 2020-03-19T13:41:37 verbose] --- /etc/foreman/plugins/katello.yaml 2020-03-18 17:55:15.435217825 +0000
[ WARN 2020-03-19T13:41:37 verbose] +++ /tmp/puppet-file20200319-5570-ay4sq4 2020-03-19 13:41:37.581697239 +0000
[ WARN 2020-03-19T13:41:37 verbose] @@ -2,7 +2,6 @@
[ WARN 2020-03-19T13:41:37 verbose] ## Module: puppet-katello
[ WARN 2020-03-19T13:41:37 verbose]
[ WARN 2020-03-19T13:41:37 verbose] :katello:
[ WARN 2020-03-19T13:41:37 verbose] - :cdn_ssl_version: SSLv23
[ WARN 2020-03-19T13:41:37 verbose] :rest_client_timeout: 3600
[ WARN 2020-03-19T13:41:37 verbose]
[ WARN 2020-03-19T13:41:37 verbose] :content_types:
[ INFO 2020-03-19T13:41:37 verbose] Computing checksum on file /etc/foreman/plugins/katello.yaml
[ INFO 2020-03-19T13:41:37 verbose] /Stage[main]/Katello::Application/File[/etc/foreman/plugins/katello.yaml]: Filebucketed /etc/foreman/plugins/katello.yaml to puppet with sum 1f74ed4f03f430a2574a4cca5f4e3feb
[ WARN 2020-03-19T13:41:37 verbose] /Stage[main]/Katello::Application/File[/etc/foreman/plugins/katello.yaml]/content: content changed '{md5}1f74ed4f03f430a2574a4cca5f4e3feb' to '{md5}778fa03cb7efcc2f6e5752b558077bbb' Post Hook Running: [ INFO 2020-03-19T13:46:32 verbose] cdn_ssl_version param found, migrating to a Katello setting
[ INFO 2020-03-19T13:47:03 verbose] All hooks in group post finished Screenshot showing it in the settings page: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to clear the value for cdn_ssl_version
in the custom config to avoid calling the same rake task every time.
@ekohl how does this look, if it looks good ill test it again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks correct though I didn't test it.
@ekohl updated and it works again with testing, only difference this time with using
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm debating whether it should be pre_validations
rather than pre_commit
. The values should already be present then and there's less code that could interfere with it (no validations nor the entire interactive mode). However, I have insufficient experience with hooks to know whether it can really be a problem. @ehelms any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ehelms any last comments?
No description provided.