microsoft / service-fabric

Service Fabric is a distributed systems platform for packaging, deploying, and managing stateless and stateful distributed applications and containers at large scale.
https://docs.microsoft.com/en-us/azure/service-fabric/
MIT License
3.03k stars 399 forks source link

[BUG] - Can't install service fabric with PowerShell 7.x #1477

Open boydc2014 opened 10 months ago

boydc2014 commented 10 months ago

Describe the bug Installers in this https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started doesn't work with powershell 7

Area/Component: Runtime/SDK

To Reproduce Steps to reproduce the behavior:

  1. Go to (https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started)
  2. Click on 'Install Service Fabric Runtime for Windows'
  3. Run the exe from command with /accepteula

Expected behavior Installed successfully

Observed behavior:

Screenshots 11/29/2023 12:44:41 PM,Info,Installing Service Fabric Runtime. Logs written to C:\Windows\TEMP\InstallFabricRuntime_638368874815520109.log 11/29/2023 12:44:41 PM,Info,Running extract in parallel. 11/29/2023 12:44:41 PM,Info,Unpackaging autoextractor... 11/29/2023 12:44:41 PM,Info,11/29/2023 8:44:41 PM Running Process: powershell.exe -NoProfile -Command Get-ExecutionPolicy -Scope CurrentUser with timeout 00:01:00 11/29/2023 12:44:41 PM,Info,Creating temporary runtime directory C:\Program Files\Microsoft Service Fabric.ihsmtmxt.3x0. 11/29/2023 12:44:41 PM,Info,Extracting runtime cab to C:\Program Files\Microsoft Service Fabric.ihsmtmxt.3x0... 11/29/2023 12:44:41 PM,Info,11/29/2023 8:44:41 PM Running Process: C:\Windows\TEMP\MicrosoftServiceFabricAutoextractor.exe /L "C:\Program Files\Microsoft Service Fabric.ihsmtmxt.3x0" /E /Y with timeout 01:00:00 11/29/2023 12:44:45 PM,Info,Successfully extracted cab file to C:\Program Files\Microsoft Service Fabric.ihsmtmxt.3x0 11/29/2023 12:45:41 PM,Error,Timeout 00:01:00 exceeded, terminating process.. 11/29/2023 12:45:41 PM,Info,Current Powershell Execution Policy: 11/29/2023 12:45:41 PM,Error,Unable to get Powershell ExecutionPolicy. ExitCode: -1 11/29/2023 12:45:41 PM,Info,Cleaning temporary directory C:\Program Files\Microsoft Service Fabric.ihsmtmxt.3x0

Service Fabric Runtime Version: ex: 7.1., 7.2.

Environment:

If this is a regression, which version did it regress from?

Additional context Add any other context about the problem here.


Assignees: /cc @microsoft/service-fabric-triage

yyoungrrun commented 7 months ago

I also see the same bug, can anyone from service fabric to help?

yyoungrrun commented 7 months ago

https://learn.microsoft.com/en-us/answers/questions/1181752/service-fabric-runtime-installation-for-windows-fa this post helps, when I use normal powershell instead of powershell 7, it works

esbenbach commented 7 months ago

I found that running it as an admin user makes it fail, while running it normally spawns a "regular" powershell in an elevated session and ends up working.

esbenbach commented 2 months ago

I also found that using winget, one can now install the runtime and the SDK without finding the relevant installer link on github.

winget install Microsoft.ServiceFabricRuntime winget install Microsoft.ServiceFabricSDK

Works for me at least...

Some proper PS Core support all around would be great though.