Commit dd36d829 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix luxi serialization in ganeti-masterd

Currently, lib/ used lib/ for encoding/decoding
messages, but the master daemon uses directly the simplejson module.
This is wrong as any non-trivial change to will break the
master daemon.

The patch changes masterd to use exactly the same functions as
for encoding/decoding of messages.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarGuido Trotter <>
parent 99036060
......@@ -36,7 +36,6 @@ import collections
import Queue
import random
import signal
import simplejson
import logging
from cStringIO import StringIO
......@@ -55,6 +54,7 @@ from ganeti import ssconf
from ganeti import workerpool
from ganeti import rpc
from ganeti import bootstrap
from ganeti import serializer
......@@ -152,7 +152,7 @@ class ClientRqHandler(SocketServer.BaseRequestHandler):
logging.debug("client closed connection")
request = simplejson.loads(msg)
request = serializer.LoadJson(msg)
logging.debug("request: %s", request)
if not isinstance(request, dict):
logging.error("wrong request received: %s", msg)
......@@ -181,7 +181,7 @@ class ClientRqHandler(SocketServer.BaseRequestHandler):
luxi.KEY_RESULT: result,
logging.debug("response: %s", response)
def read_message(self):
while not self._msgs:
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