def __init__(self, host: str, port: int, data: Dict[Any, Any], mgr: "CephadmOrchestrator") -> None:
self.mgr = mgr
self.host = host
- self.addr = self.mgr.inventory.get_addr(host)
+ self.addr = self.mgr.inventory.get_addr(host) if host in self.mgr.inventory else host
self.port = port
self.data: str = json.dumps(data)
super(AgentMessageThread, self).__init__(target=self.run)
secure_agent_socket.sendall(msg.encode('utf-8'))
agent_response = secure_agent_socket.recv(1024).decode()
self.mgr.log.info(f'Received "{agent_response}" from agent on host {self.host}')
+ self.mgr.cache.sending_agent_message[self.host] = False
return
except ConnectionError as e:
# if it's a connection error, possibly try to connect again.
root_cert = self.cherrypy_thread.ssl_certs.get_root_cert()
except Exception:
pass
- deps = sorted([self.get_mgr_ip(), self.inventory.get_addr(daemon_id), str(self.endpoint_port),
- root_cert, str(self.get_module_option('device_enhanced_scan'))])
+ deps = sorted([self.get_mgr_ip(), str(self.endpoint_port), root_cert,
+ str(self.get_module_option('device_enhanced_scan'))])
elif daemon_type == 'iscsi':
deps = [self.get_mgr_ip()]
else:
'listener.key': listener_key,
}
- return config, sorted([str(self.mgr.get_mgr_ip()), self.mgr.inventory.get_addr(daemon_spec.host),
- str(self.mgr.endpoint_port), self.mgr.cherrypy_thread.ssl_certs.get_root_cert(),
+ return config, sorted([str(self.mgr.get_mgr_ip()), str(self.mgr.endpoint_port),
+ self.mgr.cherrypy_thread.ssl_certs.get_root_cert(),
str(self.mgr.get_module_option('device_enhanced_scan'))])