Skip to content

Commit

Permalink
Merge pull request #53 from microsoft/CoordinatorServiceCrash
Browse files Browse the repository at this point in the history
Coordinator service crashes when there are no POA completed repair tasks
  • Loading branch information
khandelwalbrijesh authored Feb 28, 2020
2 parents f0a0f6b + 15eece9 commit a5b38bd
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ServiceManifest Name="CoordinatorServicePkg"
Version="1.4.2"
Version="1.4.3"
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="1.4.2">
<CodePackage Name="Code" Version="1.4.3">
<EntryPoint>
<ExeHost>
<Program>CoordinatorService.exe</Program>
Expand All @@ -21,7 +21,7 @@

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

<Resources>
<Endpoints>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,10 +553,14 @@ internal async Task PrepareRepairTasks(CancellationToken cancellationToken)
{
if (claimedTaskList.Any())
{
RepairTask lastCompletedTask = (await this.GetCompletedRepairTasks(nodeList, cancellationToken))?.Aggregate(
(curMax, task) => (task.CompletedTimestamp > curMax.CompletedTimestamp ? task : curMax));
IList<RepairTask> completedTasks = await this.GetCompletedRepairTasks(nodeList, cancellationToken);
TimeSpan? timePastAfterCompletedTask = null;
if (completedTasks.Any())
{
RepairTask lastCompletedTask = completedTasks.Aggregate((curMax, task) => (task.CompletedTimestamp > curMax.CompletedTimestamp ? task : curMax));
timePastAfterCompletedTask = DateTime.UtcNow - lastCompletedTask?.CompletedTimestamp;
}

TimeSpan? timePastAfterCompletedTask = DateTime.UtcNow - lastCompletedTask?.CompletedTimestamp;

if (!timePastAfterCompletedTask.HasValue ||
timePastAfterCompletedTask.Value > MinWaitTimeBetweenNodes)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ServiceManifest Name="NodeAgentServicePkg"
Version="1.4.2"
Version="1.4.3"
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="1.4.2">
<CodePackage Name="Code" Version="1.4.3">
<SetupEntryPoint>
<ExeHost>
<Program>SetupEntryPoint.bat</Program>
Expand All @@ -27,7 +27,7 @@

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

<Resources>
<Endpoints>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<ApplicationManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ApplicationTypeName="PatchOrchestrationApplicationType" ApplicationTypeVersion="1.4.2" xmlns="http://schemas.microsoft.com/2011/01/fabric">
<ApplicationManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ApplicationTypeName="PatchOrchestrationApplicationType" ApplicationTypeVersion="1.4.3" xmlns="http://schemas.microsoft.com/2011/01/fabric">
<Parameters>
<Parameter Name="CoordinatorService_MinReplicaSetSize" DefaultValue="3" />
<Parameter Name="CoordinatorService_TargetReplicaSetSize" DefaultValue="3" />
Expand Down Expand Up @@ -52,7 +52,7 @@
should match the Name and Version attributes of the ServiceManifest element defined in the
ServiceManifest.xml file. -->
<ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="CoordinatorServicePkg" ServiceManifestVersion="1.4.2" />
<ServiceManifestRef ServiceManifestName="CoordinatorServicePkg" ServiceManifestVersion="1.4.3" />
<ConfigOverrides>
<ConfigOverride Name="Config">
<Settings>
Expand All @@ -66,7 +66,7 @@
</ConfigOverrides>
</ServiceManifestImport>
<ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="NodeAgentServicePkg" ServiceManifestVersion="1.4.2" />
<ServiceManifestRef ServiceManifestName="NodeAgentServicePkg" ServiceManifestVersion="1.4.3" />
<ConfigOverrides>
<ConfigOverride Name="Config">
<Settings>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PropertyGroup Label="Configuration">
<Id>ServiceFabric.PatchOrchestrationApplication</Id>
<Title>ServiceFabric.PatchOrchestrationApplication</Title>
<Version>1.4.2</Version>
<Version>1.4.3</Version>
<Authors>brkhande;raunakp</Authors>
<Owners>brkhande;raunakp</Owners>
<Description>This package contains Service Fabric Patch Orchestration Application.</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Param
$ImageStoreConnectionString = "fabric:ImageStore",

[string]
$ApplicationVersion = "1.4.2",
$ApplicationVersion = "1.4.3",

[hashtable]
$ApplicationParameters = @{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Param
$ImageStoreConnectionString = "fabric:ImageStore",

[string]
$ApplicationVersion = "1.4.2"
$ApplicationVersion = "1.4.3"
)

Remove-ServiceFabricApplication -ApplicationName fabric:/PatchOrchestrationApplication -Force
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Param
$ImageStoreConnectionString = "fabric:ImageStore",

[string]
$ApplicationVersion = "1.4.2",
$ApplicationVersion = "1.4.3",

[hashtable]
$ApplicationParameters = @{},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class TelemetryEvents
// Every time a new version of application would be release, manually update this version.
// This application version is used for telemetry
// For consistency keep this applicaiton version same as application version from application manifest.
private const string ApplicationVersion = "1.4.2";
private const string ApplicationVersion = "1.4.3";

public TelemetryEvents(FabricClient fabricClient, ITelemetryEventSource eventSource)
{
Expand Down
2 changes: 1 addition & 1 deletion src/properties/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
1. Assembly info
2. File info
3. Not yet in Telemetry of windows -->
<VersionPrefix>1.4.2</VersionPrefix>
<VersionPrefix>1.4.3</VersionPrefix>
<Company>Microsoft</Company>
<!--GenerateAssemblyInfo>false</GenerateAssemblyInfo-->
</PropertyGroup>
Expand Down

0 comments on commit a5b38bd

Please sign in to comment.