[luci: 76/101] One last fix to catch a corner case on adding clusters for cluster busy.
by Jan Pokorný
commit bc2d2c34e6f58344054f3d4cc30d6b84637e734e
Author: Chris Feist <cfeist(a)redhat.com>
Date: Tue Jul 27 16:19:27 2010 -0500
One last fix to catch a corner case on adding clusters for cluster busy.
luci/templates/node.html | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/luci/templates/node.html b/luci/templates/node.html
index 4ebbadf..a2663d8 100644
--- a/luci/templates/node.html
+++ b/luci/templates/node.html
@@ -141,7 +141,6 @@
</py:if>
</td>
</tr>
- </py:if>
<tr py:for="i in nodes"
py:with="hostname = i.hostname">
<py:if test="cluster_status.nodes.keys().count(i.hostname) == 0">
@@ -159,6 +158,7 @@
<td class="node_tlist_status">${_('This node is currently being added')}</td>
</py:if>
</tr>
+ </py:if>
</tbody>
</table>
</div>
13 years, 10 months
[luci: 75/101] It's now possible to remove nodes in node add or create cluster dialog
by Jan Pokorný
commit 29bea75632212310ab477b819106415dca9748f3
Author: Chris Feist <cfeist(a)redhat.com>
Date: Tue Jul 27 15:10:58 2010 -0500
It's now possible to remove nodes in node add or create cluster dialog
luci/public/js/shared.js | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/luci/public/js/shared.js b/luci/public/js/shared.js
index bf8d918..cdc5a7a 100644
--- a/luci/public/js/shared.js
+++ b/luci/public/js/shared.js
@@ -49,7 +49,8 @@ function add_system_row(form) {
$(input_elems).attr('name',
function() { return this.name + num_nodes; });
var img_elem = $('img', $(new_elem));
- $(img_elem).attr('onclick', '$(\'#' + new_id + '\').remove()');
+ $(img_elem).click(
+ function() { $('#'+new_id).remove(); });
$('.add_node_button_row', $(form)).before($(new_elem));
if (form.allSameCheckBox.checked == true) { allPasswdsSame(form); }
}
13 years, 10 months
[luci: 74/101] Additional fix for rhbz#615911: fence_xvm (shown as "fence_virt (multicast mode)") should be listed
by Jan Pokorný
commit 65f608d23bb211a67f6be1b39f8967f36a9d2d93
Author: Ryan McCabe <rmccabe(a)redhat.com>
Date: Mon Jul 26 21:58:16 2010 -0400
Additional fix for rhbz#615911: fence_xvm (shown as "fence_virt (multicast mode)") should be listed among the fence types for cluster3 clusters
luci/templates/fence_devices.html | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/luci/templates/fence_devices.html b/luci/templates/fence_devices.html
index c774259..98ab861 100644
--- a/luci/templates/fence_devices.html
+++ b/luci/templates/fence_devices.html
@@ -2686,7 +2686,7 @@ ${fence_unknown(None,0)}
<py:choose test="tmpl_context.cluster_version">
<py:when test="3">
<option name="fence_virt" value="fence_virt">Fence virt (Tech Preview)</option>
- <!-- <option name="fence_xvm" value="fence_xvm">Fence virt (Multicast Mode)</option> -->
+ <option name="fence_xvm" value="fence_xvm">Fence virt (Multicast Mode)</option>
</py:when>
</py:choose>
<option py:if="tmpl_context.cluster_version == 2" name="fence_xvm" value="fence_xvm">Fence xvm</option>
13 years, 10 months
[luci: 73/101] fix rhbz#615889 - luci cannot start an imported cluster
by Jan Pokorný
commit 7afef61d9d4f8ee05134ade5b74e4213bd27200b
Author: Ryan McCabe <rmccabe(a)redhat.com>
Date: Mon Jul 26 21:47:50 2010 -0400
fix rhbz#615889 - luci cannot start an imported cluster
luci/templates/node.html | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/luci/templates/node.html b/luci/templates/node.html
index c200430..4ebbadf 100644
--- a/luci/templates/node.html
+++ b/luci/templates/node.html
@@ -40,7 +40,7 @@
</py:for>
</div>
- <form action="${tg.url('nodes_cmd')}" method="post">
+ <form action="${'%snodes_cmd' % tmpl_context.cluster_url}" method="post">
<div class="sectionblock">
<xi:include href="submenu.html"/>
<div id="toolbar">
13 years, 10 months
[luci: 72/101] Fix rhbz#615872 - unicode error deleting a cluster
by Jan Pokorný
commit 4a44f5054a42479b6b8e944e0262bcd4123d9d1b
Author: Ryan McCabe <rmccabe(a)redhat.com>
Date: Mon Jul 26 21:47:25 2010 -0400
Fix rhbz#615872 - unicode error deleting a cluster
luci/controllers/cluster.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/luci/controllers/cluster.py b/luci/controllers/cluster.py
index 94445e9..0dd98ef 100644
--- a/luci/controllers/cluster.py
+++ b/luci/controllers/cluster.py
@@ -53,7 +53,7 @@ class ClusterController(BaseController):
command = kw['MultiAction']
for key, element in kw.items():
if element == "on":
- db_remove_cluster(key)
+ db_remove_cluster(unicode(key))
redirect('/cluster/')
@expose()
13 years, 10 months
[luci: 71/101] Fixed status display during addition and removal of nodes.
by Jan Pokorný
commit 621964e959485933d20de57b9f9ddc81388797f9
Author: Chris Feist <cfeist(a)redhat.com>
Date: Mon Jul 26 17:00:16 2010 -0500
Fixed status display during addition and removal of nodes.
luci/controllers/cluster.py | 5 ++-
luci/templates/node.html | 30 ++++++++++++++++----
.../validate_create_cluster_form.py | 3 +-
3 files changed, 28 insertions(+), 10 deletions(-)
---
diff --git a/luci/controllers/cluster.py b/luci/controllers/cluster.py
index 1194f28..94445e9 100644
--- a/luci/controllers/cluster.py
+++ b/luci/controllers/cluster.py
@@ -109,7 +109,7 @@ class IndividualClusterController(BaseController):
def add_nodes_cmd(self, command=None, **kw):
db = get_cluster_db_obj(self.name)
vret = validate_node_add_form(self.model, db, **kw)
- return dict(use_referrer=False, page='nodes', name=self.nodename, base_url='/nodes', nodes=db.nodes)
+ redirect('%s%s' % (tmpl_context.cluster_url, 'nodes'))
@expose("luci.templates.node")
def nodes_fence_cmd(self, command=None, **kw):
@@ -677,7 +677,8 @@ class IndividualNodeController(BaseController):
@expose("luci.templates.node")
def default(self):
- return dict(page='nodes', name=self.nodename, base_url='/nodes')
+ db = get_cluster_db_obj(self.name)
+ return dict(page='nodes', name=self.nodename, base_url='/nodes', nodes=db.nodes)
@expose()
def lookup(self, nodename, *args):
diff --git a/luci/templates/node.html b/luci/templates/node.html
index b1b748f..c200430 100644
--- a/luci/templates/node.html
+++ b/luci/templates/node.html
@@ -72,10 +72,15 @@
py:attrs="entity_name==name and {'class': 'chosen'} or (not i%2 and {'class': 'even'} or None)"
py:with="identifier = entity_name;
nodeobj = cluster_data.getNodeByName(entity_name);
+ is_clustered = node_data['clustered'];
nodedbobj = db_helpers.get_cluster_node(tmpl_context.cluster_name, entity_name);">
<td class="checkbox"><input type="checkbox" name="${identifier}"/></td>
<!--! Branch according to the status of the node. -->
- <py:choose test="node_data['clustered']">
+ <?python
+ if nodeobj == None:
+ is_clustered = "Removing"
+ ?>
+ <py:choose test="is_clustered">
<!--! 1) Node is active. -->
<py:when test="'true'">
<td class="icon"></td>
@@ -116,6 +121,19 @@
<td class="node_tlist_votes">${nodeobj and nodeobj.getVotes()}</td>
<td class="node_tlist_status">${_('The status of this node is unknown')}</td>
</py:when>
+ <py:when test="'Removing'">
+ <td class="icon">
+ <img src="${tg.url('/images/exclamation.png')}" alt="Node is being deleted." />
+ </td>
+ <td class="main_id">
+ <a href="${tmpl_context.cluster_url + entity_name}">
+ <span class="entity_fail">${entity_name}</span>
+ </a>
+ </td>
+ <td class="node_tlist_id">${nodeobj and nodeobj.getID()}</td>
+ <td class="node_tlist_votes">${nodeobj and nodeobj.getVotes()}</td>
+ <td class="node_tlist_status">${_('Node is being removed')}</td>
+ </py:when>
</py:choose>
<td class="node_tlist_ip">
<py:if test="nodedbobj">
@@ -124,11 +142,11 @@
</td>
</tr>
</py:if>
- <py:if test="not cluster_status or not cluster_status.nodes">
<tr py:for="i in nodes"
py:with="hostname = i.hostname">
- <td class="checkbox"><input type="checkbox" name="${hostname}"/></td>
- <td class="icon">
+ <py:if test="cluster_status.nodes.keys().count(i.hostname) == 0">
+ <td class="checkbox"><input type="checkbox" name="${hostname}"/></td>
+ <td class="icon">
<img src="${tg.url('/images/question.png')}" alt="Status of the node is unknown." />
</td>
<td class="main_id">
@@ -138,9 +156,9 @@
</td>
<td class="node_tlist_id"></td>
<td class="node_tlist_votes"></td>
- <td class="node_tlist_status">${_('The status of this node is unknown')}</td>
+ <td class="node_tlist_status">${_('This node is currently being added')}</td>
+ </py:if>
</tr>
- </py:if>
</tbody>
</table>
</div>
diff --git a/luci/widget_validators/validate_create_cluster_form.py b/luci/widget_validators/validate_create_cluster_form.py
index 3c5043d..eeb1bca 100644
--- a/luci/widget_validators/validate_create_cluster_form.py
+++ b/luci/widget_validators/validate_create_cluster_form.py
@@ -289,5 +289,4 @@ def validate_node_add_form(model, db_obj, **kw):
flash(_('An error occurred while adding nodes to cluster "%s": %s') % (cluster_name, str(e)), 'error')
return
- flash(_('Creating nodes for cluster "%s", this may take up to 30 seconds. Please refresh screen to view created cluster.') % cluster_name, 'info')
- redirect("/cluster")
+ flash(_('Creating nodes for cluster "%s", this may take up to 30 seconds. Please refresh screen to update status.') % cluster_name, 'info')
13 years, 10 months
[luci: 70/101] Show clusters immediately after they have been added to luci
by Jan Pokorný
commit c17946eba5d08834a857b7936620d60fa978db0b
Author: Chris Feist <cfeist(a)redhat.com>
Date: Mon Jul 26 15:48:59 2010 -0500
Show clusters immediately after they have been added to luci
luci/templates/cluster_list.html | 41 +++++++++++++-------
.../validate_create_cluster_form.py | 2 +-
2 files changed, 28 insertions(+), 15 deletions(-)
---
diff --git a/luci/templates/cluster_list.html b/luci/templates/cluster_list.html
index 5d43ec9..5f9ed0c 100644
--- a/luci/templates/cluster_list.html
+++ b/luci/templates/cluster_list.html
@@ -62,10 +62,10 @@
</a>
</td>
<td class="cluster_tlist_status">Quorate</td>
- <td class="cluster_tlist_votes">${sum(map(lambda n: int(n.getVotes()), cluster_data['model'].getNodes()))}</td>
- <td class="cluster_tlist_votes">${cluster_data['status'].votes}</td>
- <td class="cluster_tlist_quorum">${cluster_data['status'].minQuorum}</td>
- <td class="cluster_tlist_votes">${cluster_data['status'].nodesClustered}</td>
+ <td class="cluster_tlist_votes">${sum(map(lambda n: int(n.getVotes()), cluster_data['model'].getNodes()))}</td>
+ <td class="cluster_tlist_votes">${cluster_data['status'].votes}</td>
+ <td class="cluster_tlist_quorum">${cluster_data['status'].minQuorum}</td>
+ <td class="cluster_tlist_votes">${cluster_data['status'].nodesClustered}</td>
</py:when>
<!--! 2) Cluster is not OK. -->
<py:when test="'false'">
@@ -75,10 +75,10 @@
</a>
</td>
<td class="cluster_tlist_status">Not Quorate</td>
- <td class="cluster_tlist_votes">${sum(map(lambda n: int(n.getVotes()), cluster_data['model'].getNodes()))}</td>
- <td class="cluster_tlist_votes">${cluster_data['status'].votes}</td>
- <td class="cluster_tlist_quorum">${cluster_data['status'].minQuorum}</td>
- <td class="cluster_tlist_votes">${cluster_data['status'].nodesClustered}</td>
+ <td class="cluster_tlist_votes">${sum(map(lambda n: int(n.getVotes()), cluster_data['model'].getNodes()))}</td>
+ <td class="cluster_tlist_votes">${cluster_data['status'].votes}</td>
+ <td class="cluster_tlist_quorum">${cluster_data['status'].minQuorum}</td>
+ <td class="cluster_tlist_votes">${cluster_data['status'].nodesClustered}</td>
</py:when>
<!--! 3) Status of the cluster is unknown. -->
<py:when test="">
@@ -88,14 +88,27 @@
</a>
</td>
<td class="cluster_tlist_status">Status unknown</td>
- <td class="cluster_tlist_votes">-</td>
- <td class="cluster_tlist_votes">-</td>
- <td class="cluster_tlist_quorum">-</td>
- <td class="cluster_tlist_votes">-</td>
+ <td class="cluster_tlist_votes">-</td>
+ <td class="cluster_tlist_votes">-</td>
+ <td class="cluster_tlist_quorum">-</td>
+ <td class="cluster_tlist_votes">-</td>
</py:when>
</py:choose>
- </div>
- </tr>
+ </div>
+ <div py:if="not hasattr(cluster_data['status'],'quorate')">
+ <td class="checkbox"><input type="checkbox" name="${identifier}"/></td>
+ <td class="main_id">
+ <a href="${tg.url('/' + page + '/' + entity_name) + '/'}">
+ <span class="entity_unknown">${entity_name}</span>
+ </a>
+ </td>
+ <td class="cluster_tlist_status">Currently Loading</td>
+ <td class="cluster_tlist_votes">-</td>
+ <td class="cluster_tlist_votes">-</td>
+ <td class="cluster_tlist_quorum">-</td>
+ <td class="cluster_tlist_votes">-</td>
+ </div>
+ </tr>
</tbody>
</table>
</div>
diff --git a/luci/widget_validators/validate_create_cluster_form.py b/luci/widget_validators/validate_create_cluster_form.py
index a1590a2..3c5043d 100644
--- a/luci/widget_validators/validate_create_cluster_form.py
+++ b/luci/widget_validators/validate_create_cluster_form.py
@@ -153,7 +153,7 @@ def validate_create_cluster_form(self, **kw):
flash(_('An error occurred during the creation of cluster "%s" while updating the luci database: %s') % (cluster_name, str(e)), 'error')
return
- flash(_('Creating the cluster "%s", this may take up to 30 seconds. Please refresh screen to view created cluster.') % cluster_name, 'info')
+ flash(_('Creating the cluster "%s", this may take up to 30 seconds. Please refresh screen to update status.') % cluster_name, 'info')
redirect("/cluster")
# TODO: refactor to share common bits with the validation for
13 years, 10 months
[luci: 69/101] Fix: Bad conversion specifier in error message.
by Jan Pokorný
commit 1372bad69607fb0a63060f30b201ccfdc027c250
Author: Jan Pokorny <jpokorny(a)redhat.com>
Date: Mon Jul 26 21:57:40 2010 +0200
Fix: Bad conversion specifier in error message.
.../validate_create_cluster_form.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/luci/widget_validators/validate_create_cluster_form.py b/luci/widget_validators/validate_create_cluster_form.py
index 8f38a10..a1590a2 100644
--- a/luci/widget_validators/validate_create_cluster_form.py
+++ b/luci/widget_validators/validate_create_cluster_form.py
@@ -95,7 +95,7 @@ def validate_create_cluster_form(self, **kw):
rc.trust()
rc.auth(node[1])
if not rc.authed():
- errors.append('Authentication to the ricci agent at %s:%d failed'
+ errors.append('Authentication to the ricci agent at %s:%s failed'
% (node[0], node[2]))
continue
@@ -222,7 +222,7 @@ def validate_node_add_form(model, db_obj, **kw):
rc.trust()
rc.auth(node[1])
if not rc.authed():
- errors.append('Authentication to the ricci agent at %s:%d failed'
+ errors.append('Authentication to the ricci agent at %s:%s failed'
% (node[0], node[2]))
continue
13 years, 10 months
[luci: 68/101] Fix rhbz#616244 - Clicking on the leave button doesn't work on nodes page
by Jan Pokorný
commit 920591daafeedf8197b6fae69d3cf9e0de29dd71
Author: Ryan McCabe <rmccabe(a)redhat.com>
Date: Mon Jul 26 15:18:00 2010 -0400
Fix rhbz#616244 - Clicking on the leave button doesn't work on nodes page
luci/templates/node.html | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/luci/templates/node.html b/luci/templates/node.html
index 66e38bd..b1b748f 100644
--- a/luci/templates/node.html
+++ b/luci/templates/node.html
@@ -173,7 +173,7 @@
<div id="details_header_buttons">
<a href="${tg.url('nodes_cmd?command=Reboot' + '&name=' + name)}" id="dh_reboot" title="reboot"><span class="hide">reboot</span></a>
<a href="${tg.url('nodes_cmd?command=Join+Cluster' + '&name=' + name)}" id="dh_join" title="join"><span class="hide">join</span></a>
- <a href="${tg.url('nodes_cmd?command=Leave' + '&name=' + name)}" id="dh_leave" title="leave cluster"><span class="hide">leave cluster</span></a>
+ <a href="${tg.url('nodes_cmd?command=Leave+Cluster' + '&name=' + name)}" id="dh_leave" title="leave cluster"><span class="hide">leave cluster</span></a>
<a href="${tg.url('nodes_cmd?command=Delete' + '&name=' + name)}" id="dh_delete" title="delete"><span class="hide">delete</span></a>
</div>
<span class="details_header_info_label">Status</span>
13 years, 10 months
[luci: 67/101] Fix rhbz#616230 - Clicking on the join button doesn't work on nodes page
by Jan Pokorný
commit 7918c2c15585f991295b4f8f1d874eaf43d3442d
Author: Ryan McCabe <rmccabe(a)redhat.com>
Date: Mon Jul 26 15:17:31 2010 -0400
Fix rhbz#616230 - Clicking on the join button doesn't work on nodes page
luci/templates/node.html | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/luci/templates/node.html b/luci/templates/node.html
index 19834c6..66e38bd 100644
--- a/luci/templates/node.html
+++ b/luci/templates/node.html
@@ -172,7 +172,7 @@
<h3 py:content="name"/>
<div id="details_header_buttons">
<a href="${tg.url('nodes_cmd?command=Reboot' + '&name=' + name)}" id="dh_reboot" title="reboot"><span class="hide">reboot</span></a>
- <a href="${tg.url('nodes_cmd?command=Join' + '&name=' + name)}" id="dh_join" title="join"><span class="hide">join</span></a>
+ <a href="${tg.url('nodes_cmd?command=Join+Cluster' + '&name=' + name)}" id="dh_join" title="join"><span class="hide">join</span></a>
<a href="${tg.url('nodes_cmd?command=Leave' + '&name=' + name)}" id="dh_leave" title="leave cluster"><span class="hide">leave cluster</span></a>
<a href="${tg.url('nodes_cmd?command=Delete' + '&name=' + name)}" id="dh_delete" title="delete"><span class="hide">delete</span></a>
</div>
13 years, 10 months