-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDDS-6453. Ozone start/stop script cannot resolve OM nodes in HA #3366
Conversation
@@ -82,7 +82,8 @@ OZONE_JUMBO_RETCOUNTER=$? | |||
|
|||
#--------------------------------------------------------- | |||
# Ozone ozonemanager nodes | |||
OM_NODES=$("${OZONE_HOME}/bin/ozone" getconf -ozonemanagers 2>/dev/null) | |||
TMP_OM_NODES=$("${OZONE_HOME}/bin/ozone" getconf -ozonemanagers 2>/dev/null) | |||
OM_NODES=`echo $TMP_OM_NODES | grep -o '\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}' | sort -d | uniq` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment for what the intent of this line is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks for the tip.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comment on the Jira.
@adoroszlai Obtain OM nodes list by using the command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @MLikeWater for the patch and sorry for the delay in review.
TestGetConfOptions
is failing and needs to be updated.
@@ -113,9 +113,10 @@ public static InetSocketAddress getOmAddress(ConfigurationSource conf) { | |||
* @param conf {@link ConfigurationSource} | |||
* @return {service.id -> [{@link InetSocketAddress}]} | |||
*/ | |||
public static Map<String, List<InetSocketAddress>> getOmHAAddressesById( | |||
public static Collection<InetSocketAddress> getOmHAAddressesById( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would like to add structured output later (item 3 from the Jira issue). So please keep getOmHAAddressesById()
(and testGetOmHAAddressesById()
) unchanged, and add a new method that flattens the map to a list.
One way to implement that, but you can also use loops:
public static Collection<InetSocketAddress> getOmAddresses(
ConfigurationSource conf) {
return getOmHAAddressesById(conf).values().stream()
.flatMap(Collection::stream)
.collect(toList());
}
This should be called from OzoneManagersCommandHandler
, and a new test method in TestOmUtils
.
/pending |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking this issue as un-mergeable as requested.
Please use /ready
comment when it's resolved.
Please note that the PR will be closed after 21 days of inactivity from now. (But can be re-opened anytime later...)
/pending
Thank you very much for the patch. I am closing this PR temporarily as there was no activity recently and it is waiting for response from its author. It doesn't mean that this PR is not important or ignored: feel free to reopen the PR at any time. It only means that attention of committers is not required. We prefer to keep the review queue clean. This ensures PRs in need of review are more visible, which results in faster feedback for all PRs. If you need ANY help to finish this PR, please contact the community on the mailing list or the slack channel." |
@MLikeWater do you plan to revisit this PR and address pending review comments? |
What changes were proposed in this pull request?
Fix the problem that the Ozone start and stop script resolve OM node, and ensure that the start-ozone.sh and stop-ozone.sh command is used to manage the start and stop services of the Ozone cluster.
What is the link to the Apache JIRA
HDDS-6453
How was this patch tested?