mirror of
https://github.com/xcat2/confluent.git
synced 2025-02-26 07:11:35 +00:00
Modify apiclient to rewrite ifidx if stale
This commit is contained in:
parent
32fe6b2fff
commit
4cd7714099
@ -41,7 +41,7 @@ class HTTPSClient(client.HTTPConnection, object):
|
||||
host, mgtiface, havedefault = extinfo[:3]
|
||||
if havedefault == '0' and extinfo[2] == '1':
|
||||
host, mgtiface, havedefault = extinfo[:3]
|
||||
if not os.path.exists('/tmp/confluent.ifidx') and '%' in host:
|
||||
if '%' in host:
|
||||
ifidx = host.split('%', 1)[1]
|
||||
with open('/tmp/confluent.ifidx', 'w+') as ifout:
|
||||
ifout.write(ifidx)
|
||||
|
@ -34,14 +34,15 @@ fi
|
||||
(ssh-keygen -A; /usr/sbin/sshd) &
|
||||
TRIES=0
|
||||
touch /etc/confluent/confluent.info
|
||||
cd /sys/class/net
|
||||
while ! grep ^EXTMGRINFO: /etc/confluent/confluent.info | awk -F'|' '{print $3}' | grep 1 >& /dev/null && [ "$TRIES" -lt 15 ]; do
|
||||
TRIES=$((TRIES + 1))
|
||||
cd /sys/class/net
|
||||
for i in *; do
|
||||
ip link set $i up
|
||||
done
|
||||
/opt/confluent/bin/copernicus -t > /etc/confluent/confluent.info
|
||||
done
|
||||
cd /
|
||||
ip addr|grep inet |awk '{print $2}' | sed -e 's!/.*!!'
|
||||
nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}')
|
||||
hostname $nodename
|
||||
|
Loading…
x
Reference in New Issue
Block a user