Closed jonnyry closed 5 months ago
Logged upstream:
Issue is because the Nexus VM is stopped by the Powershell job and not restarted automatically.
TODO: change the Powershell script to restart the nexus package mirror VM.
Just to add more context - I've run a few extra tests on this, and it appears to occur when:
Bringing the package mirror up afterwards and restarting the Linux VM does not automatically resolve the issue, without re-running the cloud-init scripts.
Conversely creating a Linux VM while the package mirror IS running, then stopping the package mirror, does not cause an issue.
Following PowerShell code appended to end of TRE start runbook script will start the package mirror if it exists...
# Start package mirror (if exists)
$PackageMirror = Get-AzVM -ResourceGroupName $Group.ResourceGroupName -Name "nexus-$azureTreId" -ErrorVariable packageMirrorNotPresent -ErrorAction SilentlyContinue
if (!$packageMirrorNotPresent)
{
Write-Output "Starting Nexus Package Mirror VM '$($PackageMirror.Name)'"
Start-AzVM -ResourceGroupName $Group.ResourceGroupName -Name $PackageMirror.Name
}
TODO: Add to repo, automation scripts in Azure & push upstream
After discussion with @marrobi, I've modified to start all the VMs in the core resource group - typically the package mirror and the jump box. This mirrors what the make version of the script does:
# Start VMs
$VM = Get-AzVM -ResourceGroupName $Group.ResourceGroupName
foreach ($item in $VM) {
Write-Output "Starting VM '$($item.Name)'"
Start-AzVm -ResourceGroupName $item.ResourceGroupName -Name $item.Name
}
4ea7c32
Sent PR back to microsoft/AzureTRE https://github.com/microsoft/AzureTRE/pull/3822
Merged into microsoft/AzureTRE & added to our Azure automation scripts
Appears to be intermittent