Daniel created HDDS-6453:
----------------------------
Summary: Problems with the Ozone start and stop scripts
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: Daniel
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.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]