Skip to content

Commit

Permalink
Merge pull request #281 from microsoft/develop
Browse files Browse the repository at this point in the history
FO 3.2.11
  • Loading branch information
GitTorre authored Sep 25, 2023
2 parents f84b76b + d26fa16 commit 143a7c6
Show file tree
Hide file tree
Showing 29 changed files with 444 additions and 174 deletions.
8 changes: 4 additions & 4 deletions Build-SFPkgs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ function Build-SFPkg {
try {
Push-Location $scriptPath

Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Linux.SelfContained.3.2.10" "$scriptPath\bin\release\FabricObserver\linux-x64\self-contained\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Linux.FrameworkDependent.3.2.10" "$scriptPath\bin\release\FabricObserver\linux-x64\framework-dependent\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Linux.SelfContained.3.2.11" "$scriptPath\bin\release\FabricObserver\linux-x64\self-contained\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Linux.FrameworkDependent.3.2.11" "$scriptPath\bin\release\FabricObserver\linux-x64\framework-dependent\FabricObserverType"

Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained.3.2.10" "$scriptPath\bin\release\FabricObserver\win-x64\self-contained\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Windows.FrameworkDependent.3.2.10" "$scriptPath\bin\release\FabricObserver\win-x64\framework-dependent\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained.3.2.11" "$scriptPath\bin\release\FabricObserver\win-x64\self-contained\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Windows.FrameworkDependent.3.2.11" "$scriptPath\bin\release\FabricObserver\win-x64\framework-dependent\FabricObserverType"
}
finally {
Pop-Location
Expand Down
2 changes: 1 addition & 1 deletion ClusterObserver/PackageRoot/Data/Plugins/Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ cd C:\Users\me\source\repos\service-fabric-observer
./Build-FabricObserver
./Build-NugetPackages

The output from the above commands, FabricObserver platform-specific nupkgs and a package you have to use for plugin authoring named Microsoft.ServiceFabricApps.FabricObserver.Extensibility.3.2.10.nupkg, would be located in
The output from the above commands, FabricObserver platform-specific nupkgs and a package you have to use for plugin authoring named Microsoft.ServiceFabricApps.FabricObserver.Extensibility.3.2.11.nupkg, would be located in
C:\Users\me\source\repos\service-fabric-observer\bin\release\FabricObserver\Nugets.
6 changes: 3 additions & 3 deletions Documentation/Deployment/service-fabric-observer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
},
"applicationTypeVersionFabricObserver": {
"type": "string",
"defaultValue": "3.2.10",
"defaultValue": "3.2.11",
"metadata": {
"description": "Provide the app version number of FabricObserver. This must be identical to the version, 3.2.10, in the referenced sfpkg specified in packageUrlFabricObserver."
"description": "Provide the app version number of FabricObserver. This must be identical to the version, 3.2.11, in the referenced sfpkg specified in packageUrlFabricObserver."
}
},
"packageUrlFabricObserver": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "This has to be a public accessible URL for the sfpkg file which contains the FabricObserver app package. Example: https://github.com/microsoft/service-fabric-observer/releases/download/[xxxxxxxx]/Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained.3.2.10.sfpkg"
"description": "This has to be a public accessible URL for the sfpkg file which contains the FabricObserver app package. Example: https://github.com/microsoft/service-fabric-observer/releases/download/[xxxxxxxx]/Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained.3.2.11.sfpkg"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"value": "<YOUR-CLUSTER-RESOURCE-NAME>"
},
"applicationTypeVersionFabricObserver": {
"value": "3.2.10"
"value": "3.2.11"
},
"packageUrlFabricObserver": {
"value": "<PUBLIC-ACCESSIBLE-URL-FOR-FABRICOBSERVER-SFPKG>"
Expand Down
4 changes: 2 additions & 2 deletions Documentation/OperationalTelemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ As with most of FabricObserver's application settings, you can also do this with
Connect-ServiceFabricCluster ...
$appParams = @{ "ObserverManagerEnableOperationalFOTelemetry" = "false"; }
Start-ServiceFabricApplicationUpgrade -ApplicationName fabric:/FabricObserver -ApplicationParameter $appParams -ApplicationTypeVersion 3.2.10 -UnMonitoredAuto
Start-ServiceFabricApplicationUpgrade -ApplicationName fabric:/FabricObserver -ApplicationParameter $appParams -ApplicationTypeVersion 3.2.11 -UnMonitoredAuto
```

Expand All @@ -44,7 +44,7 @@ Here is a full example of exactly what is sent in one of these telemetry events,
"ClusterId": "00000000-1111-1111-0000-00f00d000d",
"ClusterType": "SFRP",
"NodeNameHash": "3e83569d4c6aad78083cd081215dafc81e5218556b6a46cb8dd2b183ed0095ad",
"FOVersion": "3.2.10",
"FOVersion": "3.2.11",
"HasPlugins": "False",
"SFRuntimeVersion":"9.0.1028.9590"
"UpTime": "1.00:30:18.8058379",
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ cd C:\Users\me\source\repos\service-fabric-observer
./Build-FabricObserver
./Build-NugetPackages
```
The output from the above commands contains FabricObserver platform-specific nupkgs and a nupkg you have to use for plugin authoring named Microsoft.ServiceFabricApps.FabricObserver.Extensibility.3.2.10.nupkg. Nuget packages will be located in
The output from the above commands contains FabricObserver platform-specific nupkgs and a nupkg you have to use for plugin authoring named Microsoft.ServiceFabricApps.FabricObserver.Extensibility.3.2.11.nupkg. Nuget packages will be located in
C:\Users\me\source\repos\service-fabric-observer\bin\release\FabricObserver\Nugets.
24 changes: 9 additions & 15 deletions Documentation/Using.md
Original file line number Diff line number Diff line change
Expand Up @@ -710,18 +710,17 @@ $appParams = @{ "FabricSystemObserverEnabled" = "true"; "FabricSystemObserverMem
Then execute the application upgrade with

```Powershell
Start-ServiceFabricApplicationUpgrade -ApplicationName fabric:/FabricObserver -ApplicationTypeVersion 3.2.10 -ApplicationParameter $appParams -Monitored -FailureAction rollback
Start-ServiceFabricApplicationUpgrade -ApplicationName fabric:/FabricObserver -ApplicationTypeVersion 3.2.11 -ApplicationParameter $appParams -Monitored -FailureAction rollback
```

**Important**: This action will overwrite previous app paramemter changes that were made in an earlier application upgrade, for example. If you want to preserve any earlier changes, then you will need to
supply those parameter values again along with the new ones. You do this in the following, simple way:

```PowerShell
$appName = "fabric:/FabricObserver"
$appVersion = "3.2.10"
$myApplication = Get-ServiceFabricApplication -ApplicationName $appName
$appParamCollection = $myApplication.ApplicationParameters
$appVersion = "3.2.11"
$application = Get-ServiceFabricApplication -ApplicationName $appName
$appParamCollection = $application.ApplicationParameters
$applicationParameterMap = @{}
# Fill the map with current app parameter settings.
Expand All @@ -730,18 +729,13 @@ foreach ($pair in $appParamCollection)
$applicationParameterMap.Add($pair.Name, $pair.Value);
}
# If replacing current upgrade parameters (so, from a previous parameter-only application upgrade), remove them from the list of current params first.
if ($applicationParameterMap.ContainsKey("NodeObserverMemoryWarningLimitMb"))
{
$applicationParameterMap.Remove("NodeObserverMemoryWarningLimitMb");
}
# Add the updated target app parameter(s) to the collection.
$applicationParameterMap.Add("NodeObserverMemoryWarningLimitMb","8000")
# Change existing app parameter values.
$applicationParameterMap["AppObserverEnableVerboseLogging"] = "true"
Start-ServiceFabricApplicationUpgrade -ApplicationName $appName -ApplicationTypeVersion $appVersion -ApplicationParameter $applicationParameterMap -Monitored -FailureAction Rollback
# Start the upgrade.
Start-ServiceFabricApplicationUpgrade -ApplicationName $appName -ApplicationTypeVersion $appVersion -ApplicationParameter $applicationParameterMap -UnMonitoredAuto
```

**For Linux, FO app parameter upgrades will restart FO processes** (one at a time, UD Walk with safety checks) due to the way Linux Capabilites work.
In a nutshell, for any kind of application upgrade, we have to re-run the FO setup script to get the Capabilities in place, which requires restarting FabricObserver (which is just fine given that it is a stateless service).
**For Windows, FO processes will NOT be restarted as part of the upgrade UD walk**.
**For Windows, FO processes will NOT be restarted by default, but SF Hosting may decide to restart depending upon the number of parameters that are modified and/or the type of change (like changing RG values, for example)**.
4 changes: 2 additions & 2 deletions FabricObserver.Extensibility.nuspec.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="3.3.0">
<id>%PACKAGE_ID%</id>
<version>3.2.10</version>
<version>3.2.11</version>
<releaseNotes>
Note: This is library is required for observer plugins that target FabricObserver 3.2.10.
Note: This is library is required for observer plugins that target FabricObserver 3.2.11.
</releaseNotes>
<authors>Microsoft</authors>
<license type="expression">MIT</license>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<RootNamespace>FabricObserver</RootNamespace>
<Copyright>Copyright © 2023</Copyright>
<Product>FabricObserver</Product>
<Version>3.2.10</Version>
<FileVersion>3.2.10</FileVersion>
<Version>3.2.11</Version>
<FileVersion>3.2.11</FileVersion>
<NoWarn>CA1416</NoWarn>
</PropertyGroup>
<ItemGroup>
Expand All @@ -16,7 +16,7 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.2.2" />
<PackageReference Include="NLog" Version="5.2.4" />
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="7.0.0" />
<PackageReference Include="System.Management" Version="7.0.2" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,7 @@ public override (int LowPort, int HighPort, int NumberOfPorts) TupleGetDynamicPo
};

process.StartInfo = ps;

if (!process.Start())
{
return (-1, -1, 0);
}
_ = process.Start();

// Start async reads.
process.BeginErrorReadLine();
Expand All @@ -276,7 +272,7 @@ public override (int LowPort, int HighPort, int NumberOfPorts) TupleGetDynamicPo
{
OSInfoLogger.LogWarning(
"TupleGetDynamicPortRange: netsh failure. " +
$"Unable to determine dynamic port range (will return (-1, -1)):{Environment.NewLine}{error}");
$"Unable to determine dynamic port range (will return (-1, -1)). Failed with: {error}");

return (-1, -1, 0);
}
Expand Down Expand Up @@ -645,12 +641,7 @@ private void RefreshNetstatData()
};

process.StartInfo = ps;

if (!process.Start())
{
OSInfoLogger.LogWarning($"Unable to start process: {ps.Arguments}");
return;
}
_ = process.Start();

// Start asynchronous read operations.
process.BeginErrorReadLine();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------

using NLog;
using System;
using System.Collections.Generic;
using System.Diagnostics;
Expand Down
Loading

0 comments on commit 143a7c6

Please sign in to comment.