awslabs / scale-out-computing-on-aws

Scale-Out Computing on AWS is a solution that helps customers deploy and operate a multiuser environment for computationally intensive workflows.
https://awslabs.github.io/scale-out-computing-on-aws/
Apache License 2.0
119 stars 59 forks source link

ComputeNodeInstallDCVWindows.ps Bug #126

Closed wbadyx closed 3 months ago

wbadyx commented 3 months ago

Describe the bug Line 80 ./source/soca/cluster_node_bootstrap/windows/ComputeNodeInstallDCVWindows.ps

80 $Password = ConvertTo-SecureString -String "%SOCA_LOCAL_ADMIN_PASSWORD%" -AsPlainText -Force

wrong '-'

mcrozes commented 3 months ago

Hello @wbadyx -

I just deployed a brand new SOCA 2.7.5 cluster and could not reproduce this issue. The local Administrator password was correctly set and I was able to verify it via https://awslabs.github.io/scale-out-computing-on-aws/web-interface/create-virtual-desktops/#windows-only-retrieve-local-admin-password

Can you give some additional details about the error you are facing, as well as a dump of the following files:

# LOG: Default User Data: Get-Content C:\ProgramData\Amazon\EC2-Windows\Launch\Log\UserdataExecution.log
# LOG: SOCA Bootstrap Log: Get-Content C:\ProgramData\Amazon\EC2-Windows\Launch\Log\UserdataExecutionSOCA.log
wbadyx commented 3 months ago

Please note the differences in symbols within the red box code: The hyphen before the Force parameter is different from the standard hyphen used in PowerShell commands. The correct symbol should be a standard hyphen (-), not an en dash (–).

The Error Info:

+ $UserAccount | Set-LocalUser -Password $Password
+                                        ~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Set-LocalUser],ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.SetLocalUserCommand

20240628095754

mcrozes commented 3 months ago

Hello,

Good catch, issue has been resolved https://github.com/awslabs/scale-out-computing-on-aws/blob/main/source/soca/cluster_node_bootstrap/windows/ComputeNodeInstallDCVWindows.ps#L80 via https://github.com/awslabs/scale-out-computing-on-aws/commit/ac4c8932d05a43708051c782ba512629b3b781c7