Skip to content

Commit ccd91a6

Browse files
Migrate StackHCI from generation to main (#20515)
* Move StackHCI to main * Update ChangeLog.md Co-authored-by: Yeming Liu <[email protected]>
1 parent 21dbafd commit ccd91a6

File tree

5 files changed

+82
-42
lines changed

5 files changed

+82
-42
lines changed

src/StackHCI/Az.StackHCI.psd1

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 01/12/2022
6+
# Generated on: 12/27/2022
77
#
88

99
@{
@@ -120,12 +120,7 @@ PrivateData = @{
120120
# IconUri = ''
121121

122122
# ReleaseNotes of this module
123-
ReleaseNotes = '* Enabled system-assigned identity on HCI cluster resource registration and repair registration flow.
124-
* Added error message in the command Register-AzStackHCI if Arc is not enabled.
125-
* Added default region confirmation prompt if the region is not mentioned in the command Register-AzStackHCI.
126-
* Added general logging improvements.
127-
* Added logic that skipping the Arc SPN permission check in Register-AzStackHCI if a customer doesn''t have the required permissions to read Arc SPN credential.
128-
* Added deprecation message for the command Test-AzStackHCIConnection. Customers can use Invoke-AzStackHciConnectivityValidation from the module AzStackHCI.EnvironmentChecker for connectivity verification tests.'
123+
# ReleaseNotes = ''
129124

130125
# Prerelease string of this module
131126
# Prerelease = ''

src/StackHCI/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Added support for arc extensions which depend on HCI cluster's IMDS endpoints.
2122

2223
## Version 1.4.0
2324
* Enabled system-assigned identity on HCI cluster resource registration and repair registration flow.

src/StackHCI/StackHCI.sln

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.0.31903.59
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{14CD8A64-1DF2-4FC5-87CC-C25EC98BF6F7}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{FB791932-EDE1-415A-BA76-5EFA5AA8BC6C}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{EF7A37F9-C818-407F-8D10-FFCE78E2D48C}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{7F22B82C-32E6-4EFB-93B7-5261A8BF3DD6}"
99
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{7483CC61-CDF4-4C41-AE32-623036284DEF}"
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{51252581-E083-4F85-9F6F-36967BFDC123}"
1111
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{E86604A6-4BA1-47A0-968B-72377B0AEB4D}"
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{4310CACF-4315-4D04-93C3-DD8BAAACB3B9}"
1313
EndProject
14-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{E829DEB1-138F-4D18-BF82-6D7E5C6782F4}"
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{3917145E-C778-4BD3-B787-CED2F7102B21}"
1515
EndProject
16-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.StackHCI", "Az.StackHCI.csproj", "{D04FFF27-D3DA-4D32-A19A-305750280C84}"
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.StackHCI", "Az.StackHCI.csproj", "{7BF4B682-53F7-4BA5-A8AE-349D42D29531}"
1717
EndProject
1818
Global
1919
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -24,29 +24,29 @@ Global
2424
HideSolutionNode = FALSE
2525
EndGlobalSection
2626
GlobalSection(ProjectConfigurationPlatforms) = postSolution
27-
{14CD8A64-1DF2-4FC5-87CC-C25EC98BF6F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
28-
{14CD8A64-1DF2-4FC5-87CC-C25EC98BF6F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
29-
{14CD8A64-1DF2-4FC5-87CC-C25EC98BF6F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
30-
{14CD8A64-1DF2-4FC5-87CC-C25EC98BF6F7}.Release|Any CPU.Build.0 = Release|Any CPU
31-
{EF7A37F9-C818-407F-8D10-FFCE78E2D48C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
32-
{EF7A37F9-C818-407F-8D10-FFCE78E2D48C}.Debug|Any CPU.Build.0 = Debug|Any CPU
33-
{EF7A37F9-C818-407F-8D10-FFCE78E2D48C}.Release|Any CPU.ActiveCfg = Release|Any CPU
34-
{EF7A37F9-C818-407F-8D10-FFCE78E2D48C}.Release|Any CPU.Build.0 = Release|Any CPU
35-
{7483CC61-CDF4-4C41-AE32-623036284DEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
36-
{7483CC61-CDF4-4C41-AE32-623036284DEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
37-
{7483CC61-CDF4-4C41-AE32-623036284DEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
38-
{7483CC61-CDF4-4C41-AE32-623036284DEF}.Release|Any CPU.Build.0 = Release|Any CPU
39-
{E86604A6-4BA1-47A0-968B-72377B0AEB4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
40-
{E86604A6-4BA1-47A0-968B-72377B0AEB4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
41-
{E86604A6-4BA1-47A0-968B-72377B0AEB4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
42-
{E86604A6-4BA1-47A0-968B-72377B0AEB4D}.Release|Any CPU.Build.0 = Release|Any CPU
43-
{E829DEB1-138F-4D18-BF82-6D7E5C6782F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
44-
{E829DEB1-138F-4D18-BF82-6D7E5C6782F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
45-
{E829DEB1-138F-4D18-BF82-6D7E5C6782F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
46-
{E829DEB1-138F-4D18-BF82-6D7E5C6782F4}.Release|Any CPU.Build.0 = Release|Any CPU
47-
{D04FFF27-D3DA-4D32-A19A-305750280C84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
48-
{D04FFF27-D3DA-4D32-A19A-305750280C84}.Debug|Any CPU.Build.0 = Debug|Any CPU
49-
{D04FFF27-D3DA-4D32-A19A-305750280C84}.Release|Any CPU.ActiveCfg = Release|Any CPU
50-
{D04FFF27-D3DA-4D32-A19A-305750280C84}.Release|Any CPU.Build.0 = Release|Any CPU
27+
{FB791932-EDE1-415A-BA76-5EFA5AA8BC6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
28+
{FB791932-EDE1-415A-BA76-5EFA5AA8BC6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
29+
{FB791932-EDE1-415A-BA76-5EFA5AA8BC6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
30+
{FB791932-EDE1-415A-BA76-5EFA5AA8BC6C}.Release|Any CPU.Build.0 = Release|Any CPU
31+
{7F22B82C-32E6-4EFB-93B7-5261A8BF3DD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
32+
{7F22B82C-32E6-4EFB-93B7-5261A8BF3DD6}.Debug|Any CPU.Build.0 = Debug|Any CPU
33+
{7F22B82C-32E6-4EFB-93B7-5261A8BF3DD6}.Release|Any CPU.ActiveCfg = Release|Any CPU
34+
{7F22B82C-32E6-4EFB-93B7-5261A8BF3DD6}.Release|Any CPU.Build.0 = Release|Any CPU
35+
{51252581-E083-4F85-9F6F-36967BFDC123}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
36+
{51252581-E083-4F85-9F6F-36967BFDC123}.Debug|Any CPU.Build.0 = Debug|Any CPU
37+
{51252581-E083-4F85-9F6F-36967BFDC123}.Release|Any CPU.ActiveCfg = Release|Any CPU
38+
{51252581-E083-4F85-9F6F-36967BFDC123}.Release|Any CPU.Build.0 = Release|Any CPU
39+
{4310CACF-4315-4D04-93C3-DD8BAAACB3B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
40+
{4310CACF-4315-4D04-93C3-DD8BAAACB3B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
41+
{4310CACF-4315-4D04-93C3-DD8BAAACB3B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
42+
{4310CACF-4315-4D04-93C3-DD8BAAACB3B9}.Release|Any CPU.Build.0 = Release|Any CPU
43+
{3917145E-C778-4BD3-B787-CED2F7102B21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
44+
{3917145E-C778-4BD3-B787-CED2F7102B21}.Debug|Any CPU.Build.0 = Debug|Any CPU
45+
{3917145E-C778-4BD3-B787-CED2F7102B21}.Release|Any CPU.ActiveCfg = Release|Any CPU
46+
{3917145E-C778-4BD3-B787-CED2F7102B21}.Release|Any CPU.Build.0 = Release|Any CPU
47+
{7BF4B682-53F7-4BA5-A8AE-349D42D29531}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
48+
{7BF4B682-53F7-4BA5-A8AE-349D42D29531}.Debug|Any CPU.Build.0 = Debug|Any CPU
49+
{7BF4B682-53F7-4BA5-A8AE-349D42D29531}.Release|Any CPU.ActiveCfg = Release|Any CPU
50+
{7BF4B682-53F7-4BA5-A8AE-349D42D29531}.Release|Any CPU.Build.0 = Release|Any CPU
5151
EndGlobalSection
5252
EndGlobal

src/StackHCI/custom/stackhci.ps1

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ param(
12191219
}
12201220
catch
12211221
{
1222-
Write-VerboseLog ("Exception occurred in establishing new PSSession to node $clusNode.Name . ErrorMessage : " + $_.Exception.Message)
1222+
Write-VerboseLog ("Exception occurred in establishing new PSSession to node $($clusNode.Name). ErrorMessage : " + $_.Exception.Message)
12231223
Write-VerboseLog ($_)
12241224
$NewCertificateFailedNodes.Add($clusNode.Name) | Out-Null
12251225
$SetCertificateFailedNodes.Add($clusNode.Name) | Out-Null
@@ -1232,7 +1232,7 @@ param(
12321232

12331233
if(($nodeBuildNumber -lt $GAOSBuildNumber) -or (($nodeBuildNumber -eq $GAOSBuildNumber) -and ($nodeUBR -lt $GAOSUBR)))
12341234
{
1235-
Write-VerboseLog ("$clusNode.Name does not have latest build number UBR: $nodeUBR, BuildNumber: $nodeBuildNumber")
1235+
Write-VerboseLog ("$($clusNode.Name) does not have latest build number UBR: $nodeUBR, BuildNumber: $nodeBuildNumber")
12361236
$OSNotLatestOnNodes.Add($clusNode.Name) | Out-Null
12371237
continue
12381238
}
@@ -1321,7 +1321,7 @@ param(
13211321
}
13221322
catch
13231323
{
1324-
Write-VerboseLog ("Exception occurred in establishing new PSSession to node $clusNode.Name . ErrorMessage : " + $_.Exception.Message)
1324+
Write-VerboseLog ("Exception occurred in establishing new PSSession to node $($clusNode.Name). ErrorMessage : " + $_.Exception.Message)
13251325
Write-VerboseLog ($_)
13261326
$NewCertificateFailedNodes.Add($clusNode.Name) | Out-Null
13271327
$SetCertificateFailedNodes.Add($clusNode.Name) | Out-Null
@@ -2660,6 +2660,48 @@ param(
26602660

26612661
Invoke-Command -Session $clusterNodeSession -ScriptBlock { Set-AzureStackHCIRegistration @Using:RegistrationParams }
26622662

2663+
# Add custom IMDS registry entry
2664+
Write-VerboseLog ("Configuring CustomIMDSHostAddress on each node.")
2665+
foreach ($clusNode in $clusterNodes)
2666+
{
2667+
$nodeSession = $null
2668+
try
2669+
{
2670+
if($null -eq $Credential)
2671+
{
2672+
$nodeSession = New-PSSession -ComputerName ($clusNode.Name + "." + $clusterDNSSuffix)
2673+
}
2674+
else
2675+
{
2676+
$nodeSession = New-PSSession -ComputerName ($clusNode.Name + "." + $clusterDNSSuffix) -Credential $Credential
2677+
}
2678+
}
2679+
catch
2680+
{
2681+
Write-VerboseLog ("Exception occurred in establishing new PSSession to $($clusNode.Name). ErrorMessage : " + $_.Exception.Message)
2682+
Write-VerboseLog ($_)
2683+
Write-WarnLog ("Could not configure CustomIMDSHostAddress for node: $($clusNode.Name)")
2684+
continue
2685+
}
2686+
Write-VerboseLog ("Configuring CustomIMDSHostAddress on $($clusNode.Name)")
2687+
$customImdsScript = { try{ $customImdsRegKey = Get-Item 'HKLM:\Software\Microsoft\Windows Azure\CurrentVersion\IMDS' -ErrorAction Stop } catch{ $customImdsRegKey = New-Item 'HKLM:\Software\Microsoft\Windows Azure\CurrentVersion\IMDS' -Force -ErrorAction Stop } $customImdsRegKey | New-ItemProperty -Name "CustomIMDSHostAddress" -Value "http://127.0.0.1:42542" -Force -ErrorAction Stop | Out-Null }
2688+
try
2689+
{
2690+
Invoke-Command -Session $nodeSession -ScriptBlock $customImdsScript
2691+
}
2692+
catch
2693+
{
2694+
Write-VerboseLog ("Exception occurred while setting custom IMDS host on $($clusNode.Name). ErrorMessage : " + $_.Exception.Message)
2695+
Write-VerboseLog ($_)
2696+
Write-WarnLog ("Could not configure CustomIMDSHostAddress for node: $($clusNode.Name)")
2697+
}
2698+
2699+
if($null -ne $nodeSession)
2700+
{
2701+
Remove-PSSession $nodeSession -ErrorAction Ignore | Out-Null
2702+
}
2703+
}
2704+
26632705
if ($isCloudManagementSupported -eq $true)
26642706
{
26652707
Write-Progress -Id $MainProgressBarId -activity $RegisterProgressActivityName -status $ConfiguringCloudManagementMessage -percentcomplete 91
@@ -2744,6 +2786,8 @@ param(
27442786
if ($null -eq $serviceError)
27452787
{
27462788
$registrationOutput | Add-Member -MemberType NoteProperty -Name $OutputPropertyClusterAgentStatus -Value ([OperationStatus]::Success)
2789+
# Perform a Sync on successful agent setup.
2790+
Invoke-Command -Session $clusterNodeSession -ScriptBlock { Sync-AzureStackHCI -ErrorAction Ignore}
27472791
}
27482792
else
27492793
{
@@ -2778,7 +2822,7 @@ param(
27782822
}
27792823
catch
27802824
{
2781-
Write-VerboseLog ("Exception occurred in establishing new PSSession to $clusNode.Name . ErrorMessage : " + $_.Exception.Message)
2825+
Write-VerboseLog ("Exception occurred in establishing new PSSession to $($clusNode.Name). ErrorMessage : " + $_.Exception.Message)
27822826
Write-VerboseLog ($_)
27832827
$ArcCmdletsAbsentOnNodes.Add($clusNode.Name) | Out-Null
27842828
continue

src/StackHCI/generate-info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"swagger_commit": "a27182384f54fafa6a418c67f36b7f2b7bf5bf37",
2+
"swagger_commit": "89a9bf17524904e7670f0fd2d62ac882ca00d85c",
33
"node": "v14.15.5",
44
"autorest": "`-- (empty)",
55
"autorest_core": "3.9.3",

0 commit comments

Comments
 (0)