sodonnel opened a new pull request #719: HDDS-3270. Allow safemode listeners to 
be notified when some precheck rules pass
URL: https://github.com/apache/hadoop-ozone/pull/719
 
 
   ## What changes were proposed in this pull request?
   
   As part of the SCM safemode process, there are some rules which must pass 
before safemode can be exited.
   
   One of these rules is the number of registered datanodes and another is that 
at least one pipeline must be created and open.
   
   Currently, pipeline creation is attempted each time a node registers. As 
soon as the 3rd node registers, pipelines will be created.
   
   There are two issue with this:
   
   1. With network topology, if the first 3 nodes are all from the same rack, a 
non-rackaware pipeline will get created.
   
   2. With multi-raft, it would be better if more nodes are registered to allow 
the multiple pipelines per node to be spread across all the available nodes.
   
   The proposal here, is to introduce a new sub-state into the safemode 
process, call "preCheckComplete". When adding rules to the Safemode Manager, 
some rules can be tagged as "preCheck" (eg number of datanodes registered). 
When all all the pre-check rules have passed a notification will be sent to all 
safemode listeners:
   ```
     safeModeIsOn -> true
     preCheckComplete -> true
   ```
   That will allow the listener to take action on this first stage completing. 
In the case of PipelineManager, it will then allow pipelines to be created.
   
   After the remaining rules have been passed, safemode will exit as normal, by 
sending a second event:
   ```
     safeModeIsOn -> false
     preCheckComplete -> true
   ```
   
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-3270
   
   ## How was this patch tested?
   
   New unit tests added and existing tests modified.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org

Reply via email to