Commit ed33ef6d authored by Swann Perarnau's avatar Swann Perarnau

[fix] Fix missing logging changes

The logging improvement patch missed a few calls.
parent d373a502
...@@ -91,11 +91,11 @@ class CommandLineInterface(object): ...@@ -91,11 +91,11 @@ class CommandLineInterface(object):
while(True): while(True):
self.upstream_pub_socket.send_json(command) self.upstream_pub_socket.send_json(command)
msg = self.upstream_sub_socket.recv_json() msg = self.upstream_sub_socket.recv_json()
self.logger.info("new message: %r", msg) logger.info("new message: %r", msg)
# ignore other messages # ignore other messages
if isinstance(msg, dict) and msg.get('type') == 'container': if isinstance(msg, dict) and msg.get('type') == 'container':
if msg['event'] == 'list': if msg['event'] == 'list':
self.logger.info("list response: %r", msg) logger.info("list response: %r", msg)
break break
def do_kill(self, argv): def do_kill(self, argv):
...@@ -111,11 +111,11 @@ class CommandLineInterface(object): ...@@ -111,11 +111,11 @@ class CommandLineInterface(object):
while(True): while(True):
self.upstream_pub_socket.send_json(command) self.upstream_pub_socket.send_json(command)
msg = self.upstream_sub_socket.recv_json() msg = self.upstream_sub_socket.recv_json()
self.logger.info("new message: %r", msg) logger.info("new message: %r", msg)
# ignore other messages # ignore other messages
if isinstance(msg, dict) and msg.get('type') == 'container': if isinstance(msg, dict) and msg.get('type') == 'container':
if msg['event'] == 'exit' and msg['uuid'] == argv.uuid: if msg['event'] == 'exit' and msg['uuid'] == argv.uuid:
self.logger.info("container exit: %r", msg) logger.info("container exit: %r", msg)
break break
def do_setpower(self, argv): def do_setpower(self, argv):
......
...@@ -99,7 +99,7 @@ class ContainerManager(object): ...@@ -99,7 +99,7 @@ class ContainerManager(object):
"""Kill all the processes of a container.""" """Kill all the processes of a container."""
if uuid in self.containers: if uuid in self.containers:
c = self.containers[uuid] c = self.containers[uuid]
self.logger.debug("killing %r:", c) logger.debug("killing %r:", c)
try: try:
os.kill(c.pid, signal.SIGKILL) os.kill(c.pid, signal.SIGKILL)
except OSError: except OSError:
......
...@@ -138,11 +138,11 @@ class Daemon(object): ...@@ -138,11 +138,11 @@ class Daemon(object):
} }
self.upstream_pub.send_json(update) self.upstream_pub.send_json(update)
elif command == 'kill': elif command == 'kill':
self.logger.info("asked to kill container: %r", msg) logger.info("asked to kill container: %r", msg)
response = self.container_manager.kill(msg['uuid']) response = self.container_manager.kill(msg['uuid'])
# no update here, as it will trigger child exit # no update here, as it will trigger child exit
elif command == 'list': elif command == 'list':
self.logger.info("asked for container list: %r", msg) logger.info("asked for container list: %r", msg)
response = self.container_manager.list() response = self.container_manager.list()
update = {'type': 'container', update = {'type': 'container',
'event': 'list', 'event': 'list',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment