r4684 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-05 17:36:52 +0000 (Tue, 05 Apr 2011)
New Revision: 4684
Modified:
trunk/cumin/python/cumin/grid/dashboard.py
trunk/cumin/python/cumin/grid/dashboard.strings
Log:
Added aggregates scheduler stats to grid overview
Modified: trunk/cumin/python/cumin/grid/dashboard.py
===================================================================
--- trunk/cumin/python/cumin/grid/dashboard.py 2011-04-04 19:17:33 UTC (rev 4683)
+++ trunk/cumin/python/cumin/grid/dashboard.py 2011-04-05 17:36:52 UTC (rev 4684)
@@ -24,7 +24,10 @@
self.collector = collector
- dashboard = Dashboard(app, "d", collector)
+ scheduler_stats = DashboardSchedulerStats(app, "s", collector)
+ self.add_tab(scheduler_stats)
+
+ dashboard = DashboardSummary(app, "d", collector)
self.add_tab(dashboard)
performance = DashboardPerformance(app, "p", collector)
@@ -36,10 +39,43 @@
def render_title(self, session):
return "Overview"
-class Dashboard(WidgetSet):
+class DashboardSchedulerStats(WidgetSet):
def __init__(self, app, name, collector):
- super(Dashboard, self).__init__(app, name)
+ super(DashboardSchedulerStats, self).__init__(app, name)
+ cls = app.model.com_redhat_grid.Scheduler
+ columns = (cls.JobsSubmitted, cls.JobSubmissionRate, cls.JobsSubmittedCum)
+ stats = DashboardSummaryStats(app, "submitted", collector, cls, columns, "Jobs.Submitted")
+ stats.title = "Aggregate job submission stats"
+ self.add_child(stats)
+
+ columns = (cls.JobsStarted, cls.JobStartRate, cls.JobsStartedCum)
+ stats = DashboardSummaryStats(app, "started", collector, cls, columns, "Jobs.Started")
+ stats.title = "Aggregate job started stats"
+ self.add_child(stats)
+
+ columns = (cls.JobsCompleted, cls.JobCompletionRate, cls.JobsCompletedCum)
+ stats = DashboardSummaryStats(app, "completed", collector, cls, columns, "Jobs.Completed")
+ stats.title = "Aggregate job completion stats"
+ self.add_child(stats)
+
+ columns = (cls.JobsExited, cls.JobsExitedCum)
+ stats = DashboardSummaryStats(app, "exited", collector, cls, columns, "Jobs.Exited")
+ stats.title = "Aggregate job exited stats"
+ self.add_child(stats)
+
+ columns = (cls.ShadowExceptions, cls.ShadowExceptionsCum)
+ stats = DashboardSummaryStats(app, "exceptions", collector, cls, columns, "Jobs.Exceptions")
+ stats.title = "Aggregate job shadow exceptions stats"
+ self.add_child(stats)
+
+ def render_title(self, session):
+ return "Scheuler Stats"
+
+class DashboardSummary(WidgetSet):
+ def __init__(self, app, name, collector):
+ super(DashboardSummary, self).__init__(app, name)
+
slot_data = GridSlotsSummary(app, "slots_summary", collector)
self.add_child(slot_data)
@@ -353,13 +389,54 @@
return records[0]
-class DashboardSummarySet(PieStatSet):
+class DashboardSummaryStats(DefinitionSet):
def __init__(self, app, name, collector, cls, columns, title):
- super(DashboardSummarySet, self).__init__(app, name, collector, title)
+ super(DashboardSummaryStats, self).__init__(app, name, collector, title)
self.record = Attribute(app, "totals")
self.add_attribute(self.record)
+ self.columns = columns
+ self.sum_columns = [x.name for x in columns]
+ self.sum_cls = cls
+ self.data = DashboardSumData(app, self.sum_columns, collector, self.sum_cls)
+
+ self.title = None
+
+ def render_title(self, session):
+ return self.title
+
+ def do_get_items(self, session):
+ return self.columns
+
+ def render_item_title(self, session, item):
+ return item.title
+
+ def render_html_title(self, session, item):
+ return item.description
+
+ def get_item_value(self, session, item):
+ record = self.get_record(session)
+ return record[self.get_item_index(item)] or 0
+
+ def get_item_index(self, item):
+ return self.sum_columns.index(item.name)
+
+ def get_record(self, session):
+ record = self.record.get(session)
+ if not record:
+ record = self.data.get_record(session)
+ self.record.set(session, record)
+
+ return record
+
+class DashboardPieSummarySet(PieStatSet):
+ def __init__(self, app, name, collector, cls, columns, title):
+ super(DashboardPieSummarySet, self).__init__(app, name, collector, title)
+
+ self.record = Attribute(app, "totals")
+ self.add_attribute(self.record)
+
# XXX - consider using an ObjectSelector with SumSqlColumns as the data source
self.columns = columns
self.sum_columns = [x.name for x in columns]
@@ -401,7 +478,7 @@
return record
-class DashboardOverviewJobSummary(DashboardSummarySet):
+class DashboardOverviewJobSummary(DashboardPieSummarySet):
def __init__(self, app, name, collector):
cls = app.model.com_redhat_grid.Scheduler
columns = [cls.TotalRunningJobs, cls.TotalHeldJobs, cls.TotalIdleJobs,
@@ -414,7 +491,7 @@
def render_title(self, session):
return "Job summary info"
-class DashboardCapacitySlotSummary(DashboardSummarySet):
+class DashboardCapacitySlotSummary(DashboardPieSummarySet):
PERCENT_COLUMN = "% Memory used"
def __init__(self, app, name, collector):
self.cls = app.model.com_redhat_grid.Slot
Modified: trunk/cumin/python/cumin/grid/dashboard.strings
===================================================================
--- trunk/cumin/python/cumin/grid/dashboard.strings 2011-04-04 19:17:33 UTC (rev 4683)
+++ trunk/cumin/python/cumin/grid/dashboard.strings 2011-04-05 17:36:52 UTC (rev 4684)
@@ -1,13 +1,13 @@
-[Dashboard.css]
-div.Dashboard {
+[DashboardSummary.css]
+div.DashboardSummary {
width: 950px;
}
-[Dashboard.html]
+[DashboardSummary.html]
<div id="{id}" class="{class}">{widgets}</div>
<div style="clear:both;"></div>
-[Dashboard.widget_html]
+[DashboardSummary.widget_html]
{widget}
[MonitorSelfStats.css]
@@ -247,3 +247,26 @@
<div id="flashSlotMap">{slot_map}</div>
<div id="pngSlotMap">{slot_png}</div>
</div>
+
+[DashboardSchedulerStats.html]
+<div id="{id}" class="{class}">{widgets}</div>
+<div style="clear:both;"></div>
+
+[DashboardSchedulerStats.widget_html]
+{widget}
+
+[DashboardSummaryStats.html]
+<div id="{id}" class="{class}">
+ <h3>{title}</h3>
+ <dl>
+ {items}
+ </dl>
+ <div class="icons">
+ {export}
+ </div>
+</div>
+
+[DashboardSummaryStats.item_html]
+ <dt title="{html_title}">{item_title}</dt>
+ <dd><span>{item_value}</span></dd>
+
13 years, 1 month
r4683 - trunk/cumin/model
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-04 19:17:33 +0000 (Mon, 04 Apr 2011)
New Revision: 4683
Modified:
trunk/cumin/model/condor.xml
Log:
Added the new scheduler stats
Modified: trunk/cumin/model/condor.xml
===================================================================
--- trunk/cumin/model/condor.xml 2011-04-04 19:16:48 UTC (rev 4682)
+++ trunk/cumin/model/condor.xml 2011-04-04 19:17:33 UTC (rev 4683)
@@ -506,6 +506,52 @@
<statistic name="TotalRemovedJobs" type="uint32"/>
<statistic name="TotalRunningJobs" type="uint32"/>
+ <property name="WindowedStatWidth" type="uint32" unit="seconds"
+ desc="The stat window width, config param WINDOWED_STAT_WIDTH"/>
+ <statistic name="UpdateInterval" type="uint32" unit="seconds"
+ desc="Seconds between current publish and previous"/>
+
+ <statistic name="JobsSubmitted" type="uint32"
+ desc="Number of jobs submitted over most recent sampling window"/>
+ <statistic name="JobSubmissionRate" type="double"
+ desc="Rate of job submissions (jobs per second) over most recent sampling window"/>
+ <statistic name="JobsCompleted" type="uint32"
+ desc="Number of jobs completed (successfully, shadow code=100 or 115) over most recent sampling window"/>
+ <statistic name="JobCompletionRate" type="double"
+ desc="Rate of job completions (jobs per second) over most recent sampling window"/>
+ <statistic name="JobsExited" type="uint32"
+ desc="Number of jobs that exited over most recent sampling window"/>
+ <statistic name="ShadowExceptions" type="uint32"
+ desc="Number of shadow excptions over most recent sampling window"/>
+ <!-- ExitCodeXXX: number of jobs exited with code XXX (100, 115, etc) over window -->
+ <statistic name="JobsSubmittedCum" type="uint32"
+ desc="Number of jobs submitted over lifetime of the Scheduler"/>
+ <statistic name="JobsCompletedCum" type="uint32"
+ desc="Number of jobs successfully completed over lifetime of the Scheduler"/>
+ <statistic name="JobsExitedCum" type="uint32"
+ desc="Number of jobs exited over the lifetime of the Scheduler"/>
+ <statistic name="ShadowExceptionsCum" type="uint32"
+ desc="Number of shadow exceptions over the lifetime of the Scheduler"/>
+ <!-- ExitCodeCumXXX: number of jobs exited with code XXX over schedd lifetime -->
+ <statistic name="JobsStartedCum" type="uint32"
+ desc="Number of jobs started over the lifetime of the Scheduler"/>
+ <statistic name="JobsStarted" type="uint32"
+ desc="Number of jobs started over the lifetime of the Scheduler"/>
+ <statistic name="JobStartRate" type="double"
+ desc="Rate of job starts (jobs per second) over the most recent sampling window"/>
+ <statistic name="MeanTimeToStartCum" type="double" unit="seconds"
+ desc="Mean time a job waits in the Scheduler until first start, over the lifetime of the Scheduler"/>
+ <statistic name="MeanRunningTimeCum" type="double" unit="seconds"
+ desc="Mean running time (wall-clock) for jobs in the Scheduler, over the lifetime of the Scheduler"/>
+ <statistic name="SumTimeToStartCum" type="uint64" unit="seconds"
+ desc="Sum of job wait times to first start, over the lifetime of the Scheduler"/>
+ <statistic name="SumRunningTimeCum" type="uint64" unit="seconds"
+ desc="Sum of job running times, over the lifetime of the Scheduler"/>
+ <statistic name="MeanTimeToStart" type="double" unit="seconds"
+ desc="Mean time a job waits in the Scheduler until first start, over most recent sampling window"/>
+ <statistic name="MeanRunningTime" type="double" unit="seconds"
+ desc="Mean running time (wall-clock) time of jobs in the Scheduler, over most recent sampling window"/>
+
<method name="SubmitJob">
<arg name="Ad" dir="I" type="map"/>
<arg name="Id" dir="O" type="sstr"/>
13 years, 1 month
r4682 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-04 19:16:48 +0000 (Mon, 04 Apr 2011)
New Revision: 4682
Modified:
trunk/cumin/python/cumin/grid/quota.py
Log:
Make the group quota column right aligned
Modified: trunk/cumin/python/cumin/grid/quota.py
===================================================================
--- trunk/cumin/python/cumin/grid/quota.py 2011-04-04 14:54:46 UTC (rev 4681)
+++ trunk/cumin/python/cumin/grid/quota.py 2011-04-04 19:16:48 UTC (rev 4682)
@@ -143,6 +143,7 @@
task = frame.edit_dynamic_quota
col = self.DynamicColumn(app, "dynamic", cls.Quota, None, negotiator, task, self.group_helper)
+ col.align = "right"
self.add_column(col)
self.enable_csv_export(negotiator)
@@ -253,3 +254,6 @@
href = self.task.get_href(session)
content = "%s%%" % str(round(fval * 100.0, 2))
return fmt_link(href, content, "", "", self.fmt_hover(""))
+
+ def render_text_align(self, session):
+ return "right"
13 years, 1 month
r4681 - trunk/cumin/bin
by tmckay@fedoraproject.org
Author: tmckay
Date: 2011-04-04 14:54:46 +0000 (Mon, 04 Apr 2011)
New Revision: 4681
Modified:
trunk/cumin/bin/cumin-database
Log:
Use of condstop was introduced to fix a problem with Postgresql 8.1.22 but
later versions of Postgresql do not have condstop and the script will fail.
Use condrestart instead, which avoids the problem of restarting a stopped
service but will still cause changes by configure to take effect if Postgresql
is already running prior to configure.
Modified: trunk/cumin/bin/cumin-database
===================================================================
--- trunk/cumin/bin/cumin-database 2011-04-01 18:18:01 UTC (rev 4680)
+++ trunk/cumin/bin/cumin-database 2011-04-04 14:54:46 UTC (rev 4681)
@@ -203,15 +203,14 @@
check-initialized || exit 1
# The postgresql 8.1.22 init script violates LSB 3.1 Chapter 20.2,
- # and returns 1 on a successful restart of a stopped service. A
- # proper restart is thus simulated with condstop and start.
+ # and returns 1 on a successful restart of a stopped service.
+ # Use condrestart to skip restart of stopped service.
# Apparently condstop sometimes fails. Try up to 5 times.
- retry "/sbin/service postgresql condstop" 5 || {
+ retry "/sbin/service postgresql condrestart" 5 || {
echo "postgres restart failed"
exit 1
}
- /sbin/service postgresql start
}
function initialize {
@@ -391,10 +390,12 @@
configure)
configure && {
echo "The database server is configured"
- echo -e "\nAfter configuration the server must be restarted."
- echo -e "Would you like to restart the server now?\n"
- get-explicit-confirmation
- restart
+ /sbin/service postgresql status &> /dev/null && {
+ echo -e "\nAfter configuration the server must be restarted."
+ echo -e "Would you like to restart the server now?\n"
+ get-explicit-confirmation
+ restart
+ }
}
;;
create)
13 years, 1 month
r4680 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-01 18:18:01 +0000 (Fri, 01 Apr 2011)
New Revision: 4680
Modified:
trunk/cumin/python/cumin/grid/job.py
Log:
For BZ 692653 - When a job is removed, display the submission list page
Modified: trunk/cumin/python/cumin/grid/job.py
===================================================================
--- trunk/cumin/python/cumin/grid/job.py 2011-04-01 17:33:37 UTC (rev 4679)
+++ trunk/cumin/python/cumin/grid/job.py 2011-04-01 18:18:01 UTC (rev 4680)
@@ -947,6 +947,18 @@
def get_title(self, session):
return "Remove Job"
+ def do_enter(self, session, osession):
+ super(JobRemove, self).do_enter(session, osession)
+
+ nsession = osession.branch()
+
+ # return to the submission list page
+ job_list = self.frame.parent
+ submission_list = job_list.parent
+ submission_list.view.show(nsession)
+
+ self.form.return_url.set(session, nsession.marshal())
+
class JobSetAttribute(ObjectFrameTask):
def get_title(self, session):
pass
13 years, 1 month
r4679 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-01 17:33:37 +0000 (Fri, 01 Apr 2011)
New Revision: 4679
Modified:
trunk/cumin/python/cumin/grid/job.py
Log:
Return to the submission list when removing all remaining jobs in a submission
Modified: trunk/cumin/python/cumin/grid/job.py
===================================================================
--- trunk/cumin/python/cumin/grid/job.py 2011-04-01 17:32:23 UTC (rev 4678)
+++ trunk/cumin/python/cumin/grid/job.py 2011-04-01 17:33:37 UTC (rev 4679)
@@ -322,6 +322,21 @@
def get_title(self, session):
return "Remove"
+ def do_enter(self, session, osession):
+ super(JobSelectionRemove, self).do_enter(session, osession)
+
+ # if all the jobs in this submission are to be removed
+ # return to the submission list instead of this submission page
+ selected_count = len(self.selector.table.ids.get(osession))
+ total = self.selector.table.get_count(osession)
+ if selected_count == total:
+ nsession = osession.branch()
+ frame = self.selector.frame.parent
+ frame.view.show(nsession)
+ submission_list_url = nsession.marshal()
+
+ self.form.return_url.set(session, submission_list_url)
+
class JobObjectSelectorTaskForm(ObjectSelectorTaskForm):
def __init__(self, app, name, task, verb):
super(JobObjectSelectorTaskForm, self).__init__(app, name, task)
13 years, 1 month
r4678 - in trunk/cumin/python/cumin: grid usergrid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-01 17:32:23 +0000 (Fri, 01 Apr 2011)
New Revision: 4678
Modified:
trunk/cumin/python/cumin/grid/negotiator.py
trunk/cumin/python/cumin/grid/submission.py
trunk/cumin/python/cumin/usergrid/widgets.py
Log:
Remove the unneeded checkboxes from the submissions list
Modified: trunk/cumin/python/cumin/grid/negotiator.py
===================================================================
--- trunk/cumin/python/cumin/grid/negotiator.py 2011-04-01 13:08:52 UTC (rev 4677)
+++ trunk/cumin/python/cumin/grid/negotiator.py 2011-04-01 17:32:23 UTC (rev 4678)
@@ -55,7 +55,6 @@
# avoid the checkboxes
return ObjectTable(app, name, cls)
-
class GroupHelper(Widget):
def __init__(self, app, name, negotiator):
super(GroupHelper, self).__init__(app, name)
Modified: trunk/cumin/python/cumin/grid/submission.py
===================================================================
--- trunk/cumin/python/cumin/grid/submission.py 2011-04-01 13:08:52 UTC (rev 4677)
+++ trunk/cumin/python/cumin/grid/submission.py 2011-04-01 17:32:23 UTC (rev 4678)
@@ -7,7 +7,7 @@
from cumin.objectframe import ObjectFrame
from cumin.sqladapter import ObjectSqlAdapter
from cumin.objectselector import ObjectSelector, ObjectLinkColumn,\
- ObjectTableColumn
+ ObjectTableColumn, ObjectTable
from cumin.task import TaskLink, Task, ObjectTaskForm
from cumin.parameters import ObjectAttribute
@@ -75,6 +75,10 @@
self.add_attribute_column(cls.Completed)
self.add_attribute_column(cls.Held)
+ def create_table(self, app, name, cls):
+ # avoid the checkboxes
+ return ObjectTable(app, name, cls)
+
class PoolSubmissionSelector(SubmissionSelector):
def __init__(self, app, name, pool):
super(PoolSubmissionSelector, self).__init__(app, name)
@@ -86,12 +90,12 @@
frame = "main.grid.submission"
col = ObjectLinkColumn(app, "name", self.cls.Name, self.cls._id, frame)
- self.insert_column(1, col)
+ self.insert_column(0, col)
self.add_search_filter(col)
attr = self.cls.Owner
col = ObjectTableColumn(app, attr.name, attr)
- self.insert_column(2, col)
+ self.insert_column(1, col)
link = self.PoolSubmitLink(app, "job_submit", app.grid.job_submit)
self.links.add_child(link)
@@ -119,7 +123,7 @@
frame = "main.grid.scheduler"
col = self.SchedulerColumn(app, "Scheduler", scheduler.Name, scheduler._id, frame)
- self.insert_column(3, col)
+ self.insert_column(2, col)
self.enable_csv_export(pool)
Modified: trunk/cumin/python/cumin/usergrid/widgets.py
===================================================================
--- trunk/cumin/python/cumin/usergrid/widgets.py 2011-04-01 13:08:52 UTC (rev 4677)
+++ trunk/cumin/python/cumin/usergrid/widgets.py 2011-04-01 17:32:23 UTC (rev 4678)
@@ -113,7 +113,7 @@
frame = "main.submissions.submission"
col = ObjectLinkColumn(app, "name", self.cls.Name, self.cls._id, frame)
- self.insert_column(1, col)
+ self.insert_column(0, col)
self.add_search_filter(col)
link = TaskLink(app, "job_submit", app.grid.job_submit)
13 years, 1 month
r4677 - trunk/wooly/python/wooly
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-01 13:08:52 +0000 (Fri, 01 Apr 2011)
New Revision: 4677
Modified:
trunk/wooly/python/wooly/widgets.strings
Log:
Use full class list for TabbedModeSet
Modified: trunk/wooly/python/wooly/widgets.strings
===================================================================
--- trunk/wooly/python/wooly/widgets.strings 2011-03-31 18:05:25 UTC (rev 4676)
+++ trunk/wooly/python/wooly/widgets.strings 2011-04-01 13:08:52 UTC (rev 4677)
@@ -44,8 +44,8 @@
}
[TabbedModeSet.html]
-<ul class="TabbedModeSet tabs">{tabs}</ul>
-<div class="TabbedModeSet mode">{content}</div>
+<ul class="{class} tabs">{tabs}</ul>
+<div class="{class} mode">{content}</div>
[TabbedModeSet.tab_html]
<li><a href="{tab_href}" {tab_class}>{tab_content}</a></li>
13 years, 1 month