[ 
https://issues.apache.org/jira/browse/HDDS-2064?focusedWorklogId=305937&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-305937
 ]

ASF GitHub Bot logged work on HDDS-2064:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Sep/19 22:23
            Start Date: 03/Sep/19 22:23
    Worklog Time Spent: 10m 
      Work Description: bharatviswa504 commented on pull request #1398: 
HDDS-2064. OzoneManagerRatisServer#newOMRatisServer throws NPE when OM HA is 
configured incorrectly
URL: https://github.com/apache/hadoop/pull/1398#discussion_r320503175
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
 ##########
 @@ -614,6 +615,12 @@ private void loadOMHAConfigs(Configuration conf) {
             " system with " + OZONE_OM_SERVICE_IDS_KEY + " and " +
             OZONE_OM_ADDRESS_KEY;
         throw new OzoneIllegalArgumentException(msg);
+      } else if (!isOMAddressSet && found == 0) {
 
 Review comment:
   We cannot add this condition here, because think of case
   OZONE_OM_SERVICE_IDS_KEY = ns1,ns2
   Because after one iteration of nameserviceID if we are not able to find any 
om node matching with nameservice, we should not throw illegal configuration. 
We should try out all name services and see if it is matching with any 
nameservice. 
   
   And also, we can eliminate iteration of for loop with 
OmUtils.emptyAsSingletonNull(omServiceIds))  and similar for nameServiceIds. As 
for HA this is a must required configuration which needs to be set.
 
----------------------------------------------------------------
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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 305937)
    Time Spent: 40m  (was: 0.5h)

> OzoneManagerRatisServer#newOMRatisServer throws NPE when OM HA is configured 
> incorrectly
> ----------------------------------------------------------------------------------------
>
>                 Key: HDDS-2064
>                 URL: https://issues.apache.org/jira/browse/HDDS-2064
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Siyao Meng
>            Assignee: Siyao Meng
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> OM will NPE and crash when `ozone.om.service.ids=id1,id2` is configured but 
> `ozone.om.nodes.id1` doesn't exist; or `ozone.om.address.id1.omX` doesn't 
> exist.
> Root cause:
> `OzoneManager#loadOMHAConfigs()` didn't check the case where `found == 0`. 
> This happens when local OM doesn't match any `ozone.om.address.idX.omX` in 
> the config.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

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

Reply via email to