File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -141,9 +141,12 @@ export class CoreMosDeviceHandler {
141
141
const messages : Array < string > = [ ]
142
142
143
143
if ( this . _hotStandby ) {
144
+ // OpenMedia treats secondary server as hot-standby
145
+ // And thus is not considered as a warning if it's not connected
144
146
if ( connectionStatus . PrimaryConnected ) {
145
147
statusCode = StatusCode . GOOD
146
148
} else {
149
+ // Primary not connected is only bad if there is no secondary:
147
150
if ( connectionStatus . SecondaryConnected ) {
148
151
statusCode = StatusCode . GOOD
149
152
messages . push ( connectionStatus . SecondaryStatus || 'Running NRCS on hot standby' )
@@ -154,15 +157,18 @@ export class CoreMosDeviceHandler {
154
157
}
155
158
} else {
156
159
if ( connectionStatus . PrimaryConnected ) {
160
+ // ENPS expect both Primary and Secondary to be connected if both of them are configured
157
161
if ( connectionStatus . SecondaryConnected || ! this . _mosDevice . idSecondary ) {
158
162
statusCode = StatusCode . GOOD
159
163
} else {
160
164
statusCode = StatusCode . WARNING_MINOR
161
165
}
162
166
} else {
163
167
if ( connectionStatus . SecondaryConnected ) {
168
+ // Primary not connected should give a warning if Secondary is used.
164
169
statusCode = StatusCode . WARNING_MAJOR
165
170
} else {
171
+ // If neither Primary nor Secondary is connected, it's a bad state.
166
172
statusCode = StatusCode . BAD
167
173
}
168
174
}
You can’t perform that action at this time.
0 commit comments