root_conf = {'/': {'request.dispatch': cherrypy.dispatch.MethodDispatcher(),
'tools.response_headers.on': True}}
cherrypy.tree.mount(Root(self.mgr), '/', root_conf)
- self.mgr.log.info('Starting cherrypy engine...')
+ self.mgr.log.debug('Starting cherrypy engine...')
self.start_engine()
- self.mgr.log.info('Cherrypy engine started.')
+ self.mgr.log.debug('Cherrypy engine started.')
agents_down = []
for h in self.mgr.cache.get_hosts():
if self.mgr.agent_helpers._check_agent(h):
self.cherrypy_shutdown_event.wait()
self.cherrypy_shutdown_event.clear()
cherrypy.engine.stop()
- self.mgr.log.info('Cherrypy engine stopped.')
+ self.mgr.log.debug('Cherrypy engine stopped.')
except Exception as e:
self.mgr.log.error(f'Failed to run cephadm cherrypy endpoint: {e}')
while port_connect_attempts < 150:
try:
cherrypy.engine.start()
- self.mgr.log.info(f'Cephadm endpoint connected to port {self.server_port}')
+ self.mgr.log.debug(f'Cephadm endpoint connected to port {self.server_port}')
return
except cherrypy.process.wspbus.ChannelFailures as e:
- self.mgr.log.info(
+ self.mgr.log.debug(
f'{e}. Trying next port.')
self.server_port += 1
cherrypy.server.httpserver = None
'Cephadm Endpoint could not find free port in range 7150-7300 and failed to start')
def shutdown(self) -> None:
- self.mgr.log.info('Stopping cherrypy engine...')
+ self.mgr.log.debug('Stopping cherrypy engine...')
self.cherrypy_shutdown_event.set()
# we got old counter value with message, inform agent of new timestamp
if not self.mgr.cache.messaging_agent(host):
self.mgr.agent_helpers._request_agent_acks({host})
- self.mgr.log.info(
+ self.mgr.log.debug(
f'Received old metadata from agent on host {host}. Requested up-to-date metadata.')
if 'ls' in data and data['ls']:
error_daemons_old != set([dd.name() for dd in self.mgr.cache.get_error_daemons()])
or daemon_count_old != len(self.mgr.cache.get_daemons_by_host(host))
):
- self.mgr.log.info(
+ self.mgr.log.debug(
f'Change detected in state of daemons from {host} agent metadata. Kicking serve loop')
self.mgr._kick_serve_loop()
was_out_of_date = not self.mgr.cache.all_host_metadata_up_to_date()
self.mgr.cache.metadata_up_to_date[host] = True
if was_out_of_date and self.mgr.cache.all_host_metadata_up_to_date():
- self.mgr.log.info(
+ self.mgr.log.debug(
'New metadata from agent has made all hosts up to date. Kicking serve loop')
self.mgr._kick_serve_loop()
- self.mgr.log.info(
+ self.mgr.log.debug(
f'Received up-to-date metadata from agent on host {host}.')
except Exception as e:
super(AgentMessageThread, self).__init__(target=self.run)
def run(self) -> None:
- self.mgr.log.info(f'Sending message to agent on host {self.host}')
+ self.mgr.log.debug(f'Sending message to agent on host {self.host}')
self.mgr.cache.sending_agent_message[self.host] = True
try:
assert self.mgr.cherrypy_thread
msg = (bytes_len + self.data)
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.log.debug(f'Received "{agent_response}" from agent on host {self.host}')
self.mgr.cache.sending_agent_message[self.host] = False
return
except ConnectionError as e: