You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Attila Doroszlai (Jira)" <ji...@apache.org> on 2023/09/05 09:20:00 UTC

[jira] [Commented] (HDDS-6453) Ozone start/stop script cannot resolve OM nodes in HA

    [ https://issues.apache.org/jira/browse/HDDS-6453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17762005#comment-17762005 ] 

Attila Doroszlai commented on HDDS-6453:
----------------------------------------

Thanks [~himanshi.darvekar] for taking up work on this.  When creating the new PR, please make sure to keep [~jiangshouzhuang]'s commits, so that both authors can get credit for their work.  Let me know if you need help with that.

> Ozone start/stop script cannot resolve OM nodes in HA
> -----------------------------------------------------
>
>                 Key: HDDS-6453
>                 URL: https://issues.apache.org/jira/browse/HDDS-6453
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: Ozone Manager
>    Affects Versions: 1.2.1
>         Environment: Ozone version: ozone-1.2.1
> OS version: CentOS Linux release 7.8.2003 (Core)
>            Reporter: MLikeWater
>            Assignee: Himanshi Darvekar
>            Priority: Major
>              Labels: kubernetes, pull-request-available
>
> An error occurred while using Ozone's built-in start and stop script to manage the cluster:
> {code:java}
> [hadoop@k8s-master01 ozone-1.2.1]$ start-ozone.sh 
> Starting datanodes
> Starting Ozone Manager nodes [{cluster1=[k8s-master01.ai.com/10.206.0.3:9862, k8s-master02.ai.com/10.206.0.2:9862, k8s-master03.ai.com/10.206.0.8:9862]}]
> sed: -e expression #1, char 30: unknown option to `s'
> sed: -e expression #1, char 41: unknown option to `s'
> sed: -e expression #1, char 30: unknown option to `s'
> Starting storage container manager nodes [k8s-master02.ai.com
> k8s-master01.ai.com
> k8s-master03.ai.com] {code}
> After analyzing the script, run the following command:
> {code:java}
> ozone getconf -ozonemanagers {code}
> The result returned is:
> {code:java}
> {cluster1=[k8s-master01.ai.com/10.206.0.3:9862, k8s-master02.ai.com/10.206.0.2:9862, k8s-master03.ai.com/10.206.0.8:9862]}{code}
> Therefore, the script fails to parse host information.
>  
> There are two ways to solve this problem:
> 1. Modify the executable  script ozone to print the host name or IP address list (similar to SCM),
> 2. The other way, simply process the returned result:
> {code:java}
> # Ozone ozonemanager nodes
> 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`
> echo "Starting Ozone Manager nodes [${OM_NODES}]"
> if [[ "${OM_NODES}" == "0.0.0.0" ]]; then
>   OM_NODES=$(hostname)
> fi
> ozone_uservar_su hdfs om "${OZONE_HOME}/bin/ozone" \
>   --workers \
>   --config "${OZONE_CONF_DIR}" \
>   --hostnames "${OM_NODES}" \
>   --daemon start \
>   om
> (( OZONE_JUMBO_RETCOUNTER=OZONE_JUMBO_RETCOUNTER + $? )){code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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