book
Article ID: KB0081658
calendar_today
Updated On:
Description
Resolution:
The engine daemon does not pick up the MAC address correctly in a RHEL 7 host due to a different output format of the command "ifconfig -a" in RHEL 7 to
older versions of RHEL. The new format in RHEL 7 looks like below:
[tibco@trex-centos-01 ~]$ ifconfig -a
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.42.1 netmask 255.255.0.0 broadcast 0.0.0.0
ether 56:84:7a:fe:97:99 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
The engine.sh file in Silver Fabric versions lower than 5.8.0 HF04 looks for the MAC address using the command:
"MACADDRCMD=`/sbin/ifconfig -a | grep HWaddr | awk 'NR==1 {gsub(":",""); print $5}'`"
and fails to return the MAC address as it could not find the HWaddr field.
The workaround is to replace the above command with :
MACADDRCMD=`/sbin/ifconfig -a | grep HWaddr | awk 'NR==1 {gsub(":",""); print $5}'`
#the correct MACADDRCMD command varies per OS, if above command failed, try alternate parsing of ifconfig results, then if that fails too try ip addr
if [ -z ${MACADDRCMD} ]; then
MACADDRCMD=`/sbin/ifconfig -a | grep 'ether ' | awk 'NR==1 {gsub(":",""); print $2}'`
if [ -z ${MACADDRCMD} ]; then
MACADDRCMD=`ip -0 -o addr|sed -e'/lo/d;1p; s/^.*link[^ ]* \([^ ]*\) .*$/\1/;t;d' | head -n 1`
fi
DS_USE_SNAT_IP_ADDRESS=`/sbin/ifconfig eth0 | grep inet | grep -v inet6 | awk '{print $2}'`
export DS_USE_SNAT_IP_ADDRESS
fi
in the engine.sh file when on SF versions lower than 5.8.0 HF 04 so that it resolves the MAC address correctly irrespective of the output of 'ifconfig -a' in both RHEL 6 and RHEL 7 engine hosts.
Note 1:
The engine.sh file under the 'engineUpdate' directory on the Silver Fabric Broker at the location webapps/livecluster/engineUpdate/linux64/engine.sh must be updated with the change.
In addition, on a RHEL 7 engine host, this change in the engine.sh file is required for the engine daemon to startup, before it tries to synchronize the required files from the broker's 'engineUpdate' directory. Hence, it needs to be manually applied to the engine.sh script on each of the SF engine hosts running on RHEL7 to help the engine daemons start up. However, on a RHEL 6 or lower version engine host, it is sufficient to make this change in the engine.sh file under the broker's 'engineUpdate' directory alone and it would sync the changes from the broker's engine Update directory after the first startup.
Note 2:
New and existing engines on RHEL 7 and lower versions of the operating system would require a restart as soon as they sychronize the engine.sh file with this change from the broker's engineUpdate directory after the first startup to take effect.
Issue/Introduction
Engine.sh script doesn't resolve the MAC address in Silver Fabric versions lower than SF 5.8.0 HF04 due a different ifconfig format on RHEL 7