-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbetter-mid-cluster-us.xml
593 lines (509 loc) · 25.6 KB
/
better-mid-cluster-us.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
<?xml version="1.0" encoding="UTF-8"?><unload unload_date="2021-01-15 14:13:40">
<sys_remote_update_set action="INSERT_OR_UPDATE">
<application display_value="Global">global</application>
<application_name>Global</application_name>
<application_scope>global</application_scope>
<application_version/>
<collisions/>
<commit_date/>
<deleted/>
<description/>
<inserted/>
<name>Better MID Cluster</name>
<origin_sys_id/>
<parent display_value=""/>
<release_date/>
<remote_base_update_set display_value=""/>
<remote_parent_id/>
<remote_sys_id>8d62b2982f79a8d0d8455aab2799b68f</remote_sys_id>
<state>loaded</state>
<summary/>
<sys_class_name>sys_remote_update_set</sys_class_name>
<sys_created_by>admin</sys_created_by>
<sys_created_on>2021-01-15 14:13:40</sys_created_on>
<sys_id>02516b942fbda8d0d8455aab2799b6d4</sys_id>
<sys_mod_count>0</sys_mod_count>
<sys_updated_by>admin</sys_updated_by>
<sys_updated_on>2021-01-15 14:13:40</sys_updated_on>
<update_set display_value=""/>
<update_source display_value=""/>
<updated/>
</sys_remote_update_set>
<sys_update_xml action="INSERT_OR_UPDATE">
<action>INSERT_OR_UPDATE</action>
<application display_value="Global">global</application>
<category>customer</category>
<comments/>
<name>sys_script_include_0c82be1c2f79a8d0d8455aab2799b6cf</name>
<payload><?xml version="1.0" encoding="UTF-8"?><record_update table="sys_script_include"><sys_script_include action="INSERT_OR_UPDATE"><access>package_private</access><active>true</active><api_name>global.MIDServerCluster</api_name><caller_access/><client_callable>false</client_callable><description>********************************&#13;
Better MidServerCluster&#13;
&#13;
This is a replacement for the OOB MidServerCluster Script Include (sys_script_include.do?sys_id=f6c69a020a0006bc36db905d8d02dfc2)&#13;
More information can be found here: https://github.com/bmoers/sn-better-mid-cluster-mgmt&#13;
&#13;
To enable debug log, set "better_mid_server.cluster.debug" to "true"&#13;
&#13;
********************************&#13;
</description><name>MIDServerCluster</name><script><![CDATA[/**
* This is a drop in replacement for the OOB MIDServerCluster script include.
* Make sure the OOB script include /sys_script_include.do?sys_id=f6c69a020a0006bc36db905d8d02dfc2 is active=false!
*
* Unfortunately the OOB LB/FO script is not very mature and assigns always the same FO agent in case of agent down.
*
* For more details see https://github.com/bmoers/sn-better-mid-cluster-mgmt/blob/master/README.md
* The source and test cases can be found here https://github.com/bmoers/sn-better-mid-cluster-mgmt
*
* @class
* @author Boris Moers [admin.moers]
* @requires global.module:sys_script_include.SNC#ECCAgentCache
* @memberof global.module:sys_script_include
*/
var MIDServerCluster = Class.create();
MIDServerCluster.prototype = /** @lends global.module:sys_script_include.MIDServerCluster.prototype */ {
UP_STATE: 'Up',
FAILOVER: 'Failover',
log: {
/**
* Debug logger
*
* @returns {undefined}
*/
debug: function () {
if (gs.getProperty('better_mid_server.cluster.debug', 'false') != 'true')
return;
var args = Array.prototype.slice.call(arguments);
if (args.length)
args[0] = '[Better MID Cluster] : ' + args[0];
gs.debug.apply(this, args);
},
/**
* Info logger
*
* @returns {undefined}
*/
info: function () {
var args = Array.prototype.slice.call(arguments);
if (args.length)
args[0] = '[Better MID Cluster] : ' + args[0];
gs.info.apply(this, args);
}
},
/**
* Constructor
*
* @param {GlideRecord} agentGr ecc_agent which requires to be LB/FO
* @param {String} requestedClusterType "Failover" or "Load Balance" - actually ignored
* @returns {undefined}
*/
initialize: function (agentGr, requestedClusterType) {
var self = this;
self.agentGr = agentGr;
// get all defined clusters and members on the platform
self.allClusters = self._getAllClusterMembers();
},
/**
* Indicate if a LB/FO agent is available
*
* @returns {boolean}
*/
clusterExists: function () {
var self = this;
if (!self.agentGr)
return false;
var agentSysId = self.agentGr.getValue('sys_id');
var currAgent = self.allClusters.agents[agentSysId];
// ensure its a boolean
return !!(currAgent && (currAgent.failover.length > 0 || currAgent.loadBalance.length > 0));
},
/**
* Return the name of the agent to be LB/FO to.
* This is only name of the ecc_agent ane must be prepended with "mid.server."
*
* @returns {string} the agent name to LB/FO to
*/
getClusterAgent: function () {
var self = this;
if (!self.agentGr)
return;
return self._findLoadBalancerForAgent(self.agentGr, self.allClusters);
},
/**
* Return the names of all up and running agents.
*
* @returns {Array} agent names
*/
getClusterAgents: function () {
var self = this;
if (!self.agentGr)
return [];
return Object.keys(self.allClusters.agents).filter(function (sysId) {
return self.allClusters.agents[sysId].up;
}).map(function (sysId) {
return self.allClusters.agents[sysId].name;
});
},
/**
* Get the clusterMember construct.
*
* @protected
* @returns {Object} of following structure : {
agents: {
SYS_ID: {
failover: [],
loadBalance: [],
up: true,
name : name
}
},
failover: {
SYS_ID : {
agentsUp: []
}
},
loadBalance: {
SYS_ID: {
agentsUp : []
agentsDown : []
}
}
};
*/
_getAllClusterMembers: function () {
var self = this;
// get all clusters
var gr = new GlideRecord('ecc_agent_cluster_member_m2m');
gr.query();
var allClusters = {
agents: {},
failover: {},
loadBalance: {}
};
// build up 'allClusters' object
while (gr.next()) {
var clusterSysId = gr.cluster.toString();
var clusterType = gr.cluster.type.toString(); // 'Load Balance' / 'Failover'
var type = (clusterType == self.FAILOVER) ? 'failover' : 'loadBalance';
var isFailover = (clusterType == self.FAILOVER);
var agentSysId = gr.agent.toString();
var agentName = gr.agent.name.toString();
var agentStatus = gr.agent.status.toString(); // 'Up' / 'Down' / 'Upgrade Failed'
var isUp = (agentStatus == self.UP_STATE);
// all agents
if (!allClusters.agents[agentSysId])
allClusters.agents[agentSysId] = { failover: [], loadBalance: [], up: isUp, name: agentName };
allClusters.agents[agentSysId][type].push(clusterSysId);
// for the clusters we need all agents, regardless if up or down
if (!allClusters[type][clusterSysId]) {
allClusters[type][clusterSysId] = { agentsUp: [] };
if (!isFailover) {
// only load balancer have agentsDown
allClusters[type][clusterSysId].agentsDown = [];
}
}
/*
add all LoadBalance clusters agents
add all running failover clusters agents
*/
if (!isFailover) {
if (isUp) {
allClusters[type][clusterSysId].agentsUp.push(agentSysId);
} else {
allClusters[type][clusterSysId].agentsDown.push(agentSysId);
}
} else if (isFailover && isUp) {
// only keep the running failover agents
allClusters[type][clusterSysId].agentsUp.push(agentSysId);
}
}
self.log.debug('_getAllClusterMembers : ' + JSON.stringify(allClusters));
return allClusters;
},
/**
* Find a load balancer and if required failover agents
*
* @protected
* @param {GlideRecord} agentGr
* @param {Object} allClusters
* @returns {String} name of the agent to LB/FO to
*/
_findLoadBalancerForAgent: function (agentGr, allClusters) {
var self = this;
if (!agentGr)
return;
var agentSysId = agentGr.getValue('sys_id');
var agentFallbackName = agentGr.getValue('name');
/**
* Helper function to make fields in an array unique.
*
* @param {*} value
* @param {*} index
* @param {*} arr
* @returns {BinaryExpression}
*/
var onlyUnique = function (value, index, arr) {
return arr.indexOf(value) === index;
};
/**
* Find all capabilities for the passed agents in ONE sql query.
*
* @param {Array} agentSysIds
* @returns {Object} object with capabilities per key
*/
var _getAgentCapabilities = function (agentSysIds) {
if (!agentSysIds)
return null;
var agentCaps = {};
var agentSysIdArr = Array.isArray(agentSysIds) ? agentSysIds : [agentSysIds];
var gr = new GlideRecord("ecc_agent_capability_m2m");
gr.addQuery("agent", 'IN', agentSysIdArr.join(','));
gr.query();
self.log.debug("_getAgentCapabilities : ecc_agent_capability_m2m.do " + gr.getEncodedQuery());
while (gr.next()) {
var sysId = gr.getValue('agent');
if (!agentCaps[sysId])
agentCaps[sysId] = [];
if (JSUtil.nil(gr.capability.value)) {
agentCaps[sysId].push(gr.capability.capability.toString());
} else {
agentCaps[sysId].push(gr.capability.capability.toString() + ':' + gr.capability.value.toString());
}
}
return agentCaps;
};
/**
* Check if Array2 is in Array1
*
* @param {*} array1
* @param {*} array2
* @returns {Boolean}
*/
var _isSubset = function (array1, array2) {
var resArray = new ArrayUtil().intersect(array1, array2);
if (resArray.length == array1.length)
return true;
return false;
};
/**
* Find all cluster agents which have the same or more capabilities
* In contrast to the OOB ServiceNow function, this also treats 'ALL' as
* capable to take over all other capabilities.
*
* @param {String} ofAgentSysId
* @param {Array} failoverAgents
* @returns {Array} list holding the sys_id of the capable agents
*/
var _filterOnCapabilities = function (ofAgentSysId, failoverAgents) {
var agentCaps = _getAgentCapabilities(ofAgentSysId)[ofAgentSysId];
var newClusterAgents = [];
if (!agentCaps)
return newClusterAgents;
var foCapabilities = _getAgentCapabilities(failoverAgents);
if (!foCapabilities)
return newClusterAgents;
Object.keys(foCapabilities).forEach(function (foAgentSysId) {
var candidateCaps = foCapabilities[foAgentSysId];
self.log.debug("_filterOnCapabilities : Agent caps " + JSON.stringify(agentCaps) + " - candidateCaps :" + JSON.stringify(candidateCaps));
// if the candidate can do 'ALL' it is always capable to take over
// OR the candidate capabilities are more or equal the current
if (candidateCaps.indexOf('ALL') !== -1 || _isSubset(agentCaps, candidateCaps)) {
newClusterAgents.push(foAgentSysId);
}
});
return newClusterAgents;
};
/**
* Randomly picks one agent from the passed list of agents
*
* @param {Array} sameCapFoAgents
* @returns {String} random agent name
*/
var getRandomMidServer = function (sameCapFoAgents) {
self.log.debug("getRandomMidServer : up and running agents with same capabilities " + JSON.stringify(sameCapFoAgents));
var lbAgentsNum = sameCapFoAgents.length;
if (lbAgentsNum) {
var lbRandomPos = Math.floor(Math.random() * lbAgentsNum);
var lbRandomSysId = sameCapFoAgents[lbRandomPos];
var agentCache = new SNC.ECCAgentCache();
var gr = agentCache.getBySysId(lbRandomSysId);
if (gr) {
return gr.getValue('name');
}
}
return null;
};
/**
* Finds one failover agent with the same capabilities
*
* @param {Object} agent
* @returns {String} agent name
*/
var getSameCapAgentFromFailover = function (agent) {
var upFailoverAgents = [];
agent.failover.forEach(function (foSysId) {
// find all the down load balancers nodes and replace it with one failover node
var fo = allClusters.failover[foSysId];
if (!fo)
return;
upFailoverAgents = upFailoverAgents.concat(fo.agentsUp);
});
var sameCapFoAgents = _filterOnCapabilities(agentSysId, upFailoverAgents);
return getRandomMidServer(sameCapFoAgents);
};
/**
* Finds one load balanced agent with the same capabilities
*
* @param {Object} agent
* @returns {String} agent name
*/
var getSameCapAgentFromLoadBalance = function (agent) {
// list of agents to share the load
var upLoadBalanceAgents = [];
var downLoadBalanceAgents = [];
var upFailoverAgents = [];
// these are all load balancers to the current mid server
agent.loadBalance.forEach(function (lbSysId) {
// find all the down load balancers nodes and replace it with one failover node
var loadBalancer = allClusters.loadBalance[lbSysId];
if (!loadBalancer)
return;
upLoadBalanceAgents = upLoadBalanceAgents.concat(loadBalancer.agentsUp);
downLoadBalanceAgents = downLoadBalanceAgents.concat(loadBalancer.agentsDown);
});
// remove duplicates
upLoadBalanceAgents = upLoadBalanceAgents.filter(onlyUnique);
downLoadBalanceAgents = downLoadBalanceAgents.filter(onlyUnique);
self.log.debug("getSameCapAgentFromLoadBalance : current agent load balancers " + JSON.stringify(agent.loadBalance));
self.log.debug("getSameCapAgentFromLoadBalance : current agent running load balancer partners " + JSON.stringify(upLoadBalanceAgents));
self.log.debug("getSameCapAgentFromLoadBalance : current agent stopped load balancer partners " + JSON.stringify(downLoadBalanceAgents));
downLoadBalanceAgents.forEach(function (downAgentSysId) {
var downAgent = allClusters.agents[downAgentSysId];
// check if there is a failover in place for this agent
if (!downAgent || downAgent.failover.length == 0)
return;
downAgent.failover.forEach(function (failoverSysId) {
var failoverCluster = allClusters.failover[failoverSysId];
// check if the failover cluster has active agents
if (!failoverCluster || failoverCluster.agentsUp.length == 0)
return;
upFailoverAgents = upFailoverAgents.concat(failoverCluster.agentsUp);
});
});
// remove duplicates
upFailoverAgents = upFailoverAgents.filter(onlyUnique);
self.log.debug("getSameCapAgentFromLoadBalance : up running failover agents " + JSON.stringify(upFailoverAgents) + " to take over from stopped " + JSON.stringify(downLoadBalanceAgents));
self.log.debug("getSameCapAgentFromLoadBalance : num down agents " + downLoadBalanceAgents.length);
self.log.debug("getSameCapAgentFromLoadBalance : num failover agents " + upFailoverAgents.length);
// if there are less or equal number of failover agents in place, take them all
if (upFailoverAgents.length <= downLoadBalanceAgents.length) {
// we need all of them
upLoadBalanceAgents = upLoadBalanceAgents.concat(upFailoverAgents);
} else {
// there are more failover agents available then we need to have, random pick some
downLoadBalanceAgents.forEach(function () {
var randomPos = Math.floor(Math.random() * upFailoverAgents.length);
// select a random failover from the remaining list
// splice makes the 'currentDownAgentsUpFailoverAgents' shorter by 1 every time it runs
upLoadBalanceAgents.push(upFailoverAgents.splice(randomPos, 1)[0]);
});
}
self.log.debug("getSameCapAgentFromLoadBalance : up and running agents " + JSON.stringify(upLoadBalanceAgents));
var sameCapFoAgents = _filterOnCapabilities(agentSysId, upLoadBalanceAgents);
return getRandomMidServer(sameCapFoAgents);
};
// get the current agent object from that cluster
var currAgent = allClusters.agents[agentSysId];
// check if the agent has at least one failover or loadBalance agent
if (!currAgent || (currAgent.failover.length == 0 && currAgent.loadBalance.length == 0)) {
// mid server has no failover or load balance configuration
self.log.debug("no lb/fo agents found for agent (sys_id) " + agentSysId);
return agentFallbackName;
}
// there are no LB but Failover agents
if (currAgent.loadBalance.length == 0 && currAgent.failover.length != 0) {
// get one random failover with same capability
var foAgent = getSameCapAgentFromFailover(currAgent);
return foAgent || agentFallbackName;
}
var lbAgent = getSameCapAgentFromLoadBalance(currAgent);
return lbAgent || agentFallbackName;
},
type: 'MIDServerCluster'
};
]]></script><sys_class_name>sys_script_include</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2021-01-15 10:49:00</sys_created_on><sys_id>0c82be1c2f79a8d0d8455aab2799b6cf</sys_id><sys_mod_count>10</sys_mod_count><sys_name>MIDServerCluster</sys_name><sys_package display_value="Global" source="global">global</sys_package><sys_policy/><sys_scope display_value="Global">global</sys_scope><sys_update_name>sys_script_include_0c82be1c2f79a8d0d8455aab2799b6cf</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2021-01-15 13:37:32</sys_updated_on></sys_script_include></record_update></payload>
<payload_hash>-635260528</payload_hash>
<remote_update_set display_value="Better MID Cluster">02516b942fbda8d0d8455aab2799b6d4</remote_update_set>
<replace_on_upgrade>false</replace_on_upgrade>
<sys_created_by>admin</sys_created_by>
<sys_created_on>2021-01-15 14:13:40</sys_created_on>
<sys_id>0a516b942fbda8d0d8455aab2799b6d4</sys_id>
<sys_mod_count>0</sys_mod_count>
<sys_recorded_at>1770643f2de0000001</sys_recorded_at>
<sys_updated_by>admin</sys_updated_by>
<sys_updated_on>2021-01-15 14:13:40</sys_updated_on>
<table/>
<target_name>MIDServerCluster</target_name>
<type>Script Include</type>
<update_domain>global</update_domain>
<update_guid>78191f9c997da8d0956700f6d01a854b</update_guid>
<update_guid_history>78191f9c997da8d0956700f6d01a854b:-635260528,2668d79c267da8d03ee3f637315025b5:790067972,9d079fd80e7da8d0dff7eac6200d8288:34492973,d7d69fd8687da8d0d33f067bb054c582:922309744,abc61b188f7da8d0658321a55349f4cf:1855119891,fdb65798707da8d0e43b1d5950fb4e3c:1932740816,09a61bd8817da8d0d3b5eabc717f1280:-885652508,c051cb9842f9a8d06341e65d8f2d8393:-137660844,2777b658d4b9a8d07359ee8ad20fdfba:1818726115,4c033a5034b9a8d09764ab7dd4b52aa4:-149983161,4882be1c2579a8d02acd4791d86376d2:2030608251</update_guid_history>
<update_set display_value=""/>
<view/>
</sys_update_xml>
<sys_update_xml action="INSERT_OR_UPDATE">
<action>INSERT_OR_UPDATE</action>
<application display_value="Global">global</application>
<category>customer</category>
<comments/>
<name>sys_properties_e57372902fb9a8d0d8455aab2799b6af</name>
<payload><![CDATA[<?xml version="1.0" encoding="UTF-8"?><record_update table="sys_properties"><sys_properties action="INSERT_OR_UPDATE"><choices/><description>Enabe Debugging for "MidServerCluster Script Include" sys_script_include.do?sys_id=0c82be1c2f79a8d0d8455aab2799b6cf</description><ignore_cache>false</ignore_cache><is_private>false</is_private><name>better_mid_server.cluster.debug</name><read_roles/><suffix/><sys_class_name>sys_properties</sys_class_name><sys_created_by>admin</sys_created_by><sys_created_on>2021-01-15 10:53:52</sys_created_on><sys_id>e57372902fb9a8d0d8455aab2799b6af</sys_id><sys_mod_count>1</sys_mod_count><sys_name>better_mid_server.cluster.debug</sys_name><sys_package display_value="Global" source="global">global</sys_package><sys_policy/><sys_scope display_value="Global">global</sys_scope><sys_update_name>sys_properties_e57372902fb9a8d0d8455aab2799b6af</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2021-01-15 13:35:30</sys_updated_on><type>boolean</type><value>false</value><write_roles/></sys_properties><sys_translated_text action="delete_multiple" query="documentkey=e57372902fb9a8d0d8455aab2799b6af"/></record_update>]]></payload>
<payload_hash>-1586401851</payload_hash>
<remote_update_set display_value="Better MID Cluster">02516b942fbda8d0d8455aab2799b6d4</remote_update_set>
<replace_on_upgrade>false</replace_on_upgrade>
<sys_created_by>admin</sys_created_by>
<sys_created_on>2021-01-15 14:13:40</sys_created_on>
<sys_id>46516b942fbda8d0d8455aab2799b6d4</sys_id>
<sys_mod_count>0</sys_mod_count>
<sys_recorded_at>17706421c290000001</sys_recorded_at>
<sys_updated_by>admin</sys_updated_by>
<sys_updated_on>2021-01-15 14:13:40</sys_updated_on>
<table/>
<target_name>better_mid_server.cluster.debug</target_name>
<type>System Property</type>
<update_domain>global</update_domain>
<update_guid>9398d79cc07da8d0be233423aa8078bd</update_guid>
<update_guid_history>9398d79cc07da8d0be233423aa8078bd:-1586401851,2793f290b3b9a8d0cea54af23aea0d6e:1694530698</update_guid_history>
<update_set display_value=""/>
<view/>
</sys_update_xml>
<sys_update_xml action="INSERT_OR_UPDATE">
<action>INSERT_OR_UPDATE</action>
<application display_value="Global">global</application>
<category>customer</category>
<comments/>
<name>sys_script_include_f6c69a020a0006bc36db905d8d02dfc2</name>
<payload><![CDATA[<?xml version="1.0" encoding="UTF-8"?><record_update table="sys_script_include"><sys_script_include action="INSERT_OR_UPDATE"><access>package_private</access><active>false</active><api_name>global.MIDServerCluster</api_name><caller_access/><client_callable>false</client_callable><description>********************************
This is the OOB version of MIDServerCluster and replaced by "Better MidServerCluster" sys_script_include.do?sys_id=0c82be1c2f79a8d0d8455aab2799b6cf
********************************
Takes care of finding the MID server cluster(s) for a given MID server and re-assigning the jobs if it's necessary.</description><name>MIDServerCluster</name><sys_class_name>sys_script_include</sys_class_name><sys_created_by>aleck.lin</sys_created_by><sys_created_on>2010-12-18 00:00:09</sys_created_on><sys_id>f6c69a020a0006bc36db905d8d02dfc2</sys_id><sys_mod_count>113</sys_mod_count><sys_name>MIDServerCluster</sys_name><sys_package display_value="MID Server" source="com.glideapp.agent">6ccceb238082230065177a4cb39b4379</sys_package><sys_policy/><sys_scope display_value="Global">global</sys_scope><sys_update_name>sys_script_include_f6c69a020a0006bc36db905d8d02dfc2</sys_update_name><sys_updated_by>admin</sys_updated_by><sys_updated_on>2021-01-15 11:54:00</sys_updated_on></sys_script_include></record_update>]]></payload>
<payload_hash>1413062025</payload_hash>
<remote_update_set display_value="Better MID Cluster">02516b942fbda8d0d8455aab2799b6d4</remote_update_set>
<replace_on_upgrade>false</replace_on_upgrade>
<sys_created_by>admin</sys_created_by>
<sys_created_on>2021-01-15 14:13:40</sys_created_on>
<sys_id>ca516b942fbda8d0d8455aab2799b6d4</sys_id>
<sys_mod_count>0</sys_mod_count>
<sys_recorded_at>17705e52b6b0000001</sys_recorded_at>
<sys_updated_by>admin</sys_updated_by>
<sys_updated_on>2021-01-15 14:13:40</sys_updated_on>
<table/>
<target_name>MIDServerCluster</target_name>
<type>Script Include</type>
<update_domain>global</update_domain>
<update_guid>d461cb9854f9a8d0a149a0d08e5df760</update_guid>
<update_guid_history>d461cb9854f9a8d0a149a0d08e5df760:1413062025,8172ba1c6a79a8d0c75431d25d1f3642:-1529673452,4572ba1c6a79a8d0187665fa09f2373f:769621187</update_guid_history>
<update_set display_value=""/>
<view/>
</sys_update_xml>
</unload>