diff --git a/NEWS b/NEWS index ec983769bee4482cc66cdf7c74a10ef5d3395cf1..113d00474ee733948b3da8c44a74d58015a7f209 100644 --- a/NEWS +++ b/NEWS @@ -101,6 +101,15 @@ Details - Improved burnin +Version 2.0.6 +------------- + +- Fix cleaner behaviour on nodes not in a cluster (Debian bug 568105) +- Fix a string formatting bug +- Improve safety of the code in some error paths +- Improve data validation in the master of values returned from nodes + + Version 2.0.5 ------------- diff --git a/daemons/ganeti-cleaner.in b/daemons/ganeti-cleaner.in index 1815e6d1e1015f593cfe1130eaa4edf44a214cf7..ad0dd3b3a1859cd7c6a91ae1506d5fc3671cc415 100755 --- a/daemons/ganeti-cleaner.in +++ b/daemons/ganeti-cleaner.in @@ -27,7 +27,7 @@ QUEUE_ARCHIVE_DIR=$DATA_DIR/queue/archive REMOVE_AFTER=21 # Exit if machine is not part of a cluster -[[ -e $DATA_DIR/ssconf_master_node ]] || echo 0 +[[ -e $DATA_DIR/ssconf_master_node ]] || exit 0 # Exit if queue archive directory doesn't exist [[ -d $QUEUE_ARCHIVE_DIR ]] || exit 0 diff --git a/lib/http/__init__.py b/lib/http/__init__.py index e004a635d4fd975a8a05da21fdd3a168410ad89e..1d32e647cb161b5a84af99d1811b4a724823dbab 100644 --- a/lib/http/__init__.py +++ b/lib/http/__init__.py @@ -403,9 +403,9 @@ def SocketOperation(sock, op, arg1, timeout): if event is None: raise HttpSocketTimeout() - if (op == SOCKOP_RECV and - event & (select.POLLNVAL | select.POLLHUP | select.POLLERR)): - return "" + if event & (select.POLLNVAL | select.POLLHUP | select.POLLERR): + # Let the socket functions handle these + break if not event & wait_for_event: continue @@ -862,7 +862,7 @@ class HttpMessageReader(object): # the CRLF." if idx == 0: # TODO: Limit number of CRLFs/empty lines for safety? - buf = buf[:2] + buf = buf[2:] continue if idx > 0: