Skip to content

Instantly share code, notes, and snippets.

@sayan3296
Created March 3, 2023 11:17
Show Gist options
  • Save sayan3296/ec9e19c19b8a7aa3907036533e477af7 to your computer and use it in GitHub Desktop.
Save sayan3296/ec9e19c19b8a7aa3907036533e477af7 to your computer and use it in GitHub Desktop.
Run SetContent task for all the ContentView Environments
cat << EOF | foreman-rake console
Katello::ContentViewEnvironment.all.each do |cve|
ForemanTasks.async_task(
Actions::Candlepin::Environment::SetContent,
cve.content_view,
cve.owner,
cve,
)
end
EOF
@sayan3296
Copy link
Author

If any of the generated task fails with some transactional block or entity version error, we may need to follow https://access.redhat.com/solutions/6958601 and then resume the task

Once done, tomcat service should be restarted as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment