Created
March 9, 2021 16:05
-
-
Save jturel/2941122e4025cefe3b5aeac1b6ec9cc9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/katello/tasks/pulp3_migration.rake b/lib/katello/tasks/pulp3_migration.rake | |
index 2106b38..d5645b9 100644 | |
--- a/lib/katello/tasks/pulp3_migration.rake | |
+++ b/lib/katello/tasks/pulp3_migration.rake | |
@@ -1,6 +1,9 @@ | |
namespace :katello do | |
desc "Runs a Pulp 2 to 3 Content Migration for supported types. May be run multiple times. Use wait=false to immediately return with a task url." | |
- task :pulp3_migration => ["dynflow:client", "check_ping"] do | |
+ task :pulp3_migration => ["dynflow:client"] do | |
+ Thread.current[:check_ping_services] = [:candlepin, :foreman_tasks, :pulp3, :pulp, :pulp_auth] | |
+ Rake.application.invoke_task('katello:check_ping') | |
+ | |
puts "Starting task." | |
SmartProxy.pulp_primary.refresh | |
diff --git a/lib/katello/tasks/reimport.rake b/lib/katello/tasks/reimport.rake | |
index 556d6bf..78af7d5 100644 | |
--- a/lib/katello/tasks/reimport.rake | |
+++ b/lib/katello/tasks/reimport.rake | |
@@ -4,7 +4,11 @@ namespace :katello do | |
desc "Runs a katello ping and prints out the statuses of each service" | |
task :check_ping => [:environment, "dynflow:client"] do | |
::User.current = ::User.anonymous_admin | |
- ping_results = Katello::Ping.ping | |
+ ping_results = if Thread.current[:check_ping_services] | |
+ Katello::Ping.ping(services: Thread.current[:check_ping_services]) | |
+ else | |
+ Katello::Ping.ping | |
+ end | |
if ping_results[:status] != "ok" | |
pp ping_results | |
fail("Not all the services have been started. Check the status report above and try again.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment