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

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

                Author: ASF GitHub Bot
            Created on: 04/Sep/19 20:22
            Start Date: 04/Sep/19 20:22
    Worklog Time Spent: 10m 
      Work Description: smengcl 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_r320956763
 
 

 ##########
 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:
   @bharatviswa504 Thanks for the review. You are right. Now I understand that 
it makes sense to walk through all configured service ids before declaring 
failure.
   
   I should probably just put `found == 0` check outside the `serviceId` loop.
 
----------------------------------------------------------------
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:
[email protected]


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

    Worklog Id:     (was: 306695)
    Time Spent: 1h  (was: 50m)

> 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: 1h
>  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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to