diff --git a/confluent_osdeploy/esxi7/initramfs/opt/confluent/bin/apiclient b/confluent_osdeploy/esxi7/initramfs/opt/confluent/bin/apiclient index 9c64e88e..182ba7b5 100644 --- a/confluent_osdeploy/esxi7/initramfs/opt/confluent/bin/apiclient +++ b/confluent_osdeploy/esxi7/initramfs/opt/confluent/bin/apiclient @@ -8,11 +8,12 @@ class HTTPSClient(client.HTTPConnection, object): def __init__(self, port=443): self.stdheaders = {} info = open('/etc/confluent/confluent.info').read().split('\n') + host = None for line in info: if line.startswith('NODENAME:'): node = line.split(' ')[1] self.stdheaders['CONFLUENT_NODENAME'] = node - if line.startswith('MANAGER:'): + if line.startswith('MANAGER:') and not host: host = line.split(' ')[1] self.stdheaders['CONFLUENT_APIKEY'] = open('/etc/confluent/confluent.apikey').read().strip() client.HTTPConnection.__init__(self, host, port) diff --git a/confluent_osdeploy/rhvh4/initramfs/opt/confluent/bin/apiclient b/confluent_osdeploy/rhvh4/initramfs/opt/confluent/bin/apiclient index df1ea217..4e285446 100644 --- a/confluent_osdeploy/rhvh4/initramfs/opt/confluent/bin/apiclient +++ b/confluent_osdeploy/rhvh4/initramfs/opt/confluent/bin/apiclient @@ -8,11 +8,12 @@ class HTTPSClient(client.HTTPConnection, object): def __init__(self, port=443): self.stdheaders = {} info = open('/etc/confluent/confluent.info').read().split('\n') + host = None for line in info: if line.startswith('NODENAME:'): node = line.split(' ')[1] self.stdheaders['CONFLUENT_NODENAME'] = node - if line.startswith('MANAGER:'): + if line.startswith('MANAGER:') and not host: host = line.split(' ')[1] self.stdheaders['CONFLUENT_APIKEY'] = open('/etc/confluent/confluent.apikey').read().strip() client.HTTPConnection.__init__(self, host, port)