Skip to content

NIFI-11230: Log Warnings on Startup for OS Best Practices#7196

Closed
emiliosetiadarma wants to merge 6 commits intoapache:mainfrom
emiliosetiadarma:NIFI-11230
Closed

NIFI-11230: Log Warnings on Startup for OS Best Practices#7196
emiliosetiadarma wants to merge 6 commits intoapache:mainfrom
emiliosetiadarma:NIFI-11230

Conversation

@emiliosetiadarma
Copy link
Contributor

@emiliosetiadarma emiliosetiadarma commented Apr 25, 2023

Summary

NIFI-11230

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using mvn clean install -P contrib-check
    • JDK 11
    • JDK 17

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together @emiliosetiadarma! These checks and warnings should be helpful for troubleshooting potential system configuration problems.

The general approach looks good. It looks like there is some potential for reuse across the multiple RuntimeValidator implementations, and aside from that, I noted several minor stylistic recommendations.

@emiliosetiadarma emiliosetiadarma marked this pull request as ready for review May 1, 2023 17:24
Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

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

Thanks for making the adjustments @emiliosetiadarma! After some runtime testing, I made some minor adjustments to the warning messages.

I created a getResultBuilder() method in the abstract checker to use getClass().getSimpleName() to avoid logging the full class name for warnings. I also adjusted the warning messages to include the /proc file path so the source of the problem is clear.

With those changes, example output appears as follows:

Runtime Configuration [Swappiness] validation failed: Swappiness [60] more than recommended [0] according to [/proc/sys/vm/swappiness]

With these changes, this should be ready to go following successful automated builds.

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