WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@quba42
Copy link
Contributor

@quba42 quba42 commented Sep 18, 2025

Relates to "foreman-rake upgrade:run" rake task.

Problem:

  • A common scenario is for the above task to be run via the foreman-installer, this happens with every foreman-installer run.
  • The message tells users to: "..., see logs for more information."
  • The foreman-installer very visibly tells users, for example: "The full log is at /var/log/foreman-installer/katello.log".

=> Users are not directed to the foreman production log, and will end up chasing ghosts.

Ideally we can point users equally explicitly to a specific place like /var/log/foreman/production.log as well, however this is only correct if file based logging is configured on the foreman instance.

So my question is: Is it possible to know the logging configuration from the rake task run, and make the message conditional on that?

Relates to "foreman-rake upgrade:run" rake task.
Rake::Task[task.task_name].execute
rescue => e
puts "Failed upgrade task: #{task.name}, see logs for more information."
puts "Failed upgrade task: #{task.name}, see '/var/log/foreman/production.log' for more information."
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it possible to check where logging is going at run time, so we can make this part of the message contingent on what kind of logging is configured on the current foreman instance?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant