- for client in self.compute_clients:
- self._run_apply_patches(client,
- restart_cmd,
- [self.nc_restore_compute_script],
- python=self.python)
+ for client, node_ip in zip(self.compute_clients, self.computes):
+ retry = 0
+ while retry < 2:
+ try:
+ self._run_apply_patches(
+ client, restart_cmd,
+ [self.nc_restore_compute_script],
+ python=self.python)
+ except Exception:
+ if retry > 0:
+ raise Exception("SSHClient to %s feiled" % node_ip)
+ client = SSHClient(node_ip, self.node_user_name,
+ key_filename=self.key_file)
+ retry += 1
+ break