Skip to content

HDDS-8482. Let Ozone shell support multiple OM services#4613

Merged
adoroszlai merged 2 commits intoapache:masterfrom
whbing:HDDS-8482
Apr 26, 2023
Merged

HDDS-8482. Let Ozone shell support multiple OM services#4613
adoroszlai merged 2 commits intoapache:masterfrom
whbing:HDDS-8482

Conversation

@whbing
Copy link
Contributor

@whbing whbing commented Apr 24, 2023

What changes were proposed in this pull request?

Ozone cli support multiple ozone.om.service.ids

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-8482

How was this patch tested?

manual tests passed.

without pr:

$ ozone sh vol ls o3://ozone1
Following ServiceID's [ozone1, ozone2] are defined in the configuration. Use the method getRpcClient which takes serviceID and configuration as param

with pr:

# case1
$ ozone sh vol ls o3://ozone1
[ {
  "metadata" : { }...
]

# case2
$ ozone sh vol ls o3://ozone2
[ {
  "metadata" : { }...
]

# case3
ozone sh vol ls
Service ID or host name must not be omitted when multiple ozone.om.service.ids is defined  

@kerneltime
Copy link
Contributor

cc @DaveTeng0 @tanvipenumudy can you'll please take a look?

@kerneltime kerneltime requested a review from aswinshakil April 24, 2023 16:05
Copy link
Contributor

@Xushaohong Xushaohong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exactly the case under the condition "When host is an HA service ID" as the code
if (OmUtils.isOmHAServiceId(conf, ozoneURI.getHost())) , it is fine to choose the service id through URI host.
LTGM. Thanks @whbing for the work.

@whbing
Copy link
Contributor Author

whbing commented Apr 25, 2023

@Xushaohong Thanks for review. Added test.

@whbing
Copy link
Contributor Author

whbing commented Apr 25, 2023

All tests passed in https://github.com/whbing/ozone/actions/runs/4794048829
please help trigger this workflows, thanks.

@adoroszlai adoroszlai changed the title HDDS-8482. Ozone cli support multiple ozone.om.service.ids HDDS-8482. Let Ozone shell support multiple OM services Apr 26, 2023
@adoroszlai adoroszlai merged commit 7380917 into apache:master Apr 26, 2023
@adoroszlai
Copy link
Contributor

Thanks @whbing for the patch, @Xushaohong for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants