This file is indexed.

/usr/share/pcsd/views/manage.erb is in pcs 0.9.149-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
<table id="main">
  <tr id="cluster_title_row" {{bind-attr style=Pcs.manage_page}}><td id="page_header" colspan=3 style="vertical-align:middle;">
      <table id="manage_cluster_commands"><tr>
	  <td>
	    MANAGE CLUSTERS
	  </td>
	  </td>
	  <td>
	      <a href="#" class="x sprites"></a>
	    <div class="link">
	      <a id="manage_remove_cluster" href="#" onclick="verify_remove_clusters();">Remove</a>
	    </div>
	  </td>
	  <td>
	    <a href="#" class="plus sprites"></a>
	    <div class="link">
	      <a id="manage_add_cluster" href="#" onclick="add_existing_dialog();">
		Add Existing
	      </a>
	    </div>
	  </td>
	  <td>
	    <a href="#" class="plus sprites"></a>
	    <div class="link">
	      <a id="manage_create_cluster" href="#" onclick="create_cluster_dialog();">Create New</a>
	    </div>
	  </td>
	</tr>
      </table>
    </td>
  </tr>
  <tr id="cluster_header_row" {{bind-attr style="Pcs.manage_page"}}>
    <td class="borderbottom" colspan=3>
    </td>
  </tr>
  <tr id="cluster_list_row" {{bind-attr style="Pcs.manage_page"}}>
    <td id="cluster_list" class="node_list" style="width:350px;">
      <%= erb :_cluster_list %>
    </td>
    <td id="node_info" colspan=2>
      <div id="node_info_header">
	<div id="node_info_header_title">INFORMATION ABOUT CLUSTERS</div>
      </div>
      <div id="node_sub_info">
        {{#if Pcs.clusterController.cur_cluster}}
        <div {{bind-attr id=Pcs.clusterController.cur_cluster.div_id}}>
          <table>
            <tr>
              <td style="text-align:right">
                <b>Cluster:</b>&nbsp;
              </td>
              <td>
                {{#if Pcs.clusterController.cur_cluster.forbidden}}
                  {{Pcs.clusterController.cur_cluster.name}}
                {{else}}
                  <a {{bind-attr href=Pcs.clusterController.cur_cluster.url_link}}>{{Pcs.clusterController.cur_cluster.name}}</a> {{{Pcs.clusterController.cur_cluster.quorum_show}}}
                {{/if}}
              </td>
            </tr>
            {{#if Pcs.clusterController.cur_cluster.error_list}}
              <tr><td style="text-align:right"><b>Errors:</b>&nbsp;</td><td></td></tr>
            {{/if}}
            {{#each Pcs.clusterController.cur_cluster.error_list}}
              <tr><td></td><td style="color: red;">{{{message}}}</td></tr>
            {{/each}}
            {{#if Pcs.clusterController.cur_cluster.warning_list}}
              <tr><td style="text-align:right"><b>Warnings:</b>&nbsp;</td><td></td></tr>
            {{/if}}
            {{#each Pcs.clusterController.cur_cluster.warning_list}}
              <tr><td></td><td style="color: orange;">{{{message}}}</td></tr>
            {{/each}}
          </table><br>
          {{#unless Pcs.clusterController.cur_cluster.forbidden}}
          <table style="clear:left;float:left" class="nodes_list">
            <tr>
              <td class="datatable_header hover-pointer" onclick="show_hide_dashboard(this, 'nodes');">
                <span style="display: none;" class="downarrow sprites"></span>
                <span style="" class="rightarrow sprites"></span>
                Nodes ({{Pcs.clusterController.cur_cluster.nodes.length}} | {{#if Pcs.clusterController.cur_cluster.nodes_failed}}<span style="color: red">issues: {{Pcs.clusterController.cur_cluster.nodes_failed}}{{else}}<span style="color: green;">OK{{/if}}</span>)
              <span style="font-size: 10px;">(displaying {{#if Pcs.clusterController.show_all_nodes}}all{{else}}only issues{{/if}})</span>
              </td>
            </tr>
            <tr>
              <td>
                <table class="datatable">
                  <tr>
                    <th style="width: 150px;">NODE</th>
                    <th style="width: 100px;">STATUS</th>
                    <th style="width: 70px;">QUORUM</th>
                  </tr>
                  {{#each node in Pcs.clusterController.cur_cluster.nodes}}
                  <tr {{bind-attr title=node.tooltip}} {{bind-attr class=node.status_class}}>
                    <td><a {{bind-attr href=node.url_link}}>{{node.name}}</a></td>
                    <td {{bind-attr style=node.status_style}}>{{{node.status_icon}}}{{node.status}}</td>
                    <td>{{{node.quorum_show}}}</td>
                  </tr>
                  {{/each}}
                </table>
              </td>
            </tr>
          </table>
          {{#unless Pcs.clusterController.cur_cluster.status_unknown}}
          <table style="clear:left;float:left" class="resources_list">
            <tr>
              <td class="datatable_header hover-pointer" onclick="show_hide_dashboard(this, 'resources');">
                <span style="display: none;" class="downarrow sprites"></span>
                <span style="" class="rightarrow sprites"></span>
                Resources ({{Pcs.clusterController.cur_cluster.resource_list.length}} | {{#if Pcs.clusterController.cur_cluster.resources_failed}}<span style="color: red">issues: {{Pcs.clusterController.cur_cluster.resources_failed}}{{else}}<span style="color: green;">OK{{/if}}</span>)
              <span style="font-size: 10px;">(displaying {{#if Pcs.clusterController.show_all_resources}}all{{else}}only issues{{/if}})</span>
              </td>
            </tr>
            <tr>
              <td>
                <table class="datatable">
                  <tr>
                    <th style="width: 150px;">RESOURCE</th>
                    <th style="width: 100px;">STATUS</th>
                  </tr>
                  {{#each r in Pcs.clusterController.cur_cluster.resource_list}}
                  <tr {{bind-attr title=r.tooltip}} {{bind-attr class=r.status_class}}>
                    <td><a {{bind-attr href=r.url_link}}>{{r.id}}</a></td>
                    <td {{bind-attr style=r.status_style}}>{{{r.status_icon}}}{{r.status}}</td>
                  </tr>
                  {{else}}
                  <tr>
                    <td>No resources</td>
                    <td></td>
                  </tr>
                  {{/each}}
                </table>
              </td>
            </tr>
          </table>
          <table style="clear:left;float:left" class="fence_list">
            <tr>
              <td class="datatable_header hover-pointer" onclick="show_hide_dashboard(this, 'fence');">
                <span style="display: none;" class="downarrow sprites"></span>
                <span style="" class="rightarrow sprites"></span>
                Fence-devices ({{Pcs.clusterController.cur_cluster.fence_list.length}} | {{#if Pcs.clusterController.cur_cluster.fence_failed}}<span style="color: red">issues: {{Pcs.clusterController.cur_cluster.fence_failed}}{{else}}<span style="color: green;">OK{{/if}}</span>)
              <span style="font-size: 10px;">(displaying {{#if Pcs.clusterController.show_all_fence}}all{{else}}only issues{{/if}})</span>
              </td>
            </tr>
            <tr>
              <td>
                <table class="datatable">
                  <tr>
                    <th style="width: 150px;">FENCE-DEVICE</th>
                    <th style="width: 100px;">STATUS</th>
                  </tr>
                  {{#each f in Pcs.clusterController.cur_cluster.fence_list}}
                  <tr {{bind-attr title=f.tooltip}} {{bind-attr class=f.status_class_fence}}>
                    <td><a {{bind-attr href=f.url_link}}>{{f.id}}</a></td>
                    <td {{bind-attr style=f.status_style}}>{{{f.status_icon}}}{{f.status}}</td>
                  </tr>
                  {{else}}
                  <tr>
                    <td>No fence devices</td>
                    <td></td>
                  </tr>
                  {{/each}}
                </table>
              </td>
            </tr>
          </table>
          {{/unless}}
          {{/unless}}
        </div>
        {{else}}
        <div id="no_cluster_selected">Select a cluster to view more detailed cluster information</div>
        {{/if}}
      </div>
    </td>
  </tr>
</table>
<%= erb :_dialogs %>
<div id="add_existing_cluster" style="display: none;">
  <form id="add_existing_cluster_form" action="/manage/existingcluster" method="post">
    <br>
    Enter the hostname/IP of a node in a cluster that you would like to manage:
    <br>
    <br>
    <table class="err_msg_table" style="width: 100%">
      <tr><td align=center style="color: red" colspan=2"><span id="unable_to_connect_error_msg_ae" style="display:none;">Unable to contact node.<br>Please make sure pcsd is started.<br/></span>
	  <span id="add_existing_cluster_error_msg" style="display:none;">
	  </span>
      </td></tr>
    </table>
    <table>
      <tr><td align=right>Node Name/IP:</td><td><input size="50" name="node-name" type="text"></td></tr>
    </table>
  </form>
</div>
<div id="create_new_cluster" style="display: none;">
  <form id="create_new_cluster_form" action="/manage/newcluster" method="post">
    <br>
    Enter the hostnames of the nodes you would like to use to create a cluster:
    <br>
    <br>
    <table>
      <tr><td align=right>Cluster Name:</td><td><input size="50" name="clustername" type="text"></input></td></tr>
      <tr><td align=right>Node 1:</td><td><input size="50" name="node-1" type="text"></input></td></tr>
      <tr><td align=right>Node 2:</td><td><input size="50" name="node-2" type="text"></input></td></tr>
      <tr><td align=right>Node 3:</td><td><input size="50" name="node-3" type="text"></input></td></tr>
      <tr><td></td><td id="manage_more_nodes" onclick="create_cluster_add_nodes();" style="color: #2B85DB;">More nodes...</td></tr>
    </table>
    <table class="err_msg_table" style="width:100%">
      <tr><td align=center style="color: red" colspan=2"><span id="unable_to_connect_error_msg" style="display:none;">Unable to contact nodes highlighted in red.<br>Please make sure pcsd is started on all nodes.</span></td></tr>
      <tr><td align=center style="color: red" colspan=2"><span id="at_least_one_node_error_msg" style="display:none;">At least one valid node must be entered.</span></td></tr>
      <tr><td align=center style="color: red" colspan=2"><span id="bad_cluster_name_error_msg" style="display:none;">You may not leave the cluster name field blank</span></td></tr>
      <tr><td align=center style="color: red" colspan=2"><span id="addr0_addr1_mismatch_error_msg" style="display:none;">Ring 1 addresses do not match to Ring 0 addresses</span></td></tr>
      <tr><td align=center style="color: red" colspan=2"><span id="cman_udpu_transport_error_msg" style="display:none;">Cannot use UDPU transport on CMAN cluster. Please select UDP transport in Advanced options.</span></td></tr>
      <tr><td align=center style="color: red" colspan=2"><span id="rhel_version_mismatch_error_msg" style="display:none;">Cannot create a cluster using nodes running different versions of RHEL.</span></td></tr>
      <tr><td align=center style="color: red" colspan=2"><span id="cman_mismatch_error_msg" style="display:none;">Cannot mix nodes running CMAN and nodes without CMAN in one cluster.</span></td></tr>
    </table>
    <span onclick='$(".advanced_open").toggle();$("#advanced_cluster_create_options").toggle();'><span class="advanced_open rightarrow sprites"></span><span class="advanced_open downarrow sprites" style="display:none;"></span>Advanced Options:</span>
    <div id="advanced_cluster_create_options" style="display:none;">
      <table>
	<% transport_desc = "\
Enables either udpu (unicast) or udp (multicast) cluster communication (default: udpu)"%>
	<% wait_for_all_desc = "\
Enables Wait For All (WFA) feature (default: off).

The general behaviour of votequorum is to switch a cluster \
from inquorate to quorate as soon as possible. For example,\
in an 8 node cluster, where every node has 1 vote, \
expected_votes is set to 8 and quorum is (50% + 1) 5. As soon \
as 5 (or more) nodes are visible to each other, the partition \
of 5 (or more) becomes quorate and can start operating.

When WFA is enabled, the cluster will be quorate for the first time \
only after all nodes have been visible at least once at the same time. 

This feature has the advantage of avoiding some startup race \
conditions, with the cost that all nodes need to be up at the \
same time at least once before the cluster can operate. 

A common startup race condition based on the above example is that as \
soon as 5 nodes become quorate, with the other 3 still offline, the \
remaining 3 nodes will be fenced.

It is very useful when combined with Last Man Standing.

This option has no effect on CMAN cluster." %>
	<% auto_tie_desc = "\
Enables Auto Tie Breaker (ATB) feature (default: off).

The general behaviour of votequorum allows a simultaneous node failure \
up to 50% - 1 node, assuming each node has 1 vote.

When ATB is enabled, the cluster can suffer up to 50% of the nodes \
failing at the same time, in a deterministic fashion. The cluster \
partition, or the set of nodes that are still in contact with the \
node that has the lowest nodeid will remain quorate. The other nodes \
will be inquorate.

This option has no effect on CMAN cluster." %>
	<% last_man_desc = "\
Enables Last Man Standing (LMS) feature (default: off).

The general behaviour of votequorum is to set expected_votes and \
quorum at startup (unless modified by the user at runtime, see below) \
and use those values during the whole lifetime of the cluster.

Using for example an 8 node cluster where each node has 1 vote, \
expected_votes is set to 8 and quorum to 5. This condition allows a \
total failure of 3 nodes. If a 4th node fails, the cluster becomes \
inquorate and it will stop providing services.

Enabling LMS allows the cluster to dynamically recalculate \
expected_votes and quorum under specific circumstances. It is essential \
to enable WFA when using LMS in High Availability clusters.

Using the above 8 node cluster example, with LMS enabled the cluster \
can retain quorum and continue operating by losing, in a cascade \
fashion, up to 6 nodes with only 2 remaining active.

This option has no effect on CMAN cluster." %>
	<% last_man_window_desc = "\
Tunes Last Man Standing Window (default: 10000 ms)

The window of time between when a node (or group of nodes die) and quorum \
is recalculated if the 'Last Man Standing' option is enabled.

This option has no effect on CMAN cluster." %>
	<% use_ipv6_desc = "\
Enables IPv6 for cluster communication (default: off)

This option has no effect on CMAN cluster." %>
        <% token_timeout = "\
Sets time in milliseconds until a token loss is declared after not receiving \
a token (default: 1000 ms)" %>
        <% token_coefficient = "\
Sets time in milliseconds used for clusters with at least 3 nodes \
as a coefficient for real token timeout calculation \
(token + (number_of_nodes - 2) * token_coefficient) (default: 650 ms)

This option has no effect on CMAN cluster." %>
        <% join_timeout = "\
Sets time in milliseconds to wait for join messages (default: 50 ms)" %>
        <% consensus_timeout = "\
Sets time in milliseconds to wait for consensus to be achieved before starting \
a new round of membership configuration (default: 1200 ms)" %>
        <% miss_count_const = "\
Sets the maximum number of times on receipt of a token a message is checked \
for retransmission before a retransmission occurs (default: 5)" %>
        <% fail_recv_const = "\
Specifies how many rotations of the token without receiving any messages when \
messages should be received may occur before a new configuration is formed \
(default: 2500)" %>
        <% rrp_addr_0_1_desc = "\
Enables Redundant Ring Protocol (RRP) (default: off)

Specify ring 0 and ring 1 network address if you want to use RRP." %>
        <% rrp_broadcast_0_1_desc = "\
Enables broadcast communication in the ring (default: off)" %>
        <% rrp_mcast_0_1_desc = "\
Optionally specify ring multicast address \
(default: 239.255.1.1 for ring 0 and 239.255.2.1 for ring 1)" %>
        <% rrp_mcastport_0_1_desc = "\
Optionally specify ring multicast UDP port (default: 5405)

Please note the cluster uses two UDP ports, 'Multicast Port' for multicast \
receives and 'Multicast Port' - 1 for multicast sends." %>
        <% rrp_ttl_0_1_desc = "\
Optionally specify ring TTL (default: 1)

If you run your cluster on a routed network then the default of 1 will be too \
small. This option provides a way to increase this up to 255. The valid range \
is 0..255. Note that this is only valid on multicast transport types." %>
        <% rrp_addr1_desc = "\
Enables Redundant Ring Protocol (RRP) (default: off)

Specify ring 1 address for each node if you want to use RRP." %>
        <tr title="<%= h(transport_desc) %>">
          <td align=right>Transport:</td>
          <td>
            <select name="config-transport" onchange="create_cluster_display_rrp(this.value);">
                <option value="udpu" selected>UDPU (default)</option>
                <option value="udp">UDP</option>
            </select>
          </td>
        </tr>
	<tr title="<%= h(wait_for_all_desc) %>"><td align=right>Wait for All:</td><td><input type=checkbox name="config-wait_for_all"></td></tr>
	<tr title="<%= h(auto_tie_desc) %>"><td align=right>Auto Tie Breaker:</td><td><input type=checkbox name="config-auto_tie_breaker"></td></tr>
	<tr title="<%= h(last_man_desc) %>"><td align=right>Last Man Standing:</td><td><input type=checkbox name="config-last_man_standing"></td></tr>
	<tr title="<%= h(last_man_window_desc) %>"><td align=right>Last Man Standing Window:</td><td><input type=text size=5 name="config-last_man_standing_window"> ms</td></tr>
	<tr title="<%= h(use_ipv6_desc) %>"><td align=right>Use IPv6:</td><td><input type=checkbox name="config-ipv6"></td></tr>
        <tr title="<%= h(token_timeout) %>">
          <td align="right">Token Timeout:</td>
          <td><input type="text" size="5" name="config-token"> ms</td>
        </tr>
        <tr title="<%= h(token_coefficient) %>">
          <td align="right">Token Timeout Coefficient:</td>
          <td><input type="text" size="5" name="config-token_coefficient"> ms</td>
        </tr>
        <tr title="<%= h(join_timeout) %>">
          <td align="right">Join Timeout:</td>
          <td><input type="text" size="5" name="config-join"> ms</td>
        </tr>
        <tr title="<%= h(consensus_timeout) %>">
          <td align="right">Consensus Timeout:</td>
          <td><input type="text" size="5" name="config-consensus"> ms</td>
        </tr>
        <tr title="<%= h(miss_count_const) %>">
          <td align="right">Missed Messages Count:</td>
          <td><input type="text" size="5" name="config-miss_count_const"></td>
        </tr>
        <tr title="<%= h(fail_recv_const) %>">
          <td align="right">Failures Count:</td>
          <td><input type="text" size="5" name="config-fail_recv_const"></td>
        </tr>
      </table>
      <div id="rrp_udp_transport" style="display: none;">
        <br>
        Redundant Ring Protocol settings for UDP transport:
        <table>
          <tr>
              <td></td>
              <td align="center">Ring 0</td>
              <td align="center">Ring 1</td>
          </tr>
          <tr title="<%= h(rrp_addr_0_1_desc) %>">
              <td align="right">Address:</td>
              <td><input type="text" name="config-addr0"></td>
              <td><input type="text" name="config-addr1"></td>
          </tr>
          <tr title="<%= h(rrp_broadcast_0_1_desc) %>">
              <td align="right">Use Broadcast:</td>
              <td><input type="checkbox" name="config-broadcast0"></td>
              <td><input type="checkbox" name="config-broadcast1"></td>
          </tr>
          <tr title="<%= h(rrp_mcast_0_1_desc) %>" class="transport_udp_only">
              <td align="right">Multicast Address:</td>
              <td><input type="text" name="config-mcast0"></td>
              <td><input type="text" name="config-mcast1"></td>
          </tr>
          <tr title="<%= h(rrp_mcastport_0_1_desc) %>" class="transport_udp_only">
              <td align="right">Multicast Port:</td>
              <td><input type="text" name="config-mcastport0"></td>
              <td><input type="text" name="config-mcastport1"></td>
          </tr>
          <tr title="<%= h(rrp_ttl_0_1_desc) %>" class="transport_udp_only">
              <td align="right">TTL:</td>
              <td><input type="text" name="config-ttl0"></td>
              <td><input type="text" name="config-ttl1"></td>
          </tr>
        </table>
      </div>
      <div id="rrp_udpu_transport">
        <br>
        Redundant Ring Protocol settings for UDPU transport:
        <table title="<%= h(rrp_addr1_desc) %>">
          <tr>
            <td align=right>Node 1 (Ring 1):</td>
            <td><input size="50" name="ring1-node-1" type="text"></input></td>
          </tr>
          <tr>
            <td align=right>Node 2 (Ring 1):</td>
            <td><input size="50" name="ring1-node-2" type="text"></input></td>
          </tr>
          <tr>
            <td align=right>Node 3 (Ring 1):</td>
            <td><input size="50" name="ring1-node-3" type="text"></input></td>
          </tr>
        </table>
      </div>
    </div>
  </form>
</div>