mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 09:32:21 +00:00
Support RHV 4.4
Unfortunately, RHV considers rebasing from RHEL7 to RHEL8 to be a 'minor' change. So we have to have a sloppily complicated iniqueue to serve either RHEL7 or RHEL8.
This commit is contained in:
parent
bf706f82cf
commit
55a6e3a1e2
@ -28,7 +28,25 @@ nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}')
|
||||
#TODO: blkid --label <whatever> to find mounted api
|
||||
|
||||
oum=$(umask)
|
||||
python /opt/confluent/bin/apiclient /confluent-api/self/deploycfg > /etc/confluent/confluent.deploycfg
|
||||
# 4.3 is rhel7 with useless curl but has python, 4.4 has usable curl but no python..
|
||||
if [ -x /usr/bin/python ]; then
|
||||
python /opt/confluent/bin/apiclient /confluent-api/self/deploycfg > /etc/confluent/confluent.deploycfg
|
||||
else
|
||||
mgr=$(grep ^EXTMGRINFO: /etc/confluent/confluent.info| sed -e 's/^EXTMGRINFO: //' | awk -F'|' '{print $1 " " $2 " " $3}' |grep 1$ | awk 'NR < 2')
|
||||
if [ -z "$mgr" ]; then
|
||||
mgr=$(grep ^EXTMGRINFO: /etc/confluent/confluent.info| sed -e 's/^EXTMGRINFO: //' | awk -F'|' '{print $1 " " $2 " " $3}' | awk 'NR < 2')
|
||||
fi
|
||||
mgtiface=$(echo $mgr | awk '{print $2}')
|
||||
mgr=$(echo $mgr | awk '{print $1}')
|
||||
if [ ! -f /etc/confluent/confluent.apikey ]; then
|
||||
/opt/confluent/bin/clortho $nodename $mgr > /etc/confluent/confluent.apikey
|
||||
fi
|
||||
apikey=$(cat /etc/confluent/confluent.apikey)
|
||||
if echo $mgr | grep ':' > /dev/null; then
|
||||
mgr="[$mgr]"
|
||||
fi
|
||||
curl -f -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $apikey" -H "CONFLUENT_MGTIFACE: $mgtiface" https://$mgr/confluent-api/self/deploycfg > /etc/confluent/confluent.deploycfg
|
||||
fi
|
||||
ifidx=$(cat /tmp/confluent.ifidx)
|
||||
ifname=$(ip link |grep ^$ifidx:|awk '{print $2}')
|
||||
ifname=${ifname%:}
|
||||
|
Loading…
Reference in New Issue
Block a user