rhmessaging commits: r4307 - mgmt/newdata/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-09-20 11:21:18 -0400 (Mon, 20 Sep 2010)
New Revision: 4307
Modified:
mgmt/newdata/cumin/resources/open-flash-chart.swf
Log:
Fix BZ 635206: json parser for open flash chart couldn't handle True or False values.
Modified: mgmt/newdata/cumin/resources/open-flash-chart.swf
===================================================================
(Binary files differ)
15 years, 7 months
rhmessaging commits: r4306 - in mgmt/newdata/cumin/python/cumin: messaging and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-09-17 16:58:32 -0400 (Fri, 17 Sep 2010)
New Revision: 4306
Modified:
mgmt/newdata/cumin/python/cumin/messaging/queue.py
mgmt/newdata/cumin/python/cumin/widgets.py
Log:
Fix BZ 634971: Couldn't move messages across queues
Modified: mgmt/newdata/cumin/python/cumin/messaging/queue.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/messaging/queue.py 2010-09-17 18:03:57 UTC (rev 4305)
+++ mgmt/newdata/cumin/python/cumin/messaging/queue.py 2010-09-17 20:58:32 UTC (rev 4306)
@@ -553,11 +553,12 @@
def __init__(self, app, name, form, param):
super(QueueSelectField, self).__init__(app, name)
+ self.org_param = param
self.param = self.QueueSearchInputSet(app, "queue_set", param)
self.add_child(self.param)
def get(self, session):
- return self.param.get(session)
+ return self.org_param.get(session)
def render_title(self, session):
return "Queue"
@@ -579,7 +580,7 @@
vhostid = vhost._id
queues = cls.get_selection(session.cursor, _vhostRef_id=vhostid)
queue_list_full = sorted_by(list(queues))
- delta = timedelta(minutes=10)
+ delta = timedelta(days=3)
queue_list = []
for _queue in queue_list_full:
if _queue._qmf_update_time > (datetime.now() - delta):
@@ -625,8 +626,9 @@
self.src_queue = src_queue
self.add_field(src_queue)
- queue = QueueParameter(app, "dqueue")
- self.dest_queue = self.QueueDestField(app, "dest", self, queue)
+ self.dqueue = StringParameter(app, "dqueue")
+ self.add_parameter(self.dqueue)
+ self.dest_queue = self.QueueDestField(app, "dest", self, self.dqueue)
self.dest_queue.required = True
self.add_field(self.dest_queue)
@@ -663,10 +665,11 @@
class MoveMessagesForm(MoveMessagesFormBase):
def __init__(self, app, name, task):
- queue = QueueParameter(app, "queue")
- src_queue = self.QueueSrctField(app, "src", self, queue)
+ self.squeue = StringParameter(app, "queue")
+ src_queue = self.QueueSrctField(app, "src", self, self.squeue)
src_queue.required = True
super(MoveMessagesForm, self).__init__(app, name, task, src_queue)
+ self.add_parameter(self.squeue)
class QueueSrctField(QueueSelectField):
def render_title(self, session):
Modified: mgmt/newdata/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/widgets.py 2010-09-17 18:03:57 UTC (rev 4305)
+++ mgmt/newdata/cumin/python/cumin/widgets.py 2010-09-17 20:58:32 UTC (rev 4306)
@@ -1493,7 +1493,7 @@
if not self.disabled:
obj_list_full = sorted_by(list(objects))
- delta = timedelta(minutes=10)
+ delta = timedelta(days=3)
for _obj in obj_list_full:
if (_obj._qmf_update_time > (datetime.now() - delta)):
obj_list.append(_obj)
15 years, 7 months
rhmessaging commits: r4305 - mgmt/newdata/cumin/python/cumin/messaging.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-09-17 14:03:57 -0400 (Fri, 17 Sep 2010)
New Revision: 4305
Modified:
mgmt/newdata/cumin/python/cumin/messaging/binding.py
Log:
Fix BZ 634874: Remove binding invocation code was outdated.
Also fixed a problem when displaying remove binding form (single binding, not selection). A binding has no name attribute so the form contents was blank.
Modified: mgmt/newdata/cumin/python/cumin/messaging/binding.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/messaging/binding.py 2010-09-17 15:00:22 UTC (rev 4304)
+++ mgmt/newdata/cumin/python/cumin/messaging/binding.py 2010-09-17 18:03:57 UTC (rev 4305)
@@ -20,14 +20,32 @@
return "Remove"
def do_invoke(self, invoc, binding):
- assert isinstance(binding, Binding)
+ assert isinstance(binding, RosemaryObject)
- session = self.app.model.get_session_by_object(binding)
- session.exchange_unbind(queue=binding.queue.name,
- exchange=binding.exchange.name,
- binding_key=binding.bindingKey)
- session.sync()
+ conn = self.app.database.get_connection()
+ cursor = conn.cursor()
+ queue = None
+ exchange = None
+ try:
+ cls = self.app.model.org_apache_qpid_broker.Queue
+ queue = cls.get_object_by_id(cursor, binding._queueRef_id)
+ cls = self.app.model.org_apache_qpid_broker.Exchange
+ exchange = cls.get_object_by_id(cursor, binding._exchangeRef_id)
+ except Exception, e:
+ invoc.status = "failed"
+ invoc.exception = e
+ log.exception(e)
+ finally:
+ conn.close()
+
+ if queue and exchange:
+ session = self.app.model.get_session_by_object(binding)
+ session.exchange_unbind(queue=queue.name,
+ exchange=exchange.name,
+ binding_key=binding.bindingKey)
+ session.sync()
+
invoc.end()
class BindingFrame(ObjectFrame):
@@ -55,19 +73,51 @@
invoc.end()
+class BindingRemoveForm(ObjectFrameTaskForm):
+ def render_content(self, session):
+ # binding doesn't have a name, use the binding key
+ obj = self.object.get(session)
+ return obj.bindingKey
+
class BindingRemove(ObjectFrameTask):
+ def __init__(self, app, frame):
+ super(BindingRemove, self).__init__(app, frame)
+
+ self.form = BindingRemoveForm(app, self.name, self)
+
def get_title(self, session):
return "Remove"
+ def do_exit(self, session):
+ self.app.main_page.main.messaging.broker.view.show(session)
+
def do_invoke(self, invoc, binding):
- assert isinstance(binding, Binding)
+ assert isinstance(binding, RosemaryObject)
- session = self.app.model.get_session_by_object(binding)
- session.exchange_unbind(queue=binding.queue.name,
- exchange=binding.exchange.name,
- binding_key=binding.bindingKey)
- session.sync()
+ conn = self.app.database.get_connection()
+ cursor = conn.cursor()
+ queue = None
+ exchange = None
+ try:
+ cls = self.app.model.org_apache_qpid_broker.Queue
+ queue = cls.get_object_by_id(cursor, binding._queueRef_id)
+ cls = self.app.model.org_apache_qpid_broker.Exchange
+ exchange = cls.get_object_by_id(cursor, binding._exchangeRef_id)
+ except Exception, e:
+ invoc.status = "failed"
+ invoc.exception = e
+ log.exception(e)
+ finally:
+ conn.close()
+
+ if queue and exchange:
+ session = self.app.model.get_session_by_object(binding)
+ session.exchange_unbind(queue=queue.name,
+ exchange=exchange.name,
+ binding_key=binding.bindingKey)
+ session.sync()
+
invoc.end()
class BindingData(ObjectSqlAdapter):
15 years, 7 months
rhmessaging commits: r4304 - mgmt/newdata/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-09-17 11:00:22 -0400 (Fri, 17 Sep 2010)
New Revision: 4304
Modified:
mgmt/newdata/cumin/python/cumin/grid/scheduler.py
Log:
Fix for BZ 633948: Correct the linkage from submission to scheduler by using Submission->JobServer->Scheduler.
Modified: mgmt/newdata/cumin/python/cumin/grid/scheduler.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/scheduler.py 2010-09-17 14:35:35 UTC (rev 4303)
+++ mgmt/newdata/cumin/python/cumin/grid/scheduler.py 2010-09-17 15:00:22 UTC (rev 4304)
@@ -33,10 +33,12 @@
overview = SchedulerOverview(app, "overview", self.object)
self.view.add_tab(overview)
- submissions = PoolSubmissionSelector(app, "submissions", pool)
+ submissions = SchedulerPoolSubmissionSelector(app, "submissions", pool)
self.view.add_tab(submissions)
cls = submissions.cls
+ # We are referencing the jobserverRef, but passing in the scheduler id.
+ # This gets fixed up in SchedulerPoolSubmissionSelectorget_data_value
submissions.add_reference_filter(self.object, cls.jobserverRef)
submitters = SubmitterSelector(app, "submitters", self.object)
@@ -45,6 +47,26 @@
self.start = DaemonStart(app, self, "SCHEDD")
self.stop = DaemonStop(app, self, "SCHEDD")
+class SchedulerPoolSubmissionSelector(PoolSubmissionSelector):
+ def get_data_values(self, session):
+ values = super(SchedulerPoolSubmissionSelector, self).get_data_values(session)
+
+ jobserver_key = self.cls.jobserverRef.name
+
+ # could also use self.frame.id.get(session)
+ scheduler_id = values[jobserver_key]
+
+ #we need to find the _id of the jobServer whose _schedulerRef_id matches our scheduler
+ cls = self.app.model.com_redhat_grid.JobServer
+ job_server = cls.get_object(session.cursor, _schedulerRef_id=scheduler_id)
+
+ # Awkward: if there is no jobserver for this scheduler, don't select any records.
+ # An alternative is to create our own adapter and override the get_data method
+ jobserver_id = job_server and job_server._id or -1
+
+ values[jobserver_key] = jobserver_id
+ return values
+
class SchedulerSelector(ObjectSelector):
def __init__(self, app, name, pool):
cls = app.model.com_redhat_grid.Scheduler
15 years, 7 months
rhmessaging commits: r4303 - mgmt/newdata/cumin/bin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-09-17 10:35:35 -0400 (Fri, 17 Sep 2010)
New Revision: 4303
Modified:
mgmt/newdata/cumin/bin/cumin
Log:
A patch from Jan to avoid the superfluous sleep loop; rename pid vars to reflect new executable names
Modified: mgmt/newdata/cumin/bin/cumin
===================================================================
--- mgmt/newdata/cumin/bin/cumin 2010-09-17 12:29:06 UTC (rev 4302)
+++ mgmt/newdata/cumin/bin/cumin 2010-09-17 14:35:35 UTC (rev 4303)
@@ -1,18 +1,15 @@
#!/bin/bash
function die {
- kill "$mpid"
- kill "$cpid"
+ kill "$data" "$web"
}
trap die EXIT
cumin-data &
-mpid="$!"
+data="$!"
cumin-web &
-cpid="$!"
+web="$!"
-while :; do
- sleep 10
-done
+wait
15 years, 7 months
rhmessaging commits: r4302 - in mgmt/newdata/cumin/python/cumin: messaging and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-09-17 08:29:06 -0400 (Fri, 17 Sep 2010)
New Revision: 4302
Modified:
mgmt/newdata/cumin/python/cumin/messaging/brokerlink.py
mgmt/newdata/cumin/python/cumin/session.py
Log:
Fix 234180: The method name for removing a broker link is "close" not remove.
The attribute values used to construct the object id for v1 object need to be converted to strings before they are joined.
Modified: mgmt/newdata/cumin/python/cumin/messaging/brokerlink.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/messaging/brokerlink.py 2010-09-16 19:10:21 UTC (rev 4301)
+++ mgmt/newdata/cumin/python/cumin/messaging/brokerlink.py 2010-09-17 12:29:06 UTC (rev 4302)
@@ -37,7 +37,7 @@
self.app.main_page.main.messaging.broker.view.show(session)
def do_invoke(self, invoc, link):
- self.qmf_call(invoc, link, "remove")
+ self.qmf_call(invoc, link, "close")
class BrokerLinkSelector(ObjectSelector):
def __init__(self, app, name, vhost):
@@ -67,7 +67,7 @@
return "Remove"
def do_invoke(self, invoc, link):
- self.qmf_call(invoc, link, "remove")
+ self.qmf_call(invoc, link, "close")
class RouteSelector(ObjectSelector):
def __init__(self, app, name, link):
Modified: mgmt/newdata/cumin/python/cumin/session.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/session.py 2010-09-16 19:10:21 UTC (rev 4301)
+++ mgmt/newdata/cumin/python/cumin/session.py 2010-09-17 12:29:06 UTC (rev 4302)
@@ -84,7 +84,7 @@
key = obj.name
else:
- key_args = [getattr(obj, x.name)
+ key_args = [str(getattr(obj, x.name))
for x in obj._class._attributes
if x.index and not x.references]
key = ",".join(key_args)
15 years, 7 months
rhmessaging commits: r4301 - mgmt/newdata/mint/python/mint.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-09-16 15:10:21 -0400 (Thu, 16 Sep 2010)
New Revision: 4301
Modified:
mgmt/newdata/mint/python/mint/session.py
Log:
Further testing and a conversation with Ken convinced me that the
extra heartbeat processing cumin was doing was unnecessary and simply
a scale liability, albeit not a large one.
Modified: mgmt/newdata/mint/python/mint/session.py
===================================================================
--- mgmt/newdata/mint/python/mint/session.py 2010-09-16 18:29:02 UTC (rev 4300)
+++ mgmt/newdata/mint/python/mint/session.py 2010-09-16 19:10:21 UTC (rev 4301)
@@ -37,7 +37,7 @@
manageConnections=True,
rcvObjects=True,
rcvEvents=False,
- rcvHeartbeats=True,
+ rcvHeartbeats=False,
userBindings=True)
self.qmf_session.bindAgent("*")
15 years, 7 months
rhmessaging commits: r4300 - mgmt/newdata/rosemary/python/rosemary.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-09-16 14:29:02 -0400 (Thu, 16 Sep 2010)
New Revision: 4300
Modified:
mgmt/newdata/rosemary/python/rosemary/model.py
Log:
Fix BZ 633946. Make class reference attribute name match the object's attribute name
Modified: mgmt/newdata/rosemary/python/rosemary/model.py
===================================================================
--- mgmt/newdata/rosemary/python/rosemary/model.py 2010-09-16 15:28:26 UTC (rev 4299)
+++ mgmt/newdata/rosemary/python/rosemary/model.py 2010-09-16 18:29:02 UTC (rev 4300)
@@ -589,6 +589,7 @@
raise
name = "_%s_id" % self.name
+ self.name = name
col = SqlColumn(self.cls.sql_table, name, sql_int8)
col.foreign_key_column = self.that_cls.sql_table.key_column
15 years, 7 months
rhmessaging commits: r4299 - mgmt/newdata/mint/python/mint.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-09-16 11:28:26 -0400 (Thu, 16 Sep 2010)
New Revision: 4299
Modified:
mgmt/newdata/mint/python/mint/main.py
mgmt/newdata/mint/python/mint/session.py
Log:
Scale enhancement from recent analysis; speed up the path to inject updates
Modified: mgmt/newdata/mint/python/mint/main.py
===================================================================
--- mgmt/newdata/mint/python/mint/main.py 2010-09-16 14:31:37 UTC (rev 4298)
+++ mgmt/newdata/mint/python/mint/main.py 2010-09-16 15:28:26 UTC (rev 4299)
@@ -17,7 +17,6 @@
self.session = MintSession(self, broker_uris)
self.database = MintDatabase(self, database_dsn)
- self.update_enabled = True
self.update_thread = UpdateThread(self)
self.expire_enabled = True
@@ -43,7 +42,6 @@
def state(cond):
return cond and "enabled" or "disabled"
- log.info("Updates are %s", state(self.update_enabled))
log.info("Expiration is %s", state(self.expire_enabled))
log.info("Vacuum is %s", state(self.vacuum_enabled))
@@ -58,11 +56,10 @@
def start(self):
log.info("Starting %s", self)
+ self.update_thread.start()
+
self.session.start()
- if self.update_enabled:
- self.update_thread.start()
-
if self.expire_enabled:
self.expire_thread.start()
Modified: mgmt/newdata/mint/python/mint/session.py
===================================================================
--- mgmt/newdata/mint/python/mint/session.py 2010-09-16 14:31:37 UTC (rev 4298)
+++ mgmt/newdata/mint/python/mint/session.py 2010-09-16 15:28:26 UTC (rev 4299)
@@ -35,7 +35,7 @@
self.qmf_session = Session(MintConsole(self.app.model),
manageConnections=True,
- rcvObjects=self.app.update_enabled,
+ rcvObjects=True,
rcvEvents=False,
rcvHeartbeats=True,
userBindings=True)
@@ -82,9 +82,6 @@
def delAgent(self, qmf_agent):
self.model.print_event(3, "Deleting %s", qmf_agent)
- if not self.model.app.update_thread.isAlive():
- return
-
up = AgentDelete(self.model, qmf_agent)
self.model.app.update_thread.enqueue(up)
@@ -92,9 +89,6 @@
message = "Heartbeat from %s at %s"
self.model.print_event(5, message, qmf_agent, timestamp)
- if not self.model.app.update_thread.isAlive():
- return
-
up = AgentUpdate(self.model, qmf_agent)
self.model.app.update_thread.enqueue(up)
@@ -105,16 +99,10 @@
self.model.print_event(2, "New class %s", classKey)
def objectProps(self, broker, qmf_object):
- if not self.model.app.update_thread.isAlive():
- return
-
up = ObjectUpdate(self.model, qmf_object)
self.model.app.update_thread.enqueue(up)
def objectStats(self, broker, qmf_object):
- if not self.model.app.update_thread.isAlive():
- return
-
up = ObjectUpdate(self.model, qmf_object)
self.model.app.update_thread.enqueue(up)
15 years, 7 months
rhmessaging commits: r4298 - mgmt/newdata/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-09-16 10:31:37 -0400 (Thu, 16 Sep 2010)
New Revision: 4298
Modified:
mgmt/newdata/cumin/python/cumin/model.py
Log:
Fixed BZ 471625: Put the JobUniverse ad under the Main group and translated the integer value to a string.
Modified: mgmt/newdata/cumin/python/cumin/model.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/model.py 2010-09-16 10:45:52 UTC (rev 4297)
+++ mgmt/newdata/cumin/python/cumin/model.py 2010-09-16 14:31:37 UTC (rev 4298)
@@ -1405,6 +1405,12 @@
prop.description = "Submission name"
prop.writable = False
+ prop = self.JobUniverse(self, "JobUniverse")
+ prop.group = "Main"
+ prop.title = "Job Universe"
+ prop.writable = False
+ prop.renderer = prop.render_universe
+
### Condor Info Group
prop = AdProperty(self, "CondorVersion")
prop.group = "Condor Info"
@@ -1542,6 +1548,22 @@
def render_status(self, session, status):
return JobStatusInfo.get_status_string(status)
+ class JobUniverse(AdProperty):
+ universes = {None: "Default",
+ 5: "Vanilla",
+ 7: "Scheduler",
+ 9: "Grid",
+ 10: "Java",
+ 11: "Parallel",
+ 12: "Local",
+ 13: "VM"}
+
+ def render_universe(self, session, value):
+ try:
+ return self.universes[value]
+ except KeyError:
+ return "Unknown (%s)" % str(value)
+
class GetStartedAction(CuminAction):
def get_xml_response(self, session, object, *args):
updateTime = object.statsCurr and object.statsCurr.qmfUpdateTime \
15 years, 7 months