From c37f594f3fa2dea6712fe5b0ccfd921b3aa4b2d5 Mon Sep 17 00:00:00 2001 From: Yisu Ma Date: Tue, 29 Aug 2023 15:50:39 -0700 Subject: [PATCH 1/8] Added a warning notice on cluster page when failover manager is in quorum loss status --- src/Sfx-Proxy/appsettings.json | 4 +++- src/SfxWeb/src/app/Models/RawDataTypes.ts | 1 + src/SfxWeb/src/app/modules/charts/chart.scss | 12 ++++++++++++ .../src/app/services/rest-client.service.ts | 2 +- .../essentials/essentials.component.html | 4 ++++ .../essentials/essentials.component.ts | 19 +++++++++++++++++++ 6 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/Sfx-Proxy/appsettings.json b/src/Sfx-Proxy/appsettings.json index 103e9c751..ffeb30ff4 100644 --- a/src/Sfx-Proxy/appsettings.json +++ b/src/Sfx-Proxy/appsettings.json @@ -1,6 +1,8 @@ { "TargetCluster": { - "Url": "http://localhost:19080" + "Url": "https://yisuma08281812.southcentralus.cloudapp.azure.com:19080", + "PFXLocation": "C:/Users/yisuma/Downloads/yisuma08281812-rg-yisuma08281812-rg20230828111347-20230828.pfx", + "PFXPassPhrase": "" }, "recordFileBase": "playbackRecordings/" } \ No newline at end of file diff --git a/src/SfxWeb/src/app/Models/RawDataTypes.ts b/src/SfxWeb/src/app/Models/RawDataTypes.ts index d609f09e4..bdd9bd53d 100644 --- a/src/SfxWeb/src/app/Models/RawDataTypes.ts +++ b/src/SfxWeb/src/app/Models/RawDataTypes.ts @@ -1,3 +1,4 @@ +import { extend } from 'cypress/types/lodash'; import { NodeStatusConstants, HealthStateConstants } from '../Common/Constants'; import { Node } from './DataModels/Node'; diff --git a/src/SfxWeb/src/app/modules/charts/chart.scss b/src/SfxWeb/src/app/modules/charts/chart.scss index c988332d0..3f1bac87d 100644 --- a/src/SfxWeb/src/app/modules/charts/chart.scss +++ b/src/SfxWeb/src/app/modules/charts/chart.scss @@ -78,6 +78,18 @@ $dashboard-small-padding-horizontal: 12px; &.badge-upgrade-inactive { background: var(--accent-background-color); } + + &.badge-error-active { + background: var(--badge-error); + } + + &.badge-warning-active { + background: var(--badge-warning); + } + + &.badge-error-inactive { + background: var(--badge-ok); + } } .dashboard-tile-title { diff --git a/src/SfxWeb/src/app/services/rest-client.service.ts b/src/SfxWeb/src/app/services/rest-client.service.ts index 468fb0d4a..632a18a53 100644 --- a/src/SfxWeb/src/app/services/rest-client.service.ts +++ b/src/SfxWeb/src/app/services/rest-client.service.ts @@ -12,7 +12,7 @@ import { IRawCollection, IRawClusterManifest, IRawClusterHealth, IRawClusterUpgr IRawApplication, IRawService, IRawCreateServiceDescription, IRawCreateServiceFromTemplateDescription, IRawUpdateServiceDescription, IRawServiceDescription, IRawServiceHealth, IRawApplicationUpgradeProgress, IRawCreateComposeDeploymentDescription, IRawPartition, IRawPartitionHealth, IRawPartitionLoadInformation, IRawReplicaOnPartition, IRawReplicaHealth, IRawImageStoreContent, IRawStoreFolderSize, IRawClusterVersion, IRawList, IRawAadMetadata, IRawStorage, IRawRepairTask, - IRawServiceNameInfo, IRawApplicationNameInfo, IRawBackupEntity, IRawInfrastructureJob, IRawInfraRepairTask, IRawRoleInstanceImpact } from '../Models/RawDataTypes'; + IRawServiceNameInfo, IRawApplicationNameInfo, IRawBackupEntity, IRawInfrastructureJob, IRawInfraRepairTask, IRawRoleInstanceImpact} from '../Models/RawDataTypes'; import { mergeMap, map, catchError, finalize, skip } from 'rxjs/operators'; import { Application } from '../Models/DataModels/Application'; import { Service } from '../Models/DataModels/Service'; diff --git a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.html b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.html index 4ce6990e3..6574cd933 100644 --- a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.html +++ b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.html @@ -40,6 +40,10 @@

Throttled Infrastructure Jobs

+
+ +
+
diff --git a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts index 07e15320c..ecb8b65f3 100644 --- a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts +++ b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts @@ -16,6 +16,8 @@ import { HealthUtils, HealthStatisticsEntityKind } from 'src/app/Utils/healthUti import { RepairTaskCollection } from 'src/app/Models/DataModels/collections/RepairTaskCollection'; import { IEssentialListItem } from 'src/app/modules/charts/essential-health-tile/essential-health-tile.component'; import { InfrastructureCollection } from 'src/app/Models/DataModels/collections/infrastructureCollection'; +import { RestClientService } from 'src/app/services/rest-client.service'; +import { IRawPartition } from 'src/app/Models/RawDataTypes'; @Component({ selector: 'app-essentials', @@ -41,12 +43,16 @@ export class EssentialsComponent extends BaseControllerDirective { replicasDashboard: IDashboardViewModel; upgradesDashboard: IDashboardViewModel; upgradeAppsCount = 0; + fmQuorumLossStatus : string; + fmQuorumLossWarning : string; + partition : IRawPartition; essentialItems: IEssentialListItem[] = []; constructor(public data: DataService, public injector: Injector, public settings: SettingsService, + public RestClient: RestClientService, private routes: RoutesService) { super(injector); } @@ -61,6 +67,7 @@ export class EssentialsComponent extends BaseControllerDirective { this.infraCollection = this.data.infrastructureCollection; this.infraSettings = this.settings.getNewOrExistingInfrastructureSettings(); + //this.fmInQuorumLossState = this.RestClient.getPartitionById("1"); } refresh(messageHandler?: IResponseMessageHandler): Observable { @@ -91,6 +98,18 @@ export class EssentialsComponent extends BaseControllerDirective { this.nodes.refresh(messageHandler).pipe(map(() => {this.updateItemInEssentials(); })), this.systemApp.refresh(messageHandler).pipe(catchError(err => of(null))), this.clusterUpgradeProgress.refresh(messageHandler), + //this.data.getFM + this.RestClient.getPartitionById("00000000-0000-0000-0000-000000000001", messageHandler).pipe(map((partition) => { + this.fmQuorumLossStatus = partition.PartitionStatus; + if (this.fmQuorumLossStatus == "InQuorumLoss") { + this.fmQuorumLossWarning = "The Failover Manager partition is currently in quorum loss state. " + + "Cluster will be stucking during Failover Manager Quorum Loss. " + + "Service failover, automatic recovery will be blocked. " + + "Health/availability state of services/nodes may not be reflected. " + } + this.partition = partition; + })), + this.data.getClusterManifest().pipe(map((manifest) => { if (manifest.isRepairManagerEnabled) { return this.repairtaskCollection.refresh(messageHandler); From 000aa160a7871ceaa9755647d56395bca6df224c Mon Sep 17 00:00:00 2001 From: Yisu Ma Date: Thu, 31 Aug 2023 14:34:05 -0700 Subject: [PATCH 2/8] Added a warning notice when Failover Manager is in quorum loss state with corresponding e2e test. --- src/SfxWeb/cypress/e2e/cluster.cy.js | 17 +++++++++++++++++ .../fixtures/cluster-page/fm/inQuorumLoss.json | 4 ++++ .../cluster-page/fm/notInQuorumLoss.json | 4 ++++ 3 files changed, 25 insertions(+) create mode 100644 src/SfxWeb/cypress/fixtures/cluster-page/fm/inQuorumLoss.json create mode 100644 src/SfxWeb/cypress/fixtures/cluster-page/fm/notInQuorumLoss.json diff --git a/src/SfxWeb/cypress/e2e/cluster.cy.js b/src/SfxWeb/cypress/e2e/cluster.cy.js index e433d766f..0ef1407fe 100644 --- a/src/SfxWeb/cypress/e2e/cluster.cy.js +++ b/src/SfxWeb/cypress/e2e/cluster.cy.js @@ -21,6 +21,10 @@ context('Cluster page', () => { }) describe("essentials", () => { + beforeEach(() => { + cy.intercept(apiUrl('/Partitions/00000000-0000-0000-0000-000000000001?*'), + {fixture: 'cluster-page/fm/notInQuorumLoss.json'}).as("getFMQuorumLossStatus") + }) it('load essentials', () => { cy.visit('') @@ -71,6 +75,19 @@ context('Cluster page', () => { }) + + it('displays FM quorum loss warning when in quorum loss status', () => { + cy.visit(''); + cy.wait('@getFMQuorumLossStatus') + cy.get('[data-cy="fmql-warning"]').should('not.exist'); + cy.intercept(apiUrl('/Partitions/00000000-0000-0000-0000-000000000001?*'), + {fixture: 'cluster-page/fm/inQuorumLoss.json'}).as("getFMQuorumLossStatus") + cy.reload(); + cy.wait('@getFMQuorumLossStatus') + cy.get('[data-cy="fmql-warning"]').should('exist').should('be.visible'); + }); + + it('xss', () => { addDefaultFixtures(xssPrefix); diff --git a/src/SfxWeb/cypress/fixtures/cluster-page/fm/inQuorumLoss.json b/src/SfxWeb/cypress/fixtures/cluster-page/fm/inQuorumLoss.json new file mode 100644 index 000000000..f5de85d61 --- /dev/null +++ b/src/SfxWeb/cypress/fixtures/cluster-page/fm/inQuorumLoss.json @@ -0,0 +1,4 @@ +{ + "ServiceKind": "Stateful", + "PartitionStatus": "InQuorumLoss" +} \ No newline at end of file diff --git a/src/SfxWeb/cypress/fixtures/cluster-page/fm/notInQuorumLoss.json b/src/SfxWeb/cypress/fixtures/cluster-page/fm/notInQuorumLoss.json new file mode 100644 index 000000000..12fa02e26 --- /dev/null +++ b/src/SfxWeb/cypress/fixtures/cluster-page/fm/notInQuorumLoss.json @@ -0,0 +1,4 @@ +{ + "ServiceKind": "Stateful", + "PartitionStatus": "OK" +} \ No newline at end of file From c8dc031f2e9bf78e8940bc523ecd1b6e0879ee5f Mon Sep 17 00:00:00 2001 From: Yisu Ma Date: Thu, 31 Aug 2023 15:23:38 -0700 Subject: [PATCH 3/8] Changed some styles --- src/Sfx-Proxy/appsettings.json | 4 +--- src/SfxWeb/src/app/modules/charts/chart.scss | 12 ------------ .../views/cluster/essentials/essentials.component.ts | 1 - 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/Sfx-Proxy/appsettings.json b/src/Sfx-Proxy/appsettings.json index ffeb30ff4..103e9c751 100644 --- a/src/Sfx-Proxy/appsettings.json +++ b/src/Sfx-Proxy/appsettings.json @@ -1,8 +1,6 @@ { "TargetCluster": { - "Url": "https://yisuma08281812.southcentralus.cloudapp.azure.com:19080", - "PFXLocation": "C:/Users/yisuma/Downloads/yisuma08281812-rg-yisuma08281812-rg20230828111347-20230828.pfx", - "PFXPassPhrase": "" + "Url": "http://localhost:19080" }, "recordFileBase": "playbackRecordings/" } \ No newline at end of file diff --git a/src/SfxWeb/src/app/modules/charts/chart.scss b/src/SfxWeb/src/app/modules/charts/chart.scss index 3f1bac87d..c988332d0 100644 --- a/src/SfxWeb/src/app/modules/charts/chart.scss +++ b/src/SfxWeb/src/app/modules/charts/chart.scss @@ -78,18 +78,6 @@ $dashboard-small-padding-horizontal: 12px; &.badge-upgrade-inactive { background: var(--accent-background-color); } - - &.badge-error-active { - background: var(--badge-error); - } - - &.badge-warning-active { - background: var(--badge-warning); - } - - &.badge-error-inactive { - background: var(--badge-ok); - } } .dashboard-tile-title { diff --git a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts index ecb8b65f3..3597cf87d 100644 --- a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts +++ b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts @@ -98,7 +98,6 @@ export class EssentialsComponent extends BaseControllerDirective { this.nodes.refresh(messageHandler).pipe(map(() => {this.updateItemInEssentials(); })), this.systemApp.refresh(messageHandler).pipe(catchError(err => of(null))), this.clusterUpgradeProgress.refresh(messageHandler), - //this.data.getFM this.RestClient.getPartitionById("00000000-0000-0000-0000-000000000001", messageHandler).pipe(map((partition) => { this.fmQuorumLossStatus = partition.PartitionStatus; if (this.fmQuorumLossStatus == "InQuorumLoss") { From d3e94fe60634048a669277fd8c4db9e500797c8f Mon Sep 17 00:00:00 2001 From: Yisu Ma Date: Wed, 27 Sep 2023 15:38:03 -0700 Subject: [PATCH 4/8] Modified the wording for warning panel text --- .../src/app/views/cluster/essentials/essentials.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts index 3597cf87d..3e0edc6b5 100644 --- a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts +++ b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts @@ -101,8 +101,8 @@ export class EssentialsComponent extends BaseControllerDirective { this.RestClient.getPartitionById("00000000-0000-0000-0000-000000000001", messageHandler).pipe(map((partition) => { this.fmQuorumLossStatus = partition.PartitionStatus; if (this.fmQuorumLossStatus == "InQuorumLoss") { - this.fmQuorumLossWarning = "The Failover Manager partition is currently in quorum loss state. " + - "Cluster will be stucking during Failover Manager Quorum Loss. " + + this.fmQuorumLossWarning = "The Failover Manager service is in quorum loss state. " + + "Cluster may not be responding. " + "Service failover, automatic recovery will be blocked. " + "Health/availability state of services/nodes may not be reflected. " } From 3d3776edaf9b18b0c1a132c7d340b693d5f8f2aa Mon Sep 17 00:00:00 2001 From: Yisu Ma Date: Wed, 4 Oct 2023 15:33:33 -0700 Subject: [PATCH 5/8] Fixed coding styles and deleted unused import --- src/SfxWeb/src/app/Models/RawDataTypes.ts | 1 - src/SfxWeb/src/app/services/data.service.ts | 4 ++++ .../cluster/essentials/essentials.component.ts | 13 +++---------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/SfxWeb/src/app/Models/RawDataTypes.ts b/src/SfxWeb/src/app/Models/RawDataTypes.ts index bdd9bd53d..d609f09e4 100644 --- a/src/SfxWeb/src/app/Models/RawDataTypes.ts +++ b/src/SfxWeb/src/app/Models/RawDataTypes.ts @@ -1,4 +1,3 @@ -import { extend } from 'cypress/types/lodash'; import { NodeStatusConstants, HealthStateConstants } from '../Common/Constants'; import { Node } from './DataModels/Node'; diff --git a/src/SfxWeb/src/app/services/data.service.ts b/src/SfxWeb/src/app/services/data.service.ts index 83cdbd139..5804ae4f5 100644 --- a/src/SfxWeb/src/app/services/data.service.ts +++ b/src/SfxWeb/src/app/services/data.service.ts @@ -423,6 +423,10 @@ export class DataService { return d; } + public getFailoverManagerPartition(): string { + return "00000000-0000-0000-0000-000000000001"; + } + public createCorrelatedEventList(eventInstanceId: string) { return new CorrelatedEventList(this, eventInstanceId); } diff --git a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts index 3e0edc6b5..b2adcbc07 100644 --- a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts +++ b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts @@ -45,7 +45,6 @@ export class EssentialsComponent extends BaseControllerDirective { upgradeAppsCount = 0; fmQuorumLossStatus : string; fmQuorumLossWarning : string; - partition : IRawPartition; essentialItems: IEssentialListItem[] = []; @@ -67,7 +66,8 @@ export class EssentialsComponent extends BaseControllerDirective { this.infraCollection = this.data.infrastructureCollection; this.infraSettings = this.settings.getNewOrExistingInfrastructureSettings(); - //this.fmInQuorumLossState = this.RestClient.getPartitionById("1"); + this.fmQuorumLossWarning = `The Failover Manager service is in quorum loss state. Cluster may not be responding. + Service failover, automatic recovery will be blocked.Health/availability state of services/nodes may not be reflected.` } refresh(messageHandler?: IResponseMessageHandler): Observable { @@ -98,15 +98,8 @@ export class EssentialsComponent extends BaseControllerDirective { this.nodes.refresh(messageHandler).pipe(map(() => {this.updateItemInEssentials(); })), this.systemApp.refresh(messageHandler).pipe(catchError(err => of(null))), this.clusterUpgradeProgress.refresh(messageHandler), - this.RestClient.getPartitionById("00000000-0000-0000-0000-000000000001", messageHandler).pipe(map((partition) => { + this.RestClient.getPartitionById(this.data.getFailoverManagerPartition(), messageHandler).pipe(map((partition) => { this.fmQuorumLossStatus = partition.PartitionStatus; - if (this.fmQuorumLossStatus == "InQuorumLoss") { - this.fmQuorumLossWarning = "The Failover Manager service is in quorum loss state. " + - "Cluster may not be responding. " + - "Service failover, automatic recovery will be blocked. " + - "Health/availability state of services/nodes may not be reflected. " - } - this.partition = partition; })), this.data.getClusterManifest().pipe(map((manifest) => { From f290e56eaf6cdf2e9e3e650e005ba773db0f547b Mon Sep 17 00:00:00 2001 From: Yisu Ma Date: Mon, 9 Oct 2023 08:57:22 -0700 Subject: [PATCH 6/8] Changed fmQuorumLossStatus to boolean type and set fm partition id to constant --- src/SfxWeb/src/app/Common/Constants.ts | 5 +++++ src/SfxWeb/src/app/services/data.service.ts | 4 ---- .../views/cluster/essentials/essentials.component.html | 2 +- .../app/views/cluster/essentials/essentials.component.ts | 9 ++++++--- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/SfxWeb/src/app/Common/Constants.ts b/src/SfxWeb/src/app/Common/Constants.ts index fbe8d6013..74b1786cf 100644 --- a/src/SfxWeb/src/app/Common/Constants.ts +++ b/src/SfxWeb/src/app/Common/Constants.ts @@ -224,6 +224,11 @@ export class TelemetryEventNames { } +export class SystemServicePartitionId { + public static FailoverManagerId = '00000000-0000-0000-0000-000000000001'; +} + + export class RepairTaskMessages { public static longExecutingMessage = "This update can prevent other updates from going through. Please reach out to the Azure Compute teams (“Compute Manager/Blackbird”) to figure out why the updates are not completing."; public static longExecutingId = "longExecuting"; diff --git a/src/SfxWeb/src/app/services/data.service.ts b/src/SfxWeb/src/app/services/data.service.ts index 5804ae4f5..83cdbd139 100644 --- a/src/SfxWeb/src/app/services/data.service.ts +++ b/src/SfxWeb/src/app/services/data.service.ts @@ -423,10 +423,6 @@ export class DataService { return d; } - public getFailoverManagerPartition(): string { - return "00000000-0000-0000-0000-000000000001"; - } - public createCorrelatedEventList(eventInstanceId: string) { return new CorrelatedEventList(this, eventInstanceId); } diff --git a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.html b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.html index 6574cd933..0d4ea132e 100644 --- a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.html +++ b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.html @@ -40,7 +40,7 @@

Throttled Infrastructure Jobs

-
+
diff --git a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts index b2adcbc07..c84681c6a 100644 --- a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts +++ b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts @@ -5,6 +5,7 @@ import { HealthStateFilterFlags } from 'src/app/Models/HealthChunkRawDataTypes'; import { SystemApplication } from 'src/app/Models/DataModels/Application'; import { Observable, forkJoin, of } from 'rxjs'; import { IResponseMessageHandler } from 'src/app/Common/ResponseMessageHandlers'; +import { SystemServicePartitionId } from 'src/app/Common/Constants'; import { BaseControllerDirective } from 'src/app/ViewModels/BaseController'; import { NodeCollection } from 'src/app/Models/DataModels/collections/NodeCollection'; import { ListSettings } from 'src/app/Models/ListSettings'; @@ -43,7 +44,7 @@ export class EssentialsComponent extends BaseControllerDirective { replicasDashboard: IDashboardViewModel; upgradesDashboard: IDashboardViewModel; upgradeAppsCount = 0; - fmQuorumLossStatus : string; + fmQuorumLossStatus : boolean; fmQuorumLossWarning : string; essentialItems: IEssentialListItem[] = []; @@ -98,8 +99,10 @@ export class EssentialsComponent extends BaseControllerDirective { this.nodes.refresh(messageHandler).pipe(map(() => {this.updateItemInEssentials(); })), this.systemApp.refresh(messageHandler).pipe(catchError(err => of(null))), this.clusterUpgradeProgress.refresh(messageHandler), - this.RestClient.getPartitionById(this.data.getFailoverManagerPartition(), messageHandler).pipe(map((partition) => { - this.fmQuorumLossStatus = partition.PartitionStatus; + this.RestClient.getPartitionById(SystemServicePartitionId.FailoverManagerId, messageHandler).pipe(map((partition) => { + if (partition.PartitionStatus === 'InQuorumLoss') { + this.fmQuorumLossStatus = true; + } })), this.data.getClusterManifest().pipe(map((manifest) => { From 9ed86a9db1e9efcd59f3c04b0a3a33a19334b951 Mon Sep 17 00:00:00 2001 From: Yisu Ma Date: Mon, 9 Oct 2023 16:21:19 -0700 Subject: [PATCH 7/8] Changed system service partition ids constatnt to plural and fixed fmql status logic --- src/SfxWeb/src/app/Common/Constants.ts | 2 +- .../cluster/essentials/essentials.component.ts | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/SfxWeb/src/app/Common/Constants.ts b/src/SfxWeb/src/app/Common/Constants.ts index 74b1786cf..42f4e1245 100644 --- a/src/SfxWeb/src/app/Common/Constants.ts +++ b/src/SfxWeb/src/app/Common/Constants.ts @@ -224,7 +224,7 @@ export class TelemetryEventNames { } -export class SystemServicePartitionId { +export class SystemServicePartitionIds { public static FailoverManagerId = '00000000-0000-0000-0000-000000000001'; } diff --git a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts index c84681c6a..8126458a3 100644 --- a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts +++ b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts @@ -5,7 +5,7 @@ import { HealthStateFilterFlags } from 'src/app/Models/HealthChunkRawDataTypes'; import { SystemApplication } from 'src/app/Models/DataModels/Application'; import { Observable, forkJoin, of } from 'rxjs'; import { IResponseMessageHandler } from 'src/app/Common/ResponseMessageHandlers'; -import { SystemServicePartitionId } from 'src/app/Common/Constants'; +import { SystemServicePartitionIds } from 'src/app/Common/Constants'; import { BaseControllerDirective } from 'src/app/ViewModels/BaseController'; import { NodeCollection } from 'src/app/Models/DataModels/collections/NodeCollection'; import { ListSettings } from 'src/app/Models/ListSettings'; @@ -67,8 +67,9 @@ export class EssentialsComponent extends BaseControllerDirective { this.infraCollection = this.data.infrastructureCollection; this.infraSettings = this.settings.getNewOrExistingInfrastructureSettings(); - this.fmQuorumLossWarning = `The Failover Manager service is in quorum loss state. Cluster may not be responding. - Service failover, automatic recovery will be blocked.Health/availability state of services/nodes may not be reflected.` + this.fmQuorumLossWarning = `The Failover Manager service is in quorum loss state, which can cause disruptions in the cluster. Operations in PowerShell will likely to fail. + Cluster will not be loaded and availability state of Application/System/Nodes may not be reflected. For more guidance, please refer to this link: + https://eng.ms/docs/cloud-ai-platform/azure-core/one-fleet-platform/one-fleet-platform-timmall/service-fabric-service/service-fabric-service/tsgs-and-traces-by-component/failover/tsg/fm-deadlock` } refresh(messageHandler?: IResponseMessageHandler): Observable { @@ -99,10 +100,8 @@ export class EssentialsComponent extends BaseControllerDirective { this.nodes.refresh(messageHandler).pipe(map(() => {this.updateItemInEssentials(); })), this.systemApp.refresh(messageHandler).pipe(catchError(err => of(null))), this.clusterUpgradeProgress.refresh(messageHandler), - this.RestClient.getPartitionById(SystemServicePartitionId.FailoverManagerId, messageHandler).pipe(map((partition) => { - if (partition.PartitionStatus === 'InQuorumLoss') { - this.fmQuorumLossStatus = true; - } + this.RestClient.getPartitionById(SystemServicePartitionIds.FailoverManagerId, messageHandler).pipe(map((partition) => { + this.fmQuorumLossStatus = partition.PartitionStatus === 'InQuorumLoss'; })), this.data.getClusterManifest().pipe(map((manifest) => { From a45452518741afdf8d1f001baafbccaf947d1154 Mon Sep 17 00:00:00 2001 From: Yisu Ma Date: Mon, 9 Oct 2023 17:07:17 -0700 Subject: [PATCH 8/8] Changed display text in warning panel for guidance and clarity --- .../src/app/views/cluster/essentials/essentials.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts index 8126458a3..7b47a8b27 100644 --- a/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts +++ b/src/SfxWeb/src/app/views/cluster/essentials/essentials.component.ts @@ -68,8 +68,8 @@ export class EssentialsComponent extends BaseControllerDirective { this.infraCollection = this.data.infrastructureCollection; this.infraSettings = this.settings.getNewOrExistingInfrastructureSettings(); this.fmQuorumLossWarning = `The Failover Manager service is in quorum loss state, which can cause disruptions in the cluster. Operations in PowerShell will likely to fail. - Cluster will not be loaded and availability state of Application/System/Nodes may not be reflected. For more guidance, please refer to this link: - https://eng.ms/docs/cloud-ai-platform/azure-core/one-fleet-platform/one-fleet-platform-timmall/service-fabric-service/service-fabric-service/tsgs-and-traces-by-component/failover/tsg/fm-deadlock` + Cluster will not be loaded and the availability state of Application/System/Nodes may not be reflected in sfx. Failover Manager partition info + can still be queried by using Service Fabric client API. Please refer to this link: https://learn.microsoft.com/en-us/rest/api/servicefabric/sfclient-api-getpartitioninfo` } refresh(messageHandler?: IResponseMessageHandler): Observable {