Skip to content

Commit

Permalink
Changed the timeout number
Browse files Browse the repository at this point in the history
  • Loading branch information
paull committed Jan 30, 2024
1 parent e18e1b6 commit 50cd948
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lisa/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def create(
)
return node

def reboot(self, time_out: int = 300) -> None:
def reboot(self, time_out: int = 1200) -> None:
self.tools[Reboot].reboot(time_out)

def execute(
Expand Down
9 changes: 7 additions & 2 deletions lisa/sut_orchestrator/azure/Enable-SSH.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ $acl | Set-Acl
Start-Service sshd

# enable key authentication and restart for effective.
$sshd_config = "C:\ProgramData\ssh\sshd_config"
(Get-Content $sshd_config) -replace '#PubkeyAuthentication', 'PubkeyAuthentication' | Out-File -encoding ASCII $sshd_config
$ssh_server = Get-Service sshd | Where-Object { $_.Name -like 'sshd' -and $_.Status -like "Running" }
if ($ssh_server)
{
Write-Output "sshd server is running"
$sshd_config = "C:\ProgramData\ssh\sshd_config"
(Get-Content $sshd_config) -replace '#PubkeyAuthentication', 'PubkeyAuthentication' | Out-File -encoding ASCII $sshd_config
}
Restart-Service sshd
4 changes: 2 additions & 2 deletions lisa/tools/reboot.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def command(self) -> str:
def _check_exists(self) -> bool:
return True

def reboot(self, time_out: int = 600) -> None:
def reboot(self, time_out: int = 1200) -> None:
last_boot_time = self.node.tools[Uptime].since_time()
self.node.tools[PowerShell].run_cmdlet(
"Restart-Computer -Force", force_run=True
Expand All @@ -174,7 +174,7 @@ def reboot(self, time_out: int = 600) -> None:
constants.ENVIRONMENTS_NODES_REMOTE_PORT
],
log=self._log,
timeout=20,
timeout=1200,
)

if not connected:
Expand Down
2 changes: 1 addition & 1 deletion lisa/util/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def minimal_generate_run_command( # type: ignore


def wait_tcp_port_ready(
address: str, port: int, log: Optional[Logger] = None, timeout: int = 300
address: str, port: int, log: Optional[Logger] = None, timeout: int = 1200
) -> Tuple[bool, int]:
"""
return is ready or not
Expand Down

0 comments on commit 50cd948

Please sign in to comment.