• Iustin Pop's avatar
    Add verification of RPC results in _WipeDisks · f08e5132
    Iustin Pop authored
    Due to an oversight, the pause/resume sync RPC calls in _WipeDisks
    lack the verification of the overall RPC status, and directly iterate
    over the payload. The code actually doing the wipe does verify
    correctly the results. This can result in jobs failing with a hard to
    OpExecError ['NoneType' object is not iterable]
    instead of proper "RPC failed" message.
    This patch adds a hard check on the pause call, but for the resume
    call it just logs a warning if the RPC failed; the rationale being
    that if we can't contact the node for pausing the sync, it's likely
    wiping will fail too, but after the wipe has been done, we can
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
cmdlib.py 545 KB