Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
3790: Retry pnputil install for PSW with increased wait time r=CyanDevs a=CyanDevs

This is in response to a rare occurrence of AESMService not existing after PSW is installed with pnputil.

Error sample:
```
Microsoft PnP Utility

Adding driver package:  sgx_psw.inf
Driver package added successfully.
Published Name:         oem8.inf
Driver package installed.

Total driver packages:  1
Added driver packages:  1
[2020-12-18T04:41:48.8395277+00:00] Start-ExecuteWithRetry attempt 0
[2020-12-18T04:41:48.8699609+00:00] Start-ExecuteWithRetry RetryMessage: Failed to start AESMService. Retrying
[2020-12-18T04:41:51.8855971+00:00] Start-ExecuteWithRetry attempt 1
[2020-12-18T04:41:51.8855971+00:00] Start-ExecuteWithRetry RetryMessage: Failed to start AESMService. Retrying
[2020-12-18T04:41:54.8865091+00:00] Start-ExecuteWithRetry attempt 2
[2020-12-18T04:41:54.8865091+00:00] Start-ExecuteWithRetry RetryMessage: Failed to start AESMService. Retrying
[2020-12-18T04:41:57.8865511+00:00] Start-ExecuteWithRetry attempt 3
[2020-12-18T04:41:57.8865511+00:00] Start-ExecuteWithRetry RetryMessage: Failed to start AESMService. Retrying
[2020-12-18T04:42:00.8987848+00:00] Start-ExecuteWithRetry attempt 4
[2020-12-18T04:42:00.8987848+00:00] Start-ExecuteWithRetry RetryMessage: Failed to start AESMService. Retrying
[2020-12-18T04:42:03.9134730+00:00] Start-ExecuteWithRetry attempt 5
[2020-12-18T04:42:03.9134730+00:00] Start-ExecuteWithRetry RetryMessage: Failed to start AESMService. Retrying
[2020-12-18T04:42:06.9148672+00:00] Start-ExecuteWithRetry attempt 6
[2020-12-18T04:42:06.9148672+00:00] Start-ExecuteWithRetry RetryMessage: Failed to start AESMService. Retrying
[2020-12-18T04:42:09.9227847+00:00] Start-ExecuteWithRetry attempt 7
[2020-12-18T04:42:09.9227847+00:00] Start-ExecuteWithRetry RetryMessage: Failed to start AESMService. Retrying
[2020-12-18T04:42:12.9228054+00:00] Start-ExecuteWithRetry attempt 8
[2020-12-18T04:42:12.9228054+00:00] Start-ExecuteWithRetry RetryMessage: Failed to start AESMService. Retrying
[2020-12-18T04:42:15.9261009+00:00] Start-ExecuteWithRetry attempt 9
[2020-12-18T04:42:15.9261009+00:00] Start-ExecuteWithRetry RetryMessage: Failed to start AESMService. Retrying
[2020-12-18T04:42:18.9382291+00:00] Start-ExecuteWithRetry attempt 10
[2020-12-18T04:42:18.9382291+00:00] Start-ExecuteWithRetry exception thrown
Cannot find any service with service name 'AESMService'.
at <ScriptBlock>, C:\ProgramData\.guestagent\runs\20201218\04_30_56_155_a32e6bcb\workload\0\0\install-windows-prereqs.ps1: line 431
at Start-ExecuteWithRetry, C:\ProgramData\.guestagent\runs\20201218\04_30_56_155_a32e6bcb\workload\0\0\install-windows-prereqs.ps1: line 212
at Install-PSW, C:\ProgramData\.guestagent\runs\20201218\04_30_56_155_a32e6bcb\workload\0\0\install-windows-prereqs.ps1: line 430
at <ScriptBlock>, C:\ProgramData\.guestagent\runs\20201218\04_30_56_155_a32e6bcb\workload\0\0\install-windows-prereqs.ps1: line 689
at Install-Prereqs, C:\ProgramData\.guestagent\packages\OneFleet-ACC-Tests.0.0.0.147\runtimes\win\run_acc_tests.ps1: line 21
at <ScriptBlock>, C:\ProgramData\.guestagent\packages\OneFleet-ACC-Tests.0.0.0.147\runtimes\win\run_acc_tests.ps1: line 77
at <ScriptBlock>, <No file>: line 1
```

Signed-off-by: Chris Yan <[email protected]>

Co-authored-by: Chris Yan <[email protected]>
  • Loading branch information
oeciteam and CyanDevs committed Dec 24, 2020
2 parents 606c481 + d1ead02 commit 6ece1bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/install-windows-prereqs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,10 @@ function Install-PSW {
}
} else {
$psw_dir = Get-Item "$tempInstallDir\Intel*SGX*\PSW_INF*\"
pnputil /add-driver $psw_dir\sgx_psw.inf /install
Start-ExecuteWithRetry -RetryInterval 5 -ScriptBlock {
pnputil /add-driver $psw_dir\sgx_psw.inf /install
Get-Service "AESMService"
}
}
Start-ExecuteWithRetry -ScriptBlock {
Start-Service "AESMService" -ErrorAction Stop
Expand Down

0 comments on commit 6ece1bc

Please sign in to comment.