This commit is contained in:
Charles Torre 2023-04-06 17:00:44 -07:00
Родитель ba58c33e14
Коммит 7eda8d0677
4 изменённых файлов: 23 добавлений и 5 удалений

Просмотреть файл

@ -87,8 +87,8 @@ Global
{FB6B2E0E-2243-4447-BA56-7D91CB0D2127}.Debug|x64.Build.0 = Debug|x64
{FB6B2E0E-2243-4447-BA56-7D91CB0D2127}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FB6B2E0E-2243-4447-BA56-7D91CB0D2127}.Release|Any CPU.Build.0 = Release|Any CPU
{FB6B2E0E-2243-4447-BA56-7D91CB0D2127}.Release|x64.ActiveCfg = Release|Any CPU
{FB6B2E0E-2243-4447-BA56-7D91CB0D2127}.Release|x64.Build.0 = Release|Any CPU
{FB6B2E0E-2243-4447-BA56-7D91CB0D2127}.Release|x64.ActiveCfg = Release|x64
{FB6B2E0E-2243-4447-BA56-7D91CB0D2127}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Просмотреть файл

@ -52,7 +52,7 @@
## config (an internal predicate needs no backing impl, it only exists in this logic). This is useful if all folder targets share enough
## of the same argument values (less rules to write..).
Mitigate(MetricName=?MetricName) :- match(?MetricName, "FolderSizeMB"), GetRepairHistory(?repairCount, 08:00:00),
?repairCount < 4,
?repairCount < 8,
member(config(?X,?Y), [config("D:\SvcFab\Log\Traces", 50), config("C:\fabric_observer_logs", 10), config("E:\temp", 10)]),
CheckFolderSize(?X, MaxFolderSizeMB=?Y),
DeleteFiles(?X, SortOrder=Ascending, MaxFilesToDelete=10, RecurseSubdirectories=true).

Просмотреть файл

@ -10,8 +10,6 @@ using FabricHealer.Utilities.Telemetry;
using System.Threading.Tasks;
using System.IO;
using System.Text.RegularExpressions;
using System.Fabric;
using System.Fabric.Query;
namespace FabricHealer.Repair.Guan
{

Просмотреть файл

@ -1248,6 +1248,26 @@ namespace FabricHealer.Repair
return nodeHealth.AggregatedHealthState;
case EntityType.Disk:
var diskHealth = await FabricClientRetryHelper.ExecuteFabricActionWithRetryAsync(
() => FabricHealerManager.FabricClientSingleton.HealthManager.GetNodeHealthAsync(
repairData.NodeName,
FabricHealerManager.ConfigSettings.AsyncTimeout,
token),
token);
bool isTargetTargetNodeHealthy =
diskHealth.HealthEvents.Any(
h => JsonSerializationUtility.TryDeserializeObject(h.HealthInformation.Description, out TelemetryData desc)
&& desc.NodeName == repairData.NodeName
&& SupportedErrorCodes.GetCodeNameFromErrorCode(desc.Code) != null
&& (SupportedErrorCodes.GetCodeNameFromErrorCode(desc.Code).Contains("Disk")
|| SupportedErrorCodes.GetCodeNameFromErrorCode(desc.Code).Contains("Folder"))
&& h.HealthInformation.HealthState == HealthState.Ok);
return isTargetTargetNodeHealthy ? HealthState.Ok : diskHealth.AggregatedHealthState;
case EntityType.Replica:
if (!RepairExecutor.TryGetGuid(repairData.PartitionId, out Guid partitionId))