Skip to content

Commit

Permalink
FO 3.2.12
Browse files Browse the repository at this point in the history
FO 3.2.12
  • Loading branch information
GitTorre authored Dec 21, 2023
2 parents 9b0266a + 1625b85 commit e22e37e
Show file tree
Hide file tree
Showing 41 changed files with 330 additions and 239 deletions.
8 changes: 4 additions & 4 deletions Build-COSFPkgs.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.ClusterObserver.Linux.SelfContained.2.2.6" "$scriptPath\bin\release\ClusterObserver\linux-x64\self-contained\ClusterObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.ClusterObserver.Linux.FrameworkDependent.2.2.6" "$scriptPath\bin\release\ClusterObserver\linux-x64\framework-dependent\ClusterObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.ClusterObserver.Linux.SelfContained.2.2.7" "$scriptPath\bin\release\ClusterObserver\linux-x64\self-contained\ClusterObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.ClusterObserver.Linux.FrameworkDependent.2.2.7" "$scriptPath\bin\release\ClusterObserver\linux-x64\framework-dependent\ClusterObserverType"

Build-SFPkg "Microsoft.ServiceFabricApps.ClusterObserver.Windows.SelfContained.2.2.6" "$scriptPath\bin\release\ClusterObserver\win-x64\self-contained\ClusterObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.ClusterObserver.Windows.FrameworkDependent.2.2.6" "$scriptPath\bin\release\ClusterObserver\win-x64\framework-dependent\ClusterObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.ClusterObserver.Windows.SelfContained.2.2.7" "$scriptPath\bin\release\ClusterObserver\win-x64\self-contained\ClusterObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.ClusterObserver.Windows.FrameworkDependent.2.2.7" "$scriptPath\bin\release\ClusterObserver\win-x64\framework-dependent\ClusterObserverType"
}
finally {
Pop-Location
Expand Down
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.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.Linux.SelfContained.3.2.12" "$scriptPath\bin\release\FabricObserver\linux-x64\self-contained\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Linux.FrameworkDependent.3.2.12" "$scriptPath\bin\release\FabricObserver\linux-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"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained.3.2.12" "$scriptPath\bin\release\FabricObserver\win-x64\self-contained\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Windows.FrameworkDependent.3.2.12" "$scriptPath\bin\release\FabricObserver\win-x64\framework-dependent\FabricObserverType"
}
finally {
Pop-Location
Expand Down
4 changes: 2 additions & 2 deletions ClusterObserver.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>2.2.6</version>
<version>2.2.7</version>
<releaseNotes>
- Bug Fix in App Parameter Version-less Upgrade feature.
- Bug Fixes.
- Performance and Code improvements.
</releaseNotes>
<authors>Microsoft</authors>
Expand Down
48 changes: 28 additions & 20 deletions ClusterObserver/ClusterObserver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public sealed class ClusterObserver : ObserverBase
private readonly Uri fabricSystemAppUri = new(ObserverConstants.SystemAppName);
private readonly bool ignoreDefaultQueryTimeout;

private HealthState LastKnownClusterHealthState
private HealthState LastKnownClusterAggregatedHealthState
{
get; set;
} = HealthState.Unknown;
Expand Down Expand Up @@ -185,7 +185,7 @@ private async Task ReportClusterHealthAsync()
HealthState = HealthState.Ok,
Description = repairState,
Metric = "RepairJobs",
Source = ObserverName
ObserverName = ObserverName
};

// Telemetry.
Expand Down Expand Up @@ -243,19 +243,17 @@ await FabricClientRetryHelper.ExecuteFabricActionWithRetryAsync(
Token);

// Previous aggregated cluster health state was Error or Warning. It's now Ok.
if (clusterHealth.AggregatedHealthState == HealthState.Ok && (LastKnownClusterHealthState == HealthState.Error
|| (EmitWarningDetails && LastKnownClusterHealthState == HealthState.Warning)))
if (clusterHealth.AggregatedHealthState == HealthState.Ok && (LastKnownClusterAggregatedHealthState == HealthState.Error
|| (EmitWarningDetails && LastKnownClusterAggregatedHealthState == HealthState.Warning)))
{
LastKnownClusterHealthState = HealthState.Ok;

var telemetry = new ClusterTelemetryData()
{
ClusterId = ClusterInformation.ClusterInfoTuple.ClusterId,
EntityType = EntityType.Cluster,
HealthState = HealthState.Ok,
Description = $"Cluster has recovered from previous {LastKnownClusterHealthState} state.",
Description = $"Cluster has recovered from previous {LastKnownClusterAggregatedHealthState} state.",
Metric = "AggregatedClusterHealth",
Source = ObserverName
ObserverName = ObserverName
};

// Telemetry.
Expand All @@ -273,6 +271,9 @@ await FabricClientRetryHelper.ExecuteFabricActionWithRetryAsync(
ObserverLogger.LogEtw(ClusterObserverConstants.ClusterObserverETWEventName, telemetry);
}

// Reset last known Cluster aggregated health state.
LastKnownClusterAggregatedHealthState = HealthState.Ok;

return;
}

Expand Down Expand Up @@ -350,7 +351,7 @@ await FabricClientInstance.HealthManager.GetApplicationHealthAsync(
}

// Track current aggregated health state for use in next run.
LastKnownClusterHealthState = clusterHealth.AggregatedHealthState;
LastKnownClusterAggregatedHealthState = clusterHealth.AggregatedHealthState;
}
catch (Exception e) when (e is FabricException or TimeoutException)
{
Expand All @@ -372,7 +373,7 @@ await FabricClientInstance.HealthManager.GetApplicationHealthAsync(
EntityType = EntityType.Cluster,
HealthState = HealthState.Warning,
Description = msg,
Source = ObserverName
ObserverName = ObserverName
};

// Send Telemetry.
Expand Down Expand Up @@ -763,7 +764,7 @@ await FabricClientRetryHelper.ExecuteFabricActionWithRetryAsync(
EntityType = EntityType.Node,
NodeName = targetNode?.NodeName ?? node.NodeName,
NodeType = targetNode?.NodeType,
Source = ObserverName,
ObserverName = ObserverName,
HealthState = targetNode?.HealthState ?? node.AggregatedHealthState,
Description = telemetryDescription
};
Expand Down Expand Up @@ -814,7 +815,8 @@ private async Task ProcessEntityHealthAsync<EntityHealth>(EntityHealth entityHea
Property = healthEvent.HealthInformation.Property,
Description = healthEvent.HealthInformation.Description,
HealthState = healthEvent.HealthInformation.HealthState,
Source = healthEvent.HealthInformation.SourceId
Source = healthEvent.HealthInformation.SourceId,
ObserverName = ClusterObserverConstants.ClusterObserverName
};

// Telemetry.
Expand Down Expand Up @@ -853,7 +855,8 @@ private async Task ProcessEntityHealthAsync<EntityHealth>(EntityHealth entityHea
Property = healthEvent.HealthInformation.Property,
Description = healthEvent.HealthInformation.Description,
HealthState = healthEvent.HealthInformation.HealthState,
Source = healthEvent.HealthInformation.SourceId
Source = healthEvent.HealthInformation.SourceId,
ObserverName = ClusterObserverConstants.ClusterObserverName
};

// Telemetry.
Expand Down Expand Up @@ -905,7 +908,8 @@ await FabricClientInstance.QueryManager.GetDeployedServicePackageListAsync(
Property = healthEvent.HealthInformation.Property,
Description = healthEvent.HealthInformation.Description,
HealthState = healthEvent.HealthInformation.HealthState,
Source = healthEvent.HealthInformation.SourceId
Source = healthEvent.HealthInformation.SourceId,
ObserverName = ClusterObserverConstants.ClusterObserverName
};

// Telemetry.
Expand Down Expand Up @@ -943,7 +947,8 @@ await FabricClientInstance.QueryManager.GetDeployedServicePackageListAsync(
Property = healthEvent.HealthInformation.Property,
Description = healthEvent.HealthInformation.Description,
HealthState = healthEvent.HealthInformation.HealthState,
Source = healthEvent.HealthInformation.SourceId
Source = healthEvent.HealthInformation.SourceId,
ObserverName = ClusterObserverConstants.ClusterObserverName
};

// Telemetry.
Expand Down Expand Up @@ -981,7 +986,8 @@ await FabricClientInstance.QueryManager.GetDeployedServicePackageListAsync(
PartitionId = partitionHealth.PartitionId.ToString(),
Description = healthEvent.HealthInformation.Description,
HealthState = healthEvent.HealthInformation.HealthState,
Source = healthEvent.HealthInformation.SourceId
Source = healthEvent.HealthInformation.SourceId,
ObserverName = ClusterObserverConstants.ClusterObserverName
};

// Telemetry.
Expand Down Expand Up @@ -1037,7 +1043,8 @@ await FabricClientInstance.QueryManager.GetReplicaListAsync(
Description = healthEvent.HealthInformation.Description,
HealthState = healthEvent.HealthInformation.HealthState,
ServiceKind = serviceKind,
Source = healthEvent.HealthInformation.SourceId
Source = healthEvent.HealthInformation.SourceId,
ObserverName = ClusterObserverConstants.ClusterObserverName
};

// Telemetry.
Expand Down Expand Up @@ -1096,7 +1103,8 @@ await FabricClientInstance.QueryManager.GetReplicaListAsync(
ServiceTypeVersion = serviceList[0].ServiceManifestVersion,
Description = healthEvent.HealthInformation.Description,
HealthState = healthEvent.HealthInformation.HealthState,
Source = healthEvent.HealthInformation.SourceId
Source = healthEvent.HealthInformation.SourceId,
ObserverName = ClusterObserverConstants.ClusterObserverName
};

// Telemetry.
Expand Down Expand Up @@ -1153,7 +1161,7 @@ private async Task MonitorNodeStatusAsync(CancellationToken Token, bool isTest =
Metric = "NodeStatus",
NodeName = nodeDictItem.Key,
NodeType = nodeList.Any(n => n.NodeName == nodeDictItem.Key) ? nodeList.First(n => n.NodeName == nodeDictItem.Key).NodeType : null,
Source = ObserverName,
ObserverName = ObserverName,
Value = 0
};

Expand Down Expand Up @@ -1221,7 +1229,7 @@ or NodeStatus.Disabling
Metric = "NodeStatus",
NodeName = kvp.Key,
NodeType = nodeList.Any(n => n.NodeName == kvp.Key) ? nodeList.First(n => n.NodeName == kvp.Key).NodeType : null,
Source = ObserverName,
ObserverName = ObserverName,
Value = 1,
};

Expand Down
4 changes: 2 additions & 2 deletions ClusterObserver/ClusterObserver.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
<TargetLatestRuntimePatch>True</TargetLatestRuntimePatch>
<Product>ClusterObserver</Product>
<Version>2.2.6</Version>
<FileVersion>2.2.6</FileVersion>
<Version>2.2.7</Version>
<FileVersion>2.2.7</FileVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<StartupObject>ClusterObserver.Program</StartupObject>
Expand Down
3 changes: 1 addition & 2 deletions ClusterObserver/ClusterObserverManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using System.Fabric.Health;
using System.IO;
using System.Linq;
using System.Net.Http.Headers;
using System.Threading;
using System.Threading.Tasks;
using ClusterObserver.Utilities;
Expand Down Expand Up @@ -40,7 +39,7 @@ public sealed class ClusterObserverManager : IDisposable
private bool appParamsUpdating;

// Folks often use their own version numbers. This is for internal diagnostic telemetry.
private const string InternalVersionNumber = "2.2.6";
private const string InternalVersionNumber = "2.2.7";

public bool EnableOperationalTelemetry
{
Expand Down
Loading

0 comments on commit e22e37e

Please sign in to comment.