Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
argo
nrm
Commits
ed33ef6d
Commit
ed33ef6d
authored
Dec 14, 2017
by
Swann Perarnau
Browse files
[fix] Fix missing logging changes
The logging improvement patch missed a few calls.
parent
d373a502
Changes
3
Hide whitespace changes
Inline
Side-by-side
bin/cmd
View file @
ed33ef6d
...
...
@@ -91,11 +91,11 @@ class CommandLineInterface(object):
while
(
True
):
self
.
upstream_pub_socket
.
send_json
(
command
)
msg
=
self
.
upstream_sub_socket
.
recv_json
()
self
.
logger
.
info
(
"new message: %r"
,
msg
)
logger
.
info
(
"new message: %r"
,
msg
)
# ignore other messages
if
isinstance
(
msg
,
dict
)
and
msg
.
get
(
'type'
)
==
'container'
:
if
msg
[
'event'
]
==
'list'
:
self
.
logger
.
info
(
"list response: %r"
,
msg
)
logger
.
info
(
"list response: %r"
,
msg
)
break
def
do_kill
(
self
,
argv
):
...
...
@@ -111,11 +111,11 @@ class CommandLineInterface(object):
while
(
True
):
self
.
upstream_pub_socket
.
send_json
(
command
)
msg
=
self
.
upstream_sub_socket
.
recv_json
()
self
.
logger
.
info
(
"new message: %r"
,
msg
)
logger
.
info
(
"new message: %r"
,
msg
)
# ignore other messages
if
isinstance
(
msg
,
dict
)
and
msg
.
get
(
'type'
)
==
'container'
:
if
msg
[
'event'
]
==
'exit'
and
msg
[
'uuid'
]
==
argv
.
uuid
:
self
.
logger
.
info
(
"container exit: %r"
,
msg
)
logger
.
info
(
"container exit: %r"
,
msg
)
break
def
do_setpower
(
self
,
argv
):
...
...
nrm/containers.py
View file @
ed33ef6d
...
...
@@ -99,7 +99,7 @@ class ContainerManager(object):
"""Kill all the processes of a container."""
if
uuid
in
self
.
containers
:
c
=
self
.
containers
[
uuid
]
self
.
logger
.
debug
(
"killing %r:"
,
c
)
logger
.
debug
(
"killing %r:"
,
c
)
try
:
os
.
kill
(
c
.
pid
,
signal
.
SIGKILL
)
except
OSError
:
...
...
nrm/daemon.py
View file @
ed33ef6d
...
...
@@ -138,11 +138,11 @@ class Daemon(object):
}
self
.
upstream_pub
.
send_json
(
update
)
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'
])
# no update here, as it will trigger child exit
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
()
update
=
{
'type'
:
'container'
,
'event'
:
'list'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment