HP Insight Cluster Management Utility User Manual
Page 153
echo DELAY=0 >> $BRIDGE_CONF
echo IPADDR=${CMU_RCFG_IP} >> $BRIDGE_CONF
echo NETMASK=${CMU_RCFG_NTMSK} >> $BRIDGE_CONF
echo NM_CONTROLLED=no >> $BRIDGE_CONF
echo MTU=${NETWORK_MTU} >> $BRIDGE_CONF
fi
# this for loop expects all Intel Xeon Phi cards to be present in the output
# of ‘lspci’. If this is unreliable then change this to look for existing
# ${CMU_RCFG_PATH}/etc/sysconfig/mic/micX.conf files
mics=`lspci | grep -i co-processor | wc -l`
for (( mic=0; mic < mics; mic++ )); do
MIC_CONF="${CMU_RCFG_PATH}/etc/sysconfig/mic/mic${mic}.conf"
MIC_HOST_NIC="${CMU_RCFG_PATH}/etc/sysconfig/network-scripts/ifcfg-mic${mic}"
MIC_ROOT="${CMU_RCFG_PATH}/opt/intel/mic/filesystem/mic${mic}"
MIC_HOST="${MIC_ROOT}/etc/sysconfig/hostname"
MIC_NIC="${MIC_ROOT}/etc/sysconfig/network/ifcfg-mic0"
MIC_HOSTNAME="${CMU_RCFG_HOSTNAME}-mic${mic}"
hostinfo=`grep ${MIC_HOSTNAME} /etc/hosts`
MIC_IP=""
for x in $hostinfo; do
MIC_IP=$x
break
done
# update MIC_CONF
tmpfile=${MIC_CONF}-tmp
rm -f $tmpfile
while read line; do
echo $line | grep -q "^Hostname"; rc=$?
if [ $rc -eq 0 ]; then
echo "Hostname \"$MIC_HOSTNAME\"" >> $tmpfile
continue
fi
echo $line | grep -q "^Network StaticPair"; rc=$?
if [ $rc -eq 0 ]; then
echo "Network StaticPair br0 $MIC_IP no ${SHORT_NETMASK} ${NETWORK_MTU}" >> $tmpfile
continue
fi
echo $line | grep -q "^UserAuthentication"; rc=$?
if [ $rc -eq 0 ]; then
echo "UserAuthentication Local 0 0" >> $tmpfile
continue
fi
echo $line >> $tmpfile
done < $MIC_CONF
mv -f $MIC_CONF ${MIC_CONF}-orig
mv $tmpfile $MIC_CONF
# rewrite MIC_HOST_NIC
echo "DEVICE=mic${mic}" > $MIC_HOST_NIC
echo "ONBOOT=yes" >> $MIC_HOST_NIC
echo "NM_CONROLLED=no" >> $MIC_HOST_NIC
echo "BRIDGE=br0" >> $MIC_HOST_NIC
echo "MTU=${NETWORK_MTU}" >> $MIC_HOST_NIC
# rewrite MIC_HOST
echo "HOSTNAME=${MIC_HOSTNAME}" > $MIC_HOST
# rewrite MIC_NIC
echo "IPADDR=${MIC_IP}" > $MIC_NIC
echo "MTU=${NETWORK_MTU}" >> $MIC_NIC
echo "PREFIX=${SHORT_NETMASK}" >> $MIC_NIC
cp -f /etc/hosts ${MIC_ROOT}/etc/hosts
# sync root ssh keys with MIC
mkdir -p ${MIC_ROOT}/root/.ssh
cp -f /root/.ssh/config ${MIC_ROOT}/root/.ssh/
cp -f /root/.ssh/id_rsa ${MIC_ROOT}/root/.ssh/
cp -f /root/.ssh/id_rsa.pub ${MIC_ROOT}/root/.ssh/
cp -f /root/.ssh/authorized_keys2 ${MIC_ROOT}/root/.ssh/
done
# delete the MPSS daemon log
rm -f ${CMU_RCFG_PATH}/var/log/mpssd
# clean out old logs from the golden image
rm -f ${CMU_RCFG_PATH}/var/log/message*
rm -f ${CMU_RCFG_PATH}/var/log/secure*
8.7 Support for Intel Xeon Phi cards
153