Skip to content

Commit

Permalink
Fixes #37666 - Fix Candlepin reset in reset rake task
Browse files Browse the repository at this point in the history
  • Loading branch information
chris1984 committed Jul 25, 2024
1 parent f43b70a commit 8fed606
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/katello/tasks/reset.rake
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ namespace :katello do
puts "\e[33mStarting Candlepin Reset\e[0m\n\n"

system(service_stop.gsub("%s", 'tomcat'))
system("sudo runuser - postgres -c 'dropdb candlepin'")
system("sudo runuser - postgres -c 'createdb candlepin'")
system("sudo /usr/share/candlepin/cpdb --create --schema-only")
system("sudo /usr/share/candlepin/cpdb --update")
system("sudo /usr/share/candlepin/cpdb --drop -u postgres")
system("sudo /usr/share/candlepin/cpdb --create -u postgres")
system("sudo /usr/share/candlepin/cpdb --update-schema")
system(service_start.gsub("%s", 'tomcat'))
puts "\e[32mCandlepin Database Reset Complete\e[0m\n\n"
end
Expand Down

0 comments on commit 8fed606

Please sign in to comment.