d5b4217 [backend] handle paramiko.SSHException in _run_ssh_cmd

Authored and Committed by praiskup 8 years ago
    [backend] handle paramiko.SSHException in _run_ssh_cmd
    
    Sometimes even when the VM allocation succeeds (spawn_playbook),
    it might happen that ssh fails to respond a few moments later.
    
    Not handling this properly means that the exception even leaks out
    from do_job() call -> which means that (a) frontend is not
    informed about build failure and (b) the worker/builder might not
    be deallocated.
    
    I observed similar issues when we were using ansible python API;
    previously we did:
    
        self.run_ansible_with_check("/bin/rpm -q mock rsync")
    
    .. with unhandled VmError from check_for_ans_error().  This was
    replaced by:
    
        self._run_ssh_cmd("/bin/rpm -q mock rsync")
    
    Without handling paramiko.SSHException however -- so I suppose the
    problem is still there and thus fixing it.