mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-25 02:52:07 +00:00
Restore fallback to plain MANAGER specification
This is used in the media based deployment
This commit is contained in:
parent
2d5a016ad4
commit
fb98cbaa4a
@ -245,6 +245,7 @@ class HTTPSClient(client.HTTPConnection, object):
|
||||
self.hosts = []
|
||||
info = open('/etc/confluent/confluent.info').read().split('\n')
|
||||
havedefault = '0'
|
||||
plainhost = ''
|
||||
for line in info:
|
||||
host = ''
|
||||
if line.startswith('NODENAME:'):
|
||||
@ -252,6 +253,8 @@ class HTTPSClient(client.HTTPConnection, object):
|
||||
self.stdheaders['CONFLUENT_NODENAME'] = node
|
||||
if line.startswith('MANAGER:') and not host:
|
||||
host = line.split(' ')[1]
|
||||
if not plainhost:
|
||||
plainhost = host
|
||||
if line.startswith('EXTMGRINFO:'):
|
||||
extinfo = line.split(' ')[1]
|
||||
extinfo = extinfo.split('|')
|
||||
@ -278,6 +281,8 @@ class HTTPSClient(client.HTTPConnection, object):
|
||||
for line in info:
|
||||
if line.startswith('deploy_server: ') or line.startswith('deploy_server_v6: '):
|
||||
self.hosts.append(line.split(': ', 1)[1])
|
||||
if plainhost and not self.hosts:
|
||||
self.hosts.append(plainhost)
|
||||
if self.phmac:
|
||||
with open(phmac, 'r') as hmacin:
|
||||
self.stdheaders['CONFLUENT_CRYPTHMAC'] = hmacin.read()
|
||||
|
Loading…
Reference in New Issue
Block a user