diff --git a/perfkitbenchmarker/providers/gcp/gce_virtual_machine.py b/perfkitbenchmarker/providers/gcp/gce_virtual_machine.py index 7cd420633..85ee76892 100644 --- a/perfkitbenchmarker/providers/gcp/gce_virtual_machine.py +++ b/perfkitbenchmarker/providers/gcp/gce_virtual_machine.py @@ -1289,11 +1289,8 @@ def SimulateMaintenanceEvent(self): time.sleep(LM_UNAVAILABLE_STATUS_WAIT_TIME_MIN * 60) stdout, _, retcode = logcmd.Issue(raise_on_failure=False) - if retcode or 'error' in stdout: - raise errors.VirtualMachine.VirtualMachineError( - 'Unable to get logs for simulate maintenance event.' - ) - elif 'MIGRATION_TEMPORARILY_UNAVAILABLE' in stdout: + # if the migration is temporarily unavailable, retry the migration command + if not retcode and 'MIGRATION_TEMPORARILY_UNAVAILABLE' in stdout: stdout, _, retcode = cmd.Issue(raise_on_failure=False) if retcode or 'error' in stdout: raise errors.VirtualMachine.VirtualMachineError( diff --git a/perfkitbenchmarker/providers/gcp/gce_windows_virtual_machine.py b/perfkitbenchmarker/providers/gcp/gce_windows_virtual_machine.py index 6b9e229ef..f2633661f 100644 --- a/perfkitbenchmarker/providers/gcp/gce_windows_virtual_machine.py +++ b/perfkitbenchmarker/providers/gcp/gce_windows_virtual_machine.py @@ -222,7 +222,7 @@ def GetDefaultImageProject(self) -> str: def SetupLMNotification(self): """Prepare environment for /scripts/gce_maintenance_notify.py script.""" - self.Install('pip') + self.Install('python') self.RemoteCommand('pip install requests') self.PushDataFile( self._LM_NOTICE_SCRIPT, f'{self.temp_dir}\\{self._LM_NOTICE_SCRIPT}'