HDDS-1397. Avoid the usage of signal handlers in datanodes of the MiniOzoneClusters #701
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[~arpaga] showed me a problem that TestQueryNode.testHealthyNodesCount is failed in the CI check of HDDS-1339.
According to the logs the test is timed out because only 4 datanodes are started out of the 5.
The log also contained an exception from one datanode:
The code which requires the signal handler is the following (signal handler is registered in the startupShutdownMessage)
As you can read from the comment it's expected to be called with printBanner=false to avoid the creation of the signal handler.
Note: In the startupShutdownMessage method a new signal handler is registered and signal handlers can be registered only once:
We have a dedicated method to create datanode service for the unit tests. The only thing what we need is to turn OFF the signal handler registration here. (The following code fragment shows the original state where the signal handler creation is requested with the true parameter value)
See: https://issues.apache.org/jira/browse/HDDS-1397