Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.2.1
-
Ozone version: ozone-1.2.1
OS version: CentOS Linux release 7.8.2003 (Core)
Description
An error occurred while using Ozone's built-in start and stop script to manage the cluster:
[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]
After analyzing the script, run the following command:
ozone getconf -ozonemanagers
The result returned is:
{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]}
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:
# 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 + $? ))