Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: hb_report: indicate the 'crm report' failure #288

Merged

Conversation

aleksei-burlakov
Copy link
Contributor

Previously, even if the crm report had failed, the hawk would show the green status. In this change, we add reading ./tmp/pids/report.exit and ./tmp/reports/.stderr We return the first line of the error message and the red status, if the execution has failed.

@nicholasyang2022
Copy link

Can I use test it by patching files directly in an installed system?

cd /usr/share/hawk/
curl -L https://github.com/ClusterLabs/hawk/pull/288.patch | patch -p2

Or do I have to build a package and install it?

@aleksei-burlakov
Copy link
Contributor Author

Can I use test it by patching files directly in an installed system?

cd /usr/share/hawk/
curl -L https://github.com/ClusterLabs/hawk/pull/288.patch | patch -p2

Or do I have to build a package and install it?

Puma server doesn't directly use the .js files in the production mode. It would rather use the old cache of the report.js . To enable the change you would have to switch to the development mode.

  1. Edit the file /etc/sysconfig/hawk and change the HAWK_ENV="development"
  2. Then restart the hawk-backend service systemctl restart hawk-backend
  3. And reload the web-page (button F5).

@nicholasyang2022
Copy link

Puma server doesn't directly use the .js files in the production mode. It would rather use the old cache of the report.js . To enable the change you would have to switch to the development mode.

It is not enough to set HAWK_ENV="development". I have to remove directory public/ to get rid of the cache.

Previously, even if the crm report had failed, the hawk
would show the green status. In this change, we add reading
./tmp/pids/report.exit and ./tmp/reports/<report-file>.stderr
We return the first line of the error message and the red status,
if the execution has failed.
Copy link

@nicholasyang2022 nicholasyang2022 left a comment

Choose a reason for hiding this comment

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

Tested. LGTM.

@aleksei-burlakov aleksei-burlakov merged commit 9f555fd into ClusterLabs:master Sep 26, 2024
1 check passed
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.

2 participants