Skip to content

Commit

Permalink
FO 3.1.11, CO 2.1.9
Browse files Browse the repository at this point in the history
FO 3.1.11, CO 2.1.9
  • Loading branch information
GitTorre authored May 6, 2021
2 parents 1cf8223 + 6f8a194 commit 639eff2
Show file tree
Hide file tree
Showing 62 changed files with 869 additions and 825 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.1.8" "$scriptPath\bin\release\ClusterObserver\linux-x64\self-contained\ClusterObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.ClusterObserver.Linux.FrameworkDependent.2.1.8" "$scriptPath\bin\release\ClusterObserver\linux-x64\framework-dependent\ClusterObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.ClusterObserver.Linux.SelfContained.2.1.9" "$scriptPath\bin\release\ClusterObserver\linux-x64\self-contained\ClusterObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.ClusterObserver.Linux.FrameworkDependent.2.1.9" "$scriptPath\bin\release\ClusterObserver\linux-x64\framework-dependent\ClusterObserverType"

Build-SFPkg "Microsoft.ServiceFabricApps.ClusterObserver.Windows.SelfContained.2.1.8" "$scriptPath\bin\release\ClusterObserver\win-x64\self-contained\ClusterObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.ClusterObserver.Windows.FrameworkDependent.2.1.8" "$scriptPath\bin\release\ClusterObserver\win-x64\framework-dependent\ClusterObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.ClusterObserver.Windows.SelfContained.2.1.9" "$scriptPath\bin\release\ClusterObserver\win-x64\self-contained\ClusterObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.ClusterObserver.Windows.FrameworkDependent.2.1.9" "$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.1.10" "$scriptPath\bin\release\FabricObserver\linux-x64\self-contained\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Linux.FrameworkDependent.3.1.10" "$scriptPath\bin\release\FabricObserver\linux-x64\framework-dependent\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Linux.SelfContained.3.1.11" "$scriptPath\bin\release\FabricObserver\linux-x64\self-contained\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Linux.FrameworkDependent.3.1.11" "$scriptPath\bin\release\FabricObserver\linux-x64\framework-dependent\FabricObserverType"

Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained.3.1.10" "$scriptPath\bin\release\FabricObserver\win-x64\self-contained\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Windows.FrameworkDependent.3.1.10" "$scriptPath\bin\release\FabricObserver\win-x64\framework-dependent\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Windows.SelfContained.3.1.11" "$scriptPath\bin\release\FabricObserver\win-x64\self-contained\FabricObserverType"
Build-SFPkg "Microsoft.ServiceFabricApps.FabricObserver.Windows.FrameworkDependent.3.1.11" "$scriptPath\bin\release\FabricObserver\win-x64\framework-dependent\FabricObserverType"
}
finally {
Pop-Location
Expand Down
5 changes: 2 additions & 3 deletions ClusterObserver.nuspec.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="3.3.0">
<id>%PACKAGE_ID%</id>
<version>2.1.8</version>
<version>2.1.9</version>
<releaseNotes>
Added new configurable feature: Repair Job monitoring.
Code improvements.
</releaseNotes>
<authors>Microsoft</authors>
<license type="expression">MIT</license>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<title>Service Fabric ClusterObserver Application</title>
<icon>icon.png</icon>
<language>en-US</language>
Expand Down
34 changes: 17 additions & 17 deletions ClusterObserver/ClusterObserver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public ClusterObserver(ConfigurationSettings settings = null)
ConfigSettings = new ConfigSettings(settings, ObserverConstants.ClusterObserverConfigurationSectionName);
ObserverLogger = new Logger(ObserverName, ClusterObserverManager.LogPath)
{
EnableVerboseLogging = ConfigSettings.EnableVerboseLogging,
EnableVerboseLogging = ConfigSettings.EnableVerboseLogging
};
}

Expand Down Expand Up @@ -152,7 +152,7 @@ private async Task ReportClusterHealthAsync(CancellationToken token)
HealthState = "Ok",
Description = repairState,
Metric = "AggregatedClusterHealth",
Source = ObserverName,
Source = ObserverName
};

await ObserverTelemetryClient.ReportHealthAsync(telemetry, token);
Expand All @@ -169,7 +169,7 @@ private async Task ReportClusterHealthAsync(CancellationToken token)
HealthState = "Ok",
HealthEventDescription = repairState,
Metric = "AggregatedClusterHealth",
Source = ObserverName,
Source = ObserverName
});
}
}
Expand All @@ -193,7 +193,7 @@ private async Task ReportClusterHealthAsync(CancellationToken token)
HealthState = "Ok",
Description = "Cluster has recovered from previous Error/Warning state.",
Metric = "AggregatedClusterHealth",
Source = ObserverName,
Source = ObserverName
};

await ObserverTelemetryClient.ReportHealthAsync(telemetry, token);
Expand All @@ -210,7 +210,7 @@ private async Task ReportClusterHealthAsync(CancellationToken token)
HealthState = "Ok",
HealthEventDescription = "Cluster has recovered from previous Error/Warning state.",
Metric = "AggregatedClusterHealth",
Source = ObserverName,
Source = ObserverName
});
}
}
Expand Down Expand Up @@ -305,7 +305,7 @@ private async Task ReportClusterHealthAsync(CancellationToken token)
var telemetryData = new TelemetryData(FabricClientInstance, token)
{
HealthState = "Warning",
Description = msg,
Description = msg
};

await ObserverTelemetryClient.ReportHealthAsync(telemetryData, token);
Expand All @@ -319,7 +319,7 @@ private async Task ReportClusterHealthAsync(CancellationToken token)
new
{
HealthState = "Warning",
HealthEventDescription = msg,
HealthEventDescription = msg
});
}

Expand Down Expand Up @@ -444,7 +444,7 @@ private async Task ProcessApplicationHealthAsync(IList<ApplicationHealthState> a
ApplicationName = appName.OriginalString,
HealthState = Enum.GetName(typeof(HealthState), appHealth.AggregatedHealthState),
Description = telemetryDescription,
Source = ObserverName,
Source = ObserverName
};

await ObserverTelemetryClient.ReportHealthAsync(telemetryData, token);
Expand All @@ -460,7 +460,7 @@ private async Task ProcessApplicationHealthAsync(IList<ApplicationHealthState> a
ApplicationName = appName.OriginalString,
HealthState = Enum.GetName(typeof(HealthState), appHealth.AggregatedHealthState),
HealthEventDescription = telemetryDescription,
Source = ObserverName,
Source = ObserverName
});
}

Expand Down Expand Up @@ -542,7 +542,7 @@ private async Task ProcessNodeHealthAsync(IEnumerable<NodeHealthState> nodeHealt
Metric = metric ?? "AggregatedClusterHealth",
ObserverName = sourceObserver ?? string.Empty,
Source = foStats != null ? foStats.Source : ObserverName,
Value = foStats != null ? foStats.Value : string.Empty,
Value = foStats != null ? foStats.Value : string.Empty
};

// Telemetry.
Expand Down Expand Up @@ -574,7 +574,7 @@ private async Task ProcessNodeHealthAsync(IEnumerable<NodeHealthState> nodeHealt
Metric = metric ?? "AggregatedClusterHealth",
ObserverName = sourceObserver ?? string.Empty,
Source = foStats != null ? foStats.Source : ObserverName,
Value = value,
Value = value
});
}
}
Expand All @@ -591,7 +591,7 @@ private async Task ProcessGenericEntityHealthAsync(HealthEvaluation evaluation,
{
Description = telemetryDescription,
HealthState = healthState,
Source = ObserverName,
Source = ObserverName
};

// Telemetry.
Expand All @@ -609,7 +609,7 @@ private async Task ProcessGenericEntityHealthAsync(HealthEvaluation evaluation,
{
HealthEventDescription = telemetryDescription,
HealthState = healthState,
Source = ObserverName,
Source = ObserverName
});
}
}
Expand Down Expand Up @@ -641,7 +641,7 @@ private async Task MonitorNodeStatusAsync(CancellationToken token)
Metric = "NodeStatus",
NodeName = nodeDictItem.Key,
Value = "Up",
Source = ObserverName,
Source = ObserverName
};

await ObserverTelemetryClient.ReportHealthAsync(telemetry, token);
Expand All @@ -660,7 +660,7 @@ private async Task MonitorNodeStatusAsync(CancellationToken token)
Metric = "NodeStatus",
NodeName = nodeDictItem.Key,
NodeStatus = "Up",
Source = ObserverName,
Source = ObserverName
});
}

Expand Down Expand Up @@ -715,7 +715,7 @@ private async Task MonitorNodeStatusAsync(CancellationToken token)
Metric = "NodeStatus",
NodeName = kvp.Key,
Value = $"{kvp.Value.NodeStatus}",
Source = ObserverName,
Source = ObserverName
};

await ObserverTelemetryClient.ReportHealthAsync(telemetry, token);
Expand All @@ -734,7 +734,7 @@ private async Task MonitorNodeStatusAsync(CancellationToken token)
Metric = "NodeStatus",
NodeName = kvp.Key,
NodeStatus = $"{kvp.Value.NodeStatus}",
Source = ObserverName,
Source = ObserverName
});
}
}
Expand Down
8 changes: 4 additions & 4 deletions ClusterObserver/ClusterObserverManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public async Task StartAsync()
HealthState = "Warning",
HealthEventDescription = message,
Metric = "ClusterObserverServiceHealth",
Source = ObserverConstants.ClusterObserverName,
Source = ObserverConstants.ClusterObserverName
});
}

Expand Down Expand Up @@ -349,7 +349,7 @@ private Task SignalAbortToRunningObserverAsync()
HealthState = "Warning",
HealthEventDescription = $"{e}",
Metric = "ClusterObserverServiceHealth",
Source = ObserverConstants.ClusterObserverName,
Source = ObserverConstants.ClusterObserverName
});
}
}
Expand Down Expand Up @@ -402,7 +402,7 @@ private async Task RunObserverAync()
HealthState = "Warning",
HealthEventDescription = observerHealthWarning,
Metric = "ClusterObserverServiceHealth",
Source = ObserverConstants.ClusterObserverName,
Source = ObserverConstants.ClusterObserverName
});
}

Expand Down Expand Up @@ -437,7 +437,7 @@ private async Task RunObserverAync()
HealthState = "Warning",
HealthEventDescription = msg,
Metric = "ClusterObserverServiceHealth",
Source = ObserverConstants.ClusterObserverName,
Source = ObserverConstants.ClusterObserverName
});
}

Expand Down
6 changes: 3 additions & 3 deletions ClusterObserver/PackageRoot/ServiceManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ServiceManifest Name="ClusterObserverPkg"
Version="2.1.8"
Version="2.1.9"
xmlns="http://schemas.microsoft.com/2011/01/fabric"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
Expand All @@ -11,7 +11,7 @@
</ServiceTypes>

<!-- Code package is your service executable. -->
<CodePackage Name="Code" Version="2.1.8">
<CodePackage Name="Code" Version="2.1.9">
<EntryPoint>
<ExeHost>
<Program>ClusterObserver</Program>
Expand All @@ -21,7 +21,7 @@

<!-- Config package is the contents of the Config directory under PackageRoot that contains an
independently-updateable and versioned set of custom configuration settings for your service. -->
<ConfigPackage Name="Config" Version="2.1.8" />
<ConfigPackage Name="Config" Version="2.1.9" />

<Resources>
<Endpoints>
Expand Down
4 changes: 2 additions & 2 deletions ClusterObserver/Utilities/FOErrorWarningCodes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static Dictionary<string, string> AppErrorCodesDictionary
{ AppErrorTooManyActiveEphemeralPorts, "AppErrorTooManyActiveEphemeralPorts" },
{ AppWarningTooManyActiveEphemeralPorts, "AppWarningTooManyActiveEphemeralPorts" },
{ AppErrorTooManyOpenFileHandles, "AppErrorTooManyOpenFileHandles" },
{ AppWarningTooManyOpenFileHandles, "AppWarningTooManyOpenFileHandles" },
{ AppWarningTooManyOpenFileHandles, "AppWarningTooManyOpenFileHandles" }
};

public static Dictionary<string, string> NodeErrorCodesDictionary
Expand Down Expand Up @@ -117,7 +117,7 @@ public static Dictionary<string, string> NodeErrorCodesDictionary
{ NodeErrorTotalOpenFileHandlesPercent, "NodeErrorTotalOpenFileHandlesPercent" },
{ NodeWarningTotalOpenFileHandlesPercent, "NodeWarningTotalOpenFileHandlesPercent" },
{ NodeErrorTooManyOpenFileHandles, "NodeErrorTooManyOpenFileHandles" },
{ NodeWarningTooManyOpenFileHandles, "NodeWarningTooManyOpenFileHandles" },
{ NodeWarningTooManyOpenFileHandles, "NodeWarningTooManyOpenFileHandles" }
};

public static string GetErrorWarningNameFromFOCode(string id)
Expand Down
2 changes: 1 addition & 1 deletion ClusterObserver/Utilities/HealthScope.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ public enum HealthScope
Partition,
Replica,
Service,
SystemApplication,
SystemApplication
}
}
6 changes: 3 additions & 3 deletions ClusterObserver/Utilities/JsonHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static MediaTypeFormatter JsonMediaTypeFormatter
return new JsonMediaTypeFormatter
{
SerializerSettings = MediaTypeFormatterSettings,
UseDataContractJsonSerializer = false,
UseDataContractJsonSerializer = false
};
}
}
Expand Down Expand Up @@ -59,9 +59,9 @@ public static bool IsJson<T>(string text)
ContractResolver = new CamelCasePropertyNamesContractResolver(),
Converters = new List<JsonConverter>
{
new StringEnumConverter { NamingStrategy = new CamelCaseNamingStrategy() },
new StringEnumConverter { NamingStrategy = new CamelCaseNamingStrategy() }
},
TypeNameHandling = TypeNameHandling.Auto,
TypeNameHandling = TypeNameHandling.Auto
};

public static T ReadFromJsonStream<T>(Stream stream)
Expand Down
2 changes: 1 addition & 1 deletion ClusterObserver/Utilities/LogLevel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ public enum LogLevel
{
Information,
Warning,
Error,
Error
}
}
2 changes: 1 addition & 1 deletion ClusterObserver/Utilities/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public void InitializeLoggers()
OpenFileCacheTimeout = 5,
ArchiveNumbering = ArchiveNumberingMode.DateAndSequence,
ArchiveEvery = FileArchivePeriod.Day,
AutoFlush = true,
AutoFlush = true
};

LogManager.Configuration.AddTarget(loggerName + "LogFile", target);
Expand Down
6 changes: 3 additions & 3 deletions ClusterObserver/Utilities/Telemetry/AppInsightsTelemetry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public Task ReportHealthAsync(TelemetryData telemetryData, CancellationToken can
{ "Replica", telemetryData.ReplicaId },
{ "Source", telemetryData.ObserverName },
{ "NodeName", telemetryData.NodeName ?? string.Empty },
{ "OS", telemetryData.OS ?? string.Empty },
{ "OS", telemetryData.OS ?? string.Empty }
};

telemetryClient.TrackEvent(ObserverConstants.ClusterObserverETWEventName, properties);
Expand Down Expand Up @@ -230,7 +230,7 @@ public Task<bool> ReportMetricAsync<T>(string name, T value, CancellationToken c
var metricTelemetry = new MetricTelemetry
{
Name = name,
Sum = Convert.ToDouble(value),
Sum = Convert.ToDouble(value)
};

telemetryClient?.TrackMetric(metricTelemetry);
Expand Down Expand Up @@ -324,7 +324,7 @@ public Task ReportMetricAsync(
Count = count,
Min = min,
Max = max,
StandardDeviation = deviation,
StandardDeviation = deviation
};

mt.Context.Cloud.RoleName = roleName;
Expand Down
Loading

0 comments on commit 639eff2

Please sign in to comment.