Commit f25b244
authored
fix(e2e): make sshd setup idempotent across reboots (AD domain-controller flakiness) (#54681)
### What does this PR do?
Makes setup-ssh.ps1 idempotent across reboots: a marker file skips the OpenSSH stop/MSI-reinstall once already done
### Motivation
This script is persisted as EC2 user data and reruns on every boot, not just the first (see DataDog/test-infra-definitions#1178, which relies on that for authorized_keys reset). It wasn't written with that in mind: on every boot of a Windows Server 2025 host it unconditionally stopped sshd and reinstalled it via MSI. That means every reboot -- including the one triggered by domain controller promotion -- created an extended sshd outage racing whatever tries to SSH in right after, which is the likely actual cause of the WINA-2095 flakiness this was meant to address, not some AD-side instability.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html
### Describe how you validated your changes
Windows e2e tests should pass.
Co-authored-by: branden.clark <branden.clark@datadoghq.com>1 parent a055712 commit f25b244
2 files changed
Lines changed: 36 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
1 | 10 | | |
2 | 11 | | |
3 | 12 | | |
| |||
7 | 16 | | |
8 | 17 | | |
9 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
10 | 24 | | |
11 | 25 | | |
12 | 26 | | |
13 | 27 | | |
14 | 28 | | |
15 | 29 | | |
16 | | - | |
| 30 | + | |
| 31 | + | |
17 | 32 | | |
18 | 33 | | |
19 | 34 | | |
| |||
134 | 149 | | |
135 | 150 | | |
136 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
137 | 168 | | |
138 | 169 | | |
139 | 170 | | |
| |||
176 | 207 | | |
177 | 208 | | |
178 | 209 | | |
| 210 | + | |
179 | 211 | | |
180 | 212 | | |
181 | 213 | | |
| |||
0 commit comments