NIFI-11230: Log Warnings on Startup for OS Best Practices#7196
NIFI-11230: Log Warnings on Startup for OS Best Practices#7196emiliosetiadarma wants to merge 6 commits intoapache:mainfrom emiliosetiadarma:NIFI-11230
Conversation
exceptionfactory
left a comment
There was a problem hiding this comment.
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.
nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java
Outdated
Show resolved
Hide resolved
nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/process/AvailablePorts.java
Outdated
Show resolved
Hide resolved
nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/process/AvailablePorts.java
Outdated
Show resolved
Hide resolved
nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/process/AvailablePorts.java
Outdated
Show resolved
Hide resolved
nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/process/AvailablePorts.java
Outdated
Show resolved
Hide resolved
nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/process/RuntimeValidator.java
Outdated
Show resolved
Hide resolved
nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/process/RuntimeValidatorChecker.java
Outdated
Show resolved
Hide resolved
nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/process/RuntimeValidatorChecker.java
Outdated
Show resolved
Hide resolved
nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/process/TimedWaitDuration.java
Outdated
Show resolved
Hide resolved
nifi-bootstrap/src/test/java/org/apache/nifi/bootstrap/process/RuntimeValidatorCheckerTest.java
Outdated
Show resolved
Hide resolved
…orExecutor and implemented AbstractFileBasedRuntimeValidator
exceptionfactory
left a comment
There was a problem hiding this comment.
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.
Summary
NIFI-11230
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000Pull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-checkLicensing
LICENSEandNOTICEfilesDocumentation