Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Fixes #21321 - Check for foreman_proxy_content to allow puppet upgrade #551

Merged
merged 1 commit into from Oct 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion hooks/init/31-upgrade-puppet.rb
Expand Up @@ -52,7 +52,7 @@ def fail_and_exit(message)
fail_and_exit 'Puppet already installed and upgraded. Skipping.' if File.exist?(PUPPET_UPGRADE_COMPLETE)

katello = Kafo::Helpers.module_enabled?(@kafo, 'katello')
foreman_proxy_content = @kafo.param('foreman_proxy_plugin_pulp', 'pulpnode_enabled').value
foreman_proxy_content = Kafo::Helpers.module_enabled?(@kafo, 'foreman_proxy_content')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised we have a copy of that. I'd expect https://github.com/theforeman/kafo/blob/db5645b18cbce377ce089e3a898aee868e965070/lib/kafo/hook_context.rb#L70-L72 to work as well. Have you tried that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not, but I'd prefer to fix this BZ using our proven tooling, then tackle an issue to update usage across the board if thats fine?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough for now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


fail_and_exit 'Puppet 3 to 4 upgrade is not currently supported for the chosen scenario.' unless katello || foreman_proxy_content

Expand Down
2 changes: 1 addition & 1 deletion hooks/post/31-upgrade-puppet.rb
Expand Up @@ -34,7 +34,7 @@ def puppet_upgrade_complete?
if app_value(:upgrade_puppet) && !puppet_upgrade_complete?

katello = Kafo::Helpers.module_enabled?(@kafo, 'katello')
foreman_proxy = @kafo.param('foreman_proxy_plugin_pulp', 'pulpnode_enabled').value
foreman_proxy = Kafo::Helpers.module_enabled?(@kafo, 'foreman_proxy_content')

if katello || foreman_proxy
upgrade_step :restart_services
Expand Down
2 changes: 1 addition & 1 deletion hooks/pre_validations/31-upgrade-puppet.rb
Expand Up @@ -9,7 +9,7 @@ def fail_and_exit(message)
fail_and_exit 'Puppet already installed and upgraded. Skipping.' if File.exist?(PUPPET_UPGRADE_COMPLETE)

katello = Kafo::Helpers.module_enabled?(@kafo, 'katello')
foreman_proxy_content = @kafo.param('foreman_proxy_plugin_pulp', 'pulpnode_enabled').value
foreman_proxy_content = Kafo::Helpers.module_enabled?(@kafo, 'foreman_proxy_content')

fail_and_exit 'Puppet 3 to 4 upgrade is not currently supported for the chosen scenario.' unless katello || foreman_proxy_content

Expand Down