|
|
71541a |
From 85ea8bf4630bd3760ab935c24c7b78cdd255f55b Mon Sep 17 00:00:00 2001
|
|
|
71541a |
From: Ondrej Mular <omular@redhat.com>
|
|
|
71541a |
Date: Wed, 26 Aug 2015 10:55:57 +0200
|
|
|
71541a |
Subject: [PATCH] fix tree view of resources in web UI
|
|
|
71541a |
|
|
|
71541a |
---
|
|
|
71541a |
pcsd/cluster_entity.rb | 15 +-
|
|
|
71541a |
pcsd/pcs.rb | 30 ++-
|
|
|
71541a |
pcsd/public/js/nodes-ember.js | 34 +++-
|
|
|
71541a |
pcsd/remote.rb | 12 +-
|
|
|
71541a |
pcsd/views/nodes.erb | 457 +++++++++++++++++++++---------------------
|
|
|
71541a |
5 files changed, 284 insertions(+), 264 deletions(-)
|
|
|
71541a |
|
|
|
71541a |
diff --git a/pcsd/cluster_entity.rb b/pcsd/cluster_entity.rb
|
|
|
71541a |
index 182969f..b291937 100644
|
|
|
71541a |
--- a/pcsd/cluster_entity.rb
|
|
|
71541a |
+++ b/pcsd/cluster_entity.rb
|
|
|
71541a |
@@ -895,7 +895,7 @@ module ClusterEntity
|
|
|
71541a |
class Node < JSONable
|
|
|
71541a |
attr_accessor :id, :error_list, :warning_list, :status, :quorum, :uptime,
|
|
|
71541a |
:name, :corosync, :pacemaker, :cman, :corosync_enabled,
|
|
|
71541a |
- :pacemaker_enabled, :pcsd_enabled, :attr, :fence_levels
|
|
|
71541a |
+ :pacemaker_enabled, :pcsd_enabled
|
|
|
71541a |
|
|
|
71541a |
def initialize
|
|
|
71541a |
@id = nil
|
|
|
71541a |
@@ -911,8 +911,6 @@ module ClusterEntity
|
|
|
71541a |
@corosync_enabled = false
|
|
|
71541a |
@pacemaker_enabled = false
|
|
|
71541a |
@pcsd_enabled = false
|
|
|
71541a |
- @attr = ClusterEntity::NvSet.new
|
|
|
71541a |
- @fence_levels = {}
|
|
|
71541a |
end
|
|
|
71541a |
|
|
|
71541a |
def self.load_current_node(session, crm_dom=nil)
|
|
|
71541a |
@@ -923,7 +921,6 @@ module ClusterEntity
|
|
|
71541a |
node.pacemaker_enabled = pacemaker_enabled?
|
|
|
71541a |
node.cman = cman_running?
|
|
|
71541a |
node.pcsd_enabled = pcsd_enabled?
|
|
|
71541a |
- node.fence_levels = get_fence_levels(session)
|
|
|
71541a |
|
|
|
71541a |
node_online = (node.corosync and node.pacemaker)
|
|
|
71541a |
node.status = node_online ? 'online' : 'offline'
|
|
|
71541a |
@@ -939,16 +936,6 @@ module ClusterEntity
|
|
|
71541a |
node.status = 'online'
|
|
|
71541a |
end
|
|
|
71541a |
node.quorum = !!crm_dom.elements['//current_dc[@with_quorum="true"]']
|
|
|
71541a |
-
|
|
|
71541a |
- node_name = get_current_node_name()
|
|
|
71541a |
- all_nodes_attr = get_node_attributes(session)
|
|
|
71541a |
- if all_nodes_attr[node_name]
|
|
|
71541a |
- all_nodes_attr[node_name].each { |pair|
|
|
|
71541a |
- node.attr << ClusterEntity::NvPair.new(
|
|
|
71541a |
- nil, pair[:key], pair[:value]
|
|
|
71541a |
- )
|
|
|
71541a |
- }
|
|
|
71541a |
- end
|
|
|
71541a |
else
|
|
|
71541a |
node.status = 'offline'
|
|
|
71541a |
end
|
|
|
71541a |
diff --git a/pcsd/pcs.rb b/pcsd/pcs.rb
|
|
|
71541a |
index 37f6b83..1fe9b99 100644
|
|
|
71541a |
--- a/pcsd/pcs.rb
|
|
|
71541a |
+++ b/pcsd/pcs.rb
|
|
|
71541a |
@@ -1624,8 +1624,11 @@ def get_node_status(session, cib_dom)
|
|
|
71541a |
:need_ring1_address => need_ring1_address?,
|
|
|
71541a |
:is_cman_with_udpu_transport => is_cman_with_udpu_transport?,
|
|
|
71541a |
:acls => get_acls(session),
|
|
|
71541a |
- :username => session[:username]
|
|
|
71541a |
+ :username => session[:username],
|
|
|
71541a |
+ :fence_levels => get_fence_levels(session),
|
|
|
71541a |
+ :node_attr => node_attrs_to_v2(get_node_attributes(session))
|
|
|
71541a |
}
|
|
|
71541a |
+
|
|
|
71541a |
nodes = get_nodes_status()
|
|
|
71541a |
|
|
|
71541a |
known_nodes = []
|
|
|
71541a |
@@ -1742,14 +1745,31 @@ def get_cib_dom(session)
|
|
|
71541a |
return nil
|
|
|
71541a |
end
|
|
|
71541a |
|
|
|
71541a |
+def node_attrs_to_v2(node_attrs)
|
|
|
71541a |
+ all_nodes_attr = {}
|
|
|
71541a |
+ node_attrs.each { |node, attrs|
|
|
|
71541a |
+ all_nodes_attr[node] = []
|
|
|
71541a |
+ attrs.each { |attr|
|
|
|
71541a |
+ all_nodes_attr[node] << {
|
|
|
71541a |
+ :id => nil,
|
|
|
71541a |
+ :name => attr[:key],
|
|
|
71541a |
+ :value => attr[:value]
|
|
|
71541a |
+ }
|
|
|
71541a |
+ }
|
|
|
71541a |
+ }
|
|
|
71541a |
+ return all_nodes_attr
|
|
|
71541a |
+end
|
|
|
71541a |
+
|
|
|
71541a |
def status_v1_to_v2(status)
|
|
|
71541a |
new_status = status.select { |k,_|
|
|
|
71541a |
[:cluster_name, :username, :is_cman_with_udpu_transport,
|
|
|
71541a |
:need_ring1_address, :cluster_settings, :constraints, :groups,
|
|
|
71541a |
:corosync_online, :corosync_offline, :pacemaker_online, :pacemaker_standby,
|
|
|
71541a |
- :pacemaker_offline, :acls
|
|
|
71541a |
+ :pacemaker_offline, :acls, :fence_levels
|
|
|
71541a |
].include?(k)
|
|
|
71541a |
}
|
|
|
71541a |
+ new_status[:node_attr] = node_attrs_to_v2(status[:node_attr])
|
|
|
71541a |
+
|
|
|
71541a |
resources = ClusterEntity::make_resources_tree(
|
|
|
71541a |
ClusterEntity::get_primitives_from_status_v1(status[:resources])
|
|
|
71541a |
)
|
|
|
71541a |
@@ -1764,15 +1784,9 @@ def status_v1_to_v2(status)
|
|
|
71541a |
].include?(k)
|
|
|
71541a |
}
|
|
|
71541a |
|
|
|
71541a |
- node_attr = ClusterEntity::NvSet.new
|
|
|
71541a |
- status[:node_attr].each { |k,v|
|
|
|
71541a |
- node_attr << ClusterEntity::NvPair.new(nil, k, v)
|
|
|
71541a |
- }
|
|
|
71541a |
new_status[:node].update(
|
|
|
71541a |
{
|
|
|
71541a |
:id => status[:node_id],
|
|
|
71541a |
- :attr => node_attr.to_status,
|
|
|
71541a |
- :fence_levels => status[:fence_levels],
|
|
|
71541a |
:quorum => nil,
|
|
|
71541a |
:warning_list => [],
|
|
|
71541a |
:error_list => [],
|
|
|
71541a |
diff --git a/pcsd/public/js/nodes-ember.js b/pcsd/public/js/nodes-ember.js
|
|
|
71541a |
index 46e34fa..1f60adc 100644
|
|
|
71541a |
--- a/pcsd/public/js/nodes-ember.js
|
|
|
71541a |
+++ b/pcsd/public/js/nodes-ember.js
|
|
|
71541a |
@@ -170,7 +170,7 @@ Pcs = Ember.Application.createWithMixins({
|
|
|
71541a |
tree_view_onclick(self.get('cur_resource').get('id'), true);
|
|
|
71541a |
if (!fence_change && self.get('cur_fence'))
|
|
|
71541a |
tree_view_select(self.get('cur_fence').get('id'));
|
|
|
71541a |
- if (!resource_change && self.get('cur_fence'))
|
|
|
71541a |
+ if (!resource_change && self.get('cur_resource'))
|
|
|
71541a |
tree_view_select(self.get('cur_resource').get('id'));
|
|
|
71541a |
Pcs.selectedNodeController.reset();
|
|
|
71541a |
setup_node_links();
|
|
|
71541a |
@@ -932,6 +932,9 @@ Pcs.Setting = Ember.Object.extend({
|
|
|
71541a |
Pcs.Clusternode = Ember.Object.extend({
|
|
|
71541a |
name: null,
|
|
|
71541a |
status: null,
|
|
|
71541a |
+ status_unknown: function() {
|
|
|
71541a |
+ return this.get('status') == "unknown";
|
|
|
71541a |
+ }.property("status"),
|
|
|
71541a |
status_val: function() {
|
|
|
71541a |
if (this.warnings && this.warnings.length)
|
|
|
71541a |
return get_status_value("warning");
|
|
|
71541a |
@@ -1013,6 +1016,10 @@ Pcs.Clusternode = Ember.Object.extend({
|
|
|
71541a |
return "color:red";
|
|
|
71541a |
}
|
|
|
71541a |
}.property("up","pacemaker_standby"),
|
|
|
71541a |
+ pacemaker_standby: null,
|
|
|
71541a |
+ corosync_enabled: null,
|
|
|
71541a |
+ pacemaker_enabled: null,
|
|
|
71541a |
+ pcsd_enabled: null,
|
|
|
71541a |
standby_style: function () {
|
|
|
71541a |
if (this.pacemaker_standby)
|
|
|
71541a |
return "display: none;";
|
|
|
71541a |
@@ -1043,7 +1050,12 @@ Pcs.Clusternode = Ember.Object.extend({
|
|
|
71541a |
else
|
|
|
71541a |
return "Disabled";
|
|
|
71541a |
}.property("pcsd_enabled"),
|
|
|
71541a |
- location_constraints: null
|
|
|
71541a |
+ location_constraints: null,
|
|
|
71541a |
+ node_attrs: [],
|
|
|
71541a |
+ fence_levels: [],
|
|
|
71541a |
+ pcsd: null,
|
|
|
71541a |
+ corosync_daemon: null,
|
|
|
71541a |
+ pacemaker_daemon: null,
|
|
|
71541a |
});
|
|
|
71541a |
|
|
|
71541a |
Pcs.Aclrole = Ember.Object.extend({
|
|
|
71541a |
@@ -1509,8 +1521,8 @@ Pcs.nodesController = Ember.ArrayController.createWithMixins({
|
|
|
71541a |
cur_node: null,
|
|
|
71541a |
cur_node_attr: function () {
|
|
|
71541a |
var nc = this;
|
|
|
71541a |
- if (nc.cur_node && "node_attrs" in nc.cur_node) {
|
|
|
71541a |
- return nc.cur_node.node_attrs;
|
|
|
71541a |
+ if (nc.get('cur_node')) {
|
|
|
71541a |
+ return nc.get('cur_node').get('node_attrs');
|
|
|
71541a |
}
|
|
|
71541a |
return [];
|
|
|
71541a |
}.property("cur_node", "content.@each.node_attrs"),
|
|
|
71541a |
@@ -1599,7 +1611,7 @@ Pcs.nodesController = Ember.ArrayController.createWithMixins({
|
|
|
71541a |
pacemaker_standby = false;
|
|
|
71541a |
}
|
|
|
71541a |
|
|
|
71541a |
- if (node_obj["noresponse"] == true) {
|
|
|
71541a |
+ if (node_obj["status"] == 'unknown') {
|
|
|
71541a |
pcsd_daemon = false
|
|
|
71541a |
} else {
|
|
|
71541a |
pcsd_daemon = true
|
|
|
71541a |
@@ -1618,9 +1630,9 @@ Pcs.nodesController = Ember.ArrayController.createWithMixins({
|
|
|
71541a |
up_status = false;
|
|
|
71541a |
}
|
|
|
71541a |
|
|
|
71541a |
- var node_attr = {};
|
|
|
71541a |
- if (node_obj["attr"]) {
|
|
|
71541a |
- node_attr = node_obj["attr"];
|
|
|
71541a |
+ var node_attr = [];
|
|
|
71541a |
+ if (data["node_attr"] && data["node_attr"][node_id]) {
|
|
|
71541a |
+ node_attr = data["node_attr"][node_id];
|
|
|
71541a |
}
|
|
|
71541a |
|
|
|
71541a |
found = false;
|
|
|
71541a |
@@ -1646,7 +1658,8 @@ Pcs.nodesController = Ember.ArrayController.createWithMixins({
|
|
|
71541a |
node.set("uptime", node_obj["uptime"]);
|
|
|
71541a |
node.set("node_id", node_obj["id"]);
|
|
|
71541a |
node.set("node_attrs", node_attr);
|
|
|
71541a |
- node.set("fence_levels", node_obj["fence_levels"]);
|
|
|
71541a |
+ node.set("fence_levels", data["fence_levels"]);
|
|
|
71541a |
+ node.set("status", node_obj["status"]);
|
|
|
71541a |
}
|
|
|
71541a |
});
|
|
|
71541a |
|
|
|
71541a |
@@ -1670,7 +1683,8 @@ Pcs.nodesController = Ember.ArrayController.createWithMixins({
|
|
|
71541a |
uptime: node_obj["uptime"],
|
|
|
71541a |
node_id: node_obj["id"],
|
|
|
71541a |
node_attrs: node_attr,
|
|
|
71541a |
- fence_levels: node_obj["fence_levels"]
|
|
|
71541a |
+ fence_levels: data["fence_levels"],
|
|
|
71541a |
+ status: node_obj["status"]
|
|
|
71541a |
});
|
|
|
71541a |
}
|
|
|
71541a |
var pathname = window.location.pathname.split('/');
|
|
|
71541a |
diff --git a/pcsd/remote.rb b/pcsd/remote.rb
|
|
|
71541a |
index 22af38a..a40c1c7 100644
|
|
|
71541a |
--- a/pcsd/remote.rb
|
|
|
71541a |
+++ b/pcsd/remote.rb
|
|
|
71541a |
@@ -1014,8 +1014,14 @@ def node_status(params, request, session)
|
|
|
71541a |
status[:cluster_settings]
|
|
|
71541a |
|
|
|
71541a |
node_attr = {}
|
|
|
71541a |
- node.attr.each { |v|
|
|
|
71541a |
- node_attr[v.name.to_sym] = v.value
|
|
|
71541a |
+ status[:node_attr].each { |node, attrs|
|
|
|
71541a |
+ node_attr[node] = []
|
|
|
71541a |
+ attrs.each { |attr|
|
|
|
71541a |
+ node_attr[node] << {
|
|
|
71541a |
+ :key => attr[:name],
|
|
|
71541a |
+ :value => attr[:value]
|
|
|
71541a |
+ }
|
|
|
71541a |
+ }
|
|
|
71541a |
}
|
|
|
71541a |
|
|
|
71541a |
old_status = {
|
|
|
71541a |
@@ -1038,7 +1044,7 @@ def node_status(params, request, session)
|
|
|
71541a |
:cluster_settings => cluster_settings,
|
|
|
71541a |
:node_id => node.id,
|
|
|
71541a |
:node_attr => node_attr,
|
|
|
71541a |
- :fence_levels => node.fence_levels,
|
|
|
71541a |
+ :fence_levels => status[:fence_levels],
|
|
|
71541a |
:need_ring1_address => status[:need_ring1_address],
|
|
|
71541a |
:is_cman_with_udpu_transport => status[:is_cman_with_udpu_transport],
|
|
|
71541a |
:acls => status[:acls],
|
|
|
71541a |
diff --git a/pcsd/views/nodes.erb b/pcsd/views/nodes.erb
|
|
|
71541a |
index b8ecf6d..19bba62 100644
|
|
|
71541a |
--- a/pcsd/views/nodes.erb
|
|
|
71541a |
+++ b/pcsd/views/nodes.erb
|
|
|
71541a |
@@ -40,242 +40,241 @@
|
|
|
71541a |
|
|
|
71541a |
|
|
|
71541a |
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-{{Pcs.nodesController.cur_node.name}}
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
- <input disabled style="margin-right: 50px;" type="text" {{bind-attr value="Pcs.nodesController.cur_node.name"}} size="35" class="text_field">
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
- {{#if Pcs.nodesController.cur_node.pacemaker}}
|
|
|
71541a |
-
|
|
|
71541a |
- Pacemaker Connected
|
|
|
71541a |
- {{else}}
|
|
|
71541a |
- {{#if Pcs.nodesController.cur_node.pacemaker_standby}}
|
|
|
71541a |
-
|
|
|
71541a |
- Pacemaker Standby
|
|
|
71541a |
- {{else}}
|
|
|
71541a |
-
|
|
|
71541a |
- Pacemaker Not Connected
|
|
|
71541a |
- {{/if}}
|
|
|
71541a |
- {{/if}}
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
- {{#if Pcs.nodesController.cur_node.corosync}}
|
|
|
71541a |
-
|
|
|
71541a |
- Corosync Connected
|
|
|
71541a |
- {{else}}
|
|
|
71541a |
-
|
|
|
71541a |
- Corosync Not Connected
|
|
|
71541a |
- {{/if}}
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
- Start
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
- Stop
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
- Restart
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
- Unstandby
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
- Standby
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
- Node ID:
|
|
|
71541a |
- {{Pcs.nodesController.cur_node.node_id}}
|
|
|
71541a |
- Uptime:
|
|
|
71541a |
- {{Pcs.nodesController.cur_node.uptime}}
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ {{Pcs.nodesController.cur_node.name}}
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
|
|
|
71541a |
-
|
|
|
71541a |
- Cluster Daemons
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
- NAMESTATUS
|
|
|
71541a |
- pacemaker
|
|
|
71541a |
-{{#if Pcs.nodesController.cur_node.pacemaker_daemon}}
|
|
|
71541a |
-Running ({{Pcs.nodesController.cur_node.pacemaker_startup}})
|
|
|
71541a |
-{{else}}
|
|
|
71541a |
-{{#if Pcs.nodesController.cur_node.pcsd}}
|
|
|
71541a |
-Stopped ({{Pcs.nodesController.cur_node.pacemaker_startup}})
|
|
|
71541a |
-{{else}}
|
|
|
71541a |
-Unknown ({{Pcs.nodesController.cur_node.pacemaker_startup}})
|
|
|
71541a |
-{{/if}}
|
|
|
71541a |
-{{/if}}
|
|
|
71541a |
-
|
|
|
71541a |
- corosync
|
|
|
71541a |
-{{#if Pcs.nodesController.cur_node.corosync_daemon}}
|
|
|
71541a |
-Running ({{Pcs.nodesController.cur_node.corosync_startup}})
|
|
|
71541a |
-{{else}}
|
|
|
71541a |
-{{#if Pcs.nodesController.cur_node.pcsd}}
|
|
|
71541a |
-Stopped ({{Pcs.nodesController.cur_node.corosync_startup}})
|
|
|
71541a |
-{{else}}
|
|
|
71541a |
-Unknown ({{Pcs.nodesController.cur_node.corosync_startup}})
|
|
|
71541a |
-{{/if}}
|
|
|
71541a |
-{{/if}}
|
|
|
71541a |
-
|
|
|
71541a |
- pcsd
|
|
|
71541a |
-{{#if Pcs.nodesController.cur_node.pcsd}}
|
|
|
71541a |
-Running ({{Pcs.nodesController.cur_node.pcsd_startup}})
|
|
|
71541a |
-{{else}}
|
|
|
71541a |
- {{#if Pcs.nodesController.cur_node.authorized}}
|
|
|
71541a |
- Stopped ({{Pcs.nodesController.cur_node.pcsd_startup}})
|
|
|
71541a |
- {{else}}
|
|
|
71541a |
- Running (not Authorized) ({{Pcs.nodesController.cur_node.pcsd_startup}})
|
|
|
71541a |
- {{/if}}
|
|
|
71541a |
-{{/if}}
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
- Running Resources
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
- NAME
|
|
|
71541a |
- {{#if Pcs.nodesController.cur_node.running_resources}}
|
|
|
71541a |
- {{#each res in Pcs.nodesController.cur_node.running_resources}}
|
|
|
71541a |
-
|
|
|
71541a |
- {{#unless res.stonith}}
|
|
|
71541a |
- {{#link-to 'Resources.index' res}}{{res.name}} ({{res.res_type}}){{/link-to}}
|
|
|
71541a |
- {{/unless}}
|
|
|
71541a |
-
|
|
|
71541a |
- {{/each}}
|
|
|
71541a |
- {{else}}
|
|
|
71541a |
- NONE
|
|
|
71541a |
- {{/if}}
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
- Resource Location Preferences
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
- NAMEScore
|
|
|
71541a |
- {{#if Pcs.nodesController.cur_node.location_constraints}}
|
|
|
71541a |
- {{#each Pcs.nodesController.cur_node.location_constraints}}
|
|
|
71541a |
- {{rsc}}{{score}}
|
|
|
71541a |
- {{/each}}
|
|
|
71541a |
- {{else}}
|
|
|
71541a |
- NONE
|
|
|
71541a |
- {{/if}}
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
- Node Attributes ({{#if Pcs.nodesController.cur_node_attr.length}}{{Pcs.nodesController.cur_node_attr.length}}{{else}}0{{/if}})
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
- AttributeValueRemove
|
|
|
71541a |
- {{#each Pcs.nodesController.cur_node_attr}}
|
|
|
71541a |
- {{this.name}}
|
|
|
71541a |
- {{this.value}}
|
|
|
71541a |
-
|
|
|
71541a |
- X
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ <input disabled style="margin-right: 50px;" type="text" {{bind-attr value="Pcs.nodesController.cur_node.name"}} size="35" class="text_field">
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ {{#if Pcs.nodesController.cur_node.pacemaker}}
|
|
|
71541a |
+
|
|
|
71541a |
+ Pacemaker Connected
|
|
|
71541a |
+
|
|
|
71541a |
+ {{else}}
|
|
|
71541a |
+ {{#if Pcs.nodesController.cur_node.pacemaker_standby}}
|
|
|
71541a |
+
|
|
|
71541a |
+ Pacemaker Standby
|
|
|
71541a |
+
|
|
|
71541a |
+ {{else}}
|
|
|
71541a |
+
|
|
|
71541a |
+ Pacemaker Not Connected
|
|
|
71541a |
+
|
|
|
71541a |
+ {{/if}}
|
|
|
71541a |
+ {{/if}}
|
|
|
71541a |
|
|
|
71541a |
|
|
|
71541a |
- {{/each}}
|
|
|
71541a |
- {{#unless Pcs.nodesController.cur_node_attr}}
|
|
|
71541a |
- NONE
|
|
|
71541a |
- {{/unless}}
|
|
|
71541a |
-
|
|
|
71541a |
- <input type="text" name="new_node_attr_key" size="20">
|
|
|
71541a |
- <input type="text" name="new_node_attr_value" size="20">
|
|
|
71541a |
- <button type="button" onclick="add_node_attr('#new_node_attr_col');" name="add">Add</button>
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ {{#if Pcs.nodesController.cur_node.corosync}}
|
|
|
71541a |
+
|
|
|
71541a |
+ Corosync Connected
|
|
|
71541a |
+
|
|
|
71541a |
+ {{else}}
|
|
|
71541a |
+
|
|
|
71541a |
+ Corosync Not Connected
|
|
|
71541a |
+
|
|
|
71541a |
+ {{/if}}
|
|
|
71541a |
+
|
|
|
71541a |
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ Start
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ Stop
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ Restart
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ Unstandby
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ Standby
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
|
|
|
71541a |
+
|
|
|
71541a |
+ {{#unless Pcs.nodesController.cur_node.status_unknown}}
|
|
|
71541a |
+
|
|
|
71541a |
+ Node ID:
|
|
|
71541a |
+ {{Pcs.nodesController.cur_node.node_id}}
|
|
|
71541a |
+ Uptime:
|
|
|
71541a |
+ {{Pcs.nodesController.cur_node.uptime}}
|
|
|
71541a |
+
|
|
|
71541a |
|
|
|
71541a |
+ {{/unless}}
|
|
|
71541a |
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
- Fence Levels ({{#if Pcs.nodesController.cur_node_fence_levels.length}}{{Pcs.nodesController.cur_node_fence_levels.length}}{{else}}0{{/if}})
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
- LevelFence DevicesRemove
|
|
|
71541a |
- {{#each Pcs.nodesController.cur_node_fence_levels}}
|
|
|
71541a |
-
|
|
|
71541a |
- {{this.level}}
|
|
|
71541a |
- {{this.devices}}
|
|
|
71541a |
-
|
|
|
71541a |
- X
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
- {{/each}}
|
|
|
71541a |
- {{#unless Pcs.nodesController.cur_node_fence_levels}}
|
|
|
71541a |
- NONE
|
|
|
71541a |
- {{/unless}}
|
|
|
71541a |
-
|
|
|
71541a |
- <input type="text" name="new_level_level" size="2">
|
|
|
71541a |
- <select name="new_level_value">
|
|
|
71541a |
- <option></option>
|
|
|
71541a |
- {{#each Pcs.resourcesContainer.fence_list}}
|
|
|
71541a |
- <option {{bind-attr value="this.id"}}>{{this.id}}</option>
|
|
|
71541a |
- {{/each }}
|
|
|
71541a |
- </select>
|
|
|
71541a |
- <button type="button" onclick="add_remove_fence_level($(this).parent());" name="add">Add</button>
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
-
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ Cluster Daemons
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ NAMESTATUS
|
|
|
71541a |
+ pacemaker
|
|
|
71541a |
+ {{#if Pcs.nodesController.cur_node.pacemaker_daemon}}
|
|
|
71541a |
+ Running ({{Pcs.nodesController.cur_node.pacemaker_startup}})
|
|
|
71541a |
+ {{else}}
|
|
|
71541a |
+ {{#if Pcs.nodesController.cur_node.pcsd}}
|
|
|
71541a |
+ Stopped ({{Pcs.nodesController.cur_node.pacemaker_startup}})
|
|
|
71541a |
+ {{else}}
|
|
|
71541a |
+ Unknown ({{Pcs.nodesController.cur_node.pacemaker_startup}})
|
|
|
71541a |
+ {{/if}}
|
|
|
71541a |
+ {{/if}}
|
|
|
71541a |
+
|
|
|
71541a |
+ corosync
|
|
|
71541a |
+ {{#if Pcs.nodesController.cur_node.corosync_daemon}}
|
|
|
71541a |
+ Running ({{Pcs.nodesController.cur_node.corosync_startup}})
|
|
|
71541a |
+ {{else}}
|
|
|
71541a |
+ {{#if Pcs.nodesController.cur_node.pcsd}}
|
|
|
71541a |
+ Stopped ({{Pcs.nodesController.cur_node.corosync_startup}})
|
|
|
71541a |
+ {{else}}
|
|
|
71541a |
+ Unknown ({{Pcs.nodesController.cur_node.corosync_startup}})
|
|
|
71541a |
+ {{/if}}
|
|
|
71541a |
+ {{/if}}
|
|
|
71541a |
+
|
|
|
71541a |
+ pcsd
|
|
|
71541a |
+ {{#if Pcs.nodesController.cur_node.pcsd}}
|
|
|
71541a |
+ Running ({{Pcs.nodesController.cur_node.pcsd_startup}})
|
|
|
71541a |
+ {{else}}
|
|
|
71541a |
+ {{#if Pcs.nodesController.cur_node.authorized}}
|
|
|
71541a |
+ Stopped ({{Pcs.nodesController.cur_node.pcsd_startup}})
|
|
|
71541a |
+ {{else}}
|
|
|
71541a |
+ Running (not Authorized) ({{Pcs.nodesController.cur_node.pcsd_startup}})
|
|
|
71541a |
+ {{/if}}
|
|
|
71541a |
+ {{/if}}
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ Running Resources
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ NAME
|
|
|
71541a |
+ {{#if Pcs.nodesController.cur_node.running_resources}}
|
|
|
71541a |
+ {{#each res in Pcs.nodesController.cur_node.running_resources}}
|
|
|
71541a |
+
|
|
|
71541a |
+ {{#unless res.stonith}}
|
|
|
71541a |
+ {{#link-to 'Resources.index' res}}{{res.name}} ({{res.res_type}}){{/link-to}}
|
|
|
71541a |
+ {{/unless}}
|
|
|
71541a |
+
|
|
|
71541a |
+ {{/each}}
|
|
|
71541a |
+ {{else}}
|
|
|
71541a |
+ NONE
|
|
|
71541a |
+ {{/if}}
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ Resource Location Preferences
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ NAMEScore
|
|
|
71541a |
+ {{#if Pcs.nodesController.cur_node.location_constraints}}
|
|
|
71541a |
+ {{#each Pcs.nodesController.cur_node.location_constraints}}
|
|
|
71541a |
+ {{rsc}}{{score}}
|
|
|
71541a |
+ {{/each}}
|
|
|
71541a |
+ {{else}}
|
|
|
71541a |
+ NONE
|
|
|
71541a |
+ {{/if}}
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ Node Attributes ({{#if Pcs.nodesController.cur_node_attr.length}}{{Pcs.nodesController.cur_node_attr.length}}{{else}}0{{/if}})
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ AttributeValueRemove
|
|
|
71541a |
+ {{#each attr in Pcs.nodesController.cur_node_attr}}
|
|
|
71541a |
+ {{attr.name}}
|
|
|
71541a |
+ {{attr.value}}
|
|
|
71541a |
+
|
|
|
71541a |
+ X
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ {{else}}
|
|
|
71541a |
+ NONE
|
|
|
71541a |
+ {{/each}}
|
|
|
71541a |
+
|
|
|
71541a |
+ <input type="text" name="new_node_attr_key" size="20">
|
|
|
71541a |
+ <input type="text" name="new_node_attr_value" size="20">
|
|
|
71541a |
+ <button type="button" onclick="add_node_attr('#new_node_attr_col');" name="add">Add</button>
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ Fence Levels ({{#if Pcs.nodesController.cur_node_fence_levels.length}}{{Pcs.nodesController.cur_node_fence_levels.length}}{{else}}0{{/if}})
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ LevelFence DevicesRemove
|
|
|
71541a |
+ {{#each Pcs.nodesController.cur_node_fence_levels}}
|
|
|
71541a |
+
|
|
|
71541a |
+ {{this.level}}
|
|
|
71541a |
+ {{this.devices}}
|
|
|
71541a |
+
|
|
|
71541a |
+ X
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+ {{/each}}
|
|
|
71541a |
+ {{#unless Pcs.nodesController.cur_node_fence_levels}}
|
|
|
71541a |
+ NONE
|
|
|
71541a |
+ {{/unless}}
|
|
|
71541a |
+
|
|
|
71541a |
+ <input type="text" name="new_level_level" size="2">
|
|
|
71541a |
+ <select name="new_level_value">
|
|
|
71541a |
+ <option></option>
|
|
|
71541a |
+ {{#each Pcs.resourcesContainer.fence_list}}
|
|
|
71541a |
+ <option {{bind-attr value="this.id"}}>{{this.id}}</option>
|
|
|
71541a |
+ {{/each }}
|
|
|
71541a |
+ </select>
|
|
|
71541a |
+ <button type="button" onclick="add_remove_fence_level($(this).parent());" name="add">Add</button>
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
+
|
|
|
71541a |
<%= erb :_configure %>
|
|
|
71541a |
<%= erb :_acls %>
|
|
|
71541a |
<%= erb :_wizards %>
|
|
|
71541a |
--
|
|
|
71541a |
1.9.1
|
|
|
71541a |
|