rhmessaging commits: r2496 - in store/branches/mrg-1.0/cpp/lib: jrnl and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-09-18 13:31:21 -0400 (Thu, 18 Sep 2008)
New Revision: 2496
Modified:
store/branches/mrg-1.0/cpp/lib/BdbMessageStore.cpp
store/branches/mrg-1.0/cpp/lib/BdbMessageStore.h
store/branches/mrg-1.0/cpp/lib/JournalImpl.cpp
store/branches/mrg-1.0/cpp/lib/jrnl/rmgr.cpp
Log:
Fix for BZ458053: "txtest failures when broker killed during transfer phase". Fixed problem with certain out-of-order libaio read returns in the read pipeline which causes this bug.
Modified: store/branches/mrg-1.0/cpp/lib/BdbMessageStore.cpp
===================================================================
--- store/branches/mrg-1.0/cpp/lib/BdbMessageStore.cpp 2008-09-18 14:49:51 UTC (rev 2495)
+++ store/branches/mrg-1.0/cpp/lib/BdbMessageStore.cpp 2008-09-18 17:31:21 UTC (rev 2496)
@@ -615,11 +615,14 @@
try
{
+ long rcnt = 0L; // recovered msg count
+ long idcnt = 0L; // in-doubt msg count
u_int64_t thisHighestRid = 0;
jQueue->recover(numJrnlFiles, jrnlFsizeSblks, wCacheNumPages, wCachePgSizeSblks, &prepared, thisHighestRid, key.id); // start recovery
if (thisHighestRid > highestRid)
highestRid = thisHighestRid;
- recoverMessages(txn, registry, queue, prepared, messages);
+ recoverMessages(txn, registry, queue, prepared, messages, rcnt, idcnt);
+ QPID_LOG(info, "Recovered queue \"" << queueName << "\": " << rcnt << " messages recovered; " << idcnt << " messages in-doubt.");
jQueue->recover_complete(); // start journal.
} catch (const journal::jexception& e) {
THROW_STORE_EXCEPTION(std::string("Queue ") + queueName + ": recoverQueues() failed: " + e.what());
@@ -722,7 +725,9 @@
qpid::broker::RecoveryManager& recovery,
qpid::broker::RecoverableQueue::shared_ptr& queue,
txn_list& prepared,
- message_index& messages)
+ message_index& messages,
+ long& rcnt,
+ long& idcnt)
{
size_t preambleLength = sizeof(u_int32_t)/*header size*/;
@@ -778,6 +783,7 @@
PreparedTransaction::list::iterator i = PreparedTransaction::getLockedPreparedTransaction(prepared, queue->getPersistenceId(), dtokp.rid());
if (i == prepared.end()) { // not in prepared list
+ rcnt++;
queue->recover(msg);
} else {
u_int64_t rid = dtokp.rid();
@@ -785,13 +791,14 @@
TplRecoverMapCitr citr = tplRecoverMap.find(xid);
if (citr == tplRecoverMap.end()) THROW_STORE_EXCEPTION("XID not found in tplRecoverMap");
- // deq present in prepared list, this xid is part of incomplete txn commit/abort
+ // deq present in prepared list: this xid is part of incomplete txn commit/abort
// or this is a 1PC txn that must be rolled forward
if (citr->second.deq_flag || !citr->second.tpc_flag) {
if (jc->is_enqueued(rid, true)) {
// Enqueue is non-tx, dequeue tx
assert(jc->is_locked(rid)); // This record MUST be locked by a txn dequeue
if (!citr->second.commit_flag) {
+ rcnt++;
queue->recover(msg); // recover message in abort case only
}
} else {
@@ -805,10 +812,12 @@
else if (!j->_enq_flag && j->_drid == rid) deq = true;
}
if (enq && !deq && citr->second.commit_flag) {
+ rcnt++;
queue->recover(msg); // recover txn message in commit case only
}
}
} else {
+ idcnt++;
messages[rid] = msg;
}
}
Modified: store/branches/mrg-1.0/cpp/lib/BdbMessageStore.h
===================================================================
--- store/branches/mrg-1.0/cpp/lib/BdbMessageStore.h 2008-09-18 14:49:51 UTC (rev 2495)
+++ store/branches/mrg-1.0/cpp/lib/BdbMessageStore.h 2008-09-18 17:31:21 UTC (rev 2496)
@@ -140,7 +140,9 @@
qpid::broker::RecoveryManager& recovery,
qpid::broker::RecoverableQueue::shared_ptr& queue,
txn_list& locked,
- message_index& prepared);
+ message_index& prepared,
+ long& rcnt,
+ long& idcnt);
qpid::broker::RecoverableMessage::shared_ptr getExternMessage(qpid::broker::RecoveryManager& recovery,
uint64_t mId,
unsigned& headerSize);
Modified: store/branches/mrg-1.0/cpp/lib/JournalImpl.cpp
===================================================================
--- store/branches/mrg-1.0/cpp/lib/JournalImpl.cpp 2008-09-18 14:49:51 UTC (rev 2495)
+++ store/branches/mrg-1.0/cpp/lib/JournalImpl.cpp 2008-09-18 17:31:21 UTC (rev 2496)
@@ -88,7 +88,7 @@
agent->addObject(_mgmtObject);
}
- log(LOG_NOTICE, "Instantiation");
+ log(LOG_NOTICE, "Created");
std::ostringstream oss;
oss << "Journal directory = \"" << journalDirectory << "\"; Base file name = \"" << journalBaseFilename << "\"";
log(LOG_DEBUG, oss.str());
Modified: store/branches/mrg-1.0/cpp/lib/jrnl/rmgr.cpp
===================================================================
--- store/branches/mrg-1.0/cpp/lib/jrnl/rmgr.cpp 2008-09-18 14:49:51 UTC (rev 2495)
+++ store/branches/mrg-1.0/cpp/lib/jrnl/rmgr.cpp 2008-09-18 17:31:21 UTC (rev 2496)
@@ -135,7 +135,7 @@
aio_cycle(); // check if rd AIOs returned; initiate new reads if possible
if (_jc->unflushed_dblks() > 0)
_jc->flush();
- else
+ else if (!_aio_evt_rem)
return RHM_IORES_EMPTY;
}
if (_page_cb_arr[_pg_index]._state != AIO_COMPLETE)
@@ -373,7 +373,7 @@
aio_cycle(); // check if any AIOs have returned
if (_jc->unflushed_dblks() > 0)
_jc->flush();
- else
+ else if (!_aio_evt_rem)
return RHM_IORES_EMPTY;
}
17 years, 7 months
rhmessaging commits: r2495 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-09-18 10:49:51 -0400 (Thu, 18 Sep 2008)
New Revision: 2495
Modified:
mgmt/trunk/cumin/python/cumin/model.py
Log:
Force Value passed to SetAttribute to be a string.
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2008-09-17 18:45:15 UTC (rev 2494)
+++ mgmt/trunk/cumin/python/cumin/model.py 2008-09-18 14:49:51 UTC (rev 2495)
@@ -1793,7 +1793,9 @@
return "Save Ad for"
def do_invoke(self, job, args, completion):
- job.SetAttribute(self.cumin_model.data, completion, Name=args[0], Value=args[1])
+ Name = args[0]
+ Value = args[1]
+ job.SetAttribute(self.cumin_model.data, completion, Name, str(Value))
class CuminScheduler(RemoteClass):
def __init__(self, model):
17 years, 7 months
rhmessaging commits: r2494 - in mgmt/trunk/mint: sql and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-09-17 14:45:15 -0400 (Wed, 17 Sep 2008)
New Revision: 2494
Modified:
mgmt/trunk/mint/python/mint/schema.py
mgmt/trunk/mint/sql/schema.sql
Log:
Update to the latest condor schema
Modified: mgmt/trunk/mint/python/mint/schema.py
===================================================================
--- mgmt/trunk/mint/python/mint/schema.py 2008-09-17 18:11:12 UTC (rev 2493)
+++ mgmt/trunk/mint/python/mint/schema.py 2008-09-17 18:45:15 UTC (rev 2494)
@@ -535,6 +535,13 @@
location = StringCol(length=1000, default=None)
defaultInitialFileCount = SmallIntCol(default=None)
defaultDataFileSize = IntCol(default=None)
+ tplIsInitialized = BoolCol(default=None)
+ tplDirectory = StringCol(length=1000, default=None)
+ tplWritePageSize = IntCol(default=None)
+ tplWritePages = IntCol(default=None)
+ tplInitialFileCount = SmallIntCol(default=None)
+ tplDataFileSize = IntCol(default=None)
+ tplCurrentFileCount = IntCol(default=None)
class StoreStats(SQLObject):
@@ -544,6 +551,15 @@
recTime = TimestampCol(default=None)
store = ForeignKey('Store', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
+ tplTransactionDepth = IntCol(default=None)
+ tplTransactionDepthLow = IntCol(default=None)
+ tplTransactionDepthHigh = IntCol(default=None)
+ tplTxnPrepares = BigIntCol(default=None)
+ tplTxnCommits = BigIntCol(default=None)
+ tplTxnAborts = BigIntCol(default=None)
+ tplOutstandingAIOs = IntCol(default=None)
+ tplOutstandingAIOsLow = IntCol(default=None)
+ tplOutstandingAIOsHigh = IntCol(default=None)
@@ -561,14 +577,17 @@
statsCurr = ForeignKey('JournalStats', cascade='null', default=None)
statsPrev = ForeignKey('JournalStats', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
+ queue = ForeignKey('Queue', cascade='null', default=None)
name = StringCol(length=1000, default=None)
- queue = ForeignKey('Queue', cascade='null', default=None)
directory = StringCol(length=1000, default=None)
baseFileName = StringCol(length=1000, default=None)
writePageSize = IntCol(default=None)
writePages = IntCol(default=None)
readPageSize = IntCol(default=None)
readPages = IntCol(default=None)
+ initialFileCount = SmallIntCol(default=None)
+ dataFileSize = IntCol(default=None)
+ currentFileCount = IntCol(default=None)
def expand(self, model, callback, by):
@@ -588,14 +607,15 @@
recTime = TimestampCol(default=None)
journal = ForeignKey('Journal', cascade='null', default=None)
classInfos = dict() # brokerId => classInfo
- initialFileCount = SmallIntCol(default=None)
- dataFileSize = IntCol(default=None)
- currentFileCount = IntCol(default=None)
recordDepth = IntCol(default=None)
recordDepthLow = IntCol(default=None)
recordDepthHigh = IntCol(default=None)
- recordEnqueues = BigIntCol(default=None)
- recordDequeues = BigIntCol(default=None)
+ enqueues = BigIntCol(default=None)
+ dequeues = BigIntCol(default=None)
+ txnEnqueues = BigIntCol(default=None)
+ txnDequeues = BigIntCol(default=None)
+ txnCommits = BigIntCol(default=None)
+ txnAborts = BigIntCol(default=None)
outstandingAIOs = IntCol(default=None)
outstandingAIOsLow = IntCol(default=None)
outstandingAIOsHigh = IntCol(default=None)
@@ -780,6 +800,43 @@
conn.callMethod(originalId, classInfo, "GetAd",
callback, args=actualArgs)
+ def SetAttribute(self, model, callback, Name, Value):
+ actualArgs = dict()
+ actualArgs["Name"] = Name
+ actualArgs["Value"] = Value
+ conn = model.connections[self.managedBroker]
+ classInfo = self.classInfos[self.managedBroker]
+ originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
+ conn.callMethod(originalId, classInfo, "SetAttribute",
+ callback, args=actualArgs)
+
+ def Hold(self, model, callback, Reason):
+ actualArgs = dict()
+ actualArgs["Reason"] = Reason
+ conn = model.connections[self.managedBroker]
+ classInfo = self.classInfos[self.managedBroker]
+ originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
+ conn.callMethod(originalId, classInfo, "Hold",
+ callback, args=actualArgs)
+
+ def Release(self, model, callback, Reason):
+ actualArgs = dict()
+ actualArgs["Reason"] = Reason
+ conn = model.connections[self.managedBroker]
+ classInfo = self.classInfos[self.managedBroker]
+ originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
+ conn.callMethod(originalId, classInfo, "Release",
+ callback, args=actualArgs)
+
+ def Remove(self, model, callback, Reason):
+ actualArgs = dict()
+ actualArgs["Reason"] = Reason
+ conn = model.connections[self.managedBroker]
+ classInfo = self.classInfos[self.managedBroker]
+ originalId = objectId(None, self.sourceScopeId, self.sourceObjectId)
+ conn.callMethod(originalId, classInfo, "Remove",
+ callback, args=actualArgs)
+
class JobStats(SQLObject):
class sqlmeta:
lazyUpdate = True
Modified: mgmt/trunk/mint/sql/schema.sql
===================================================================
--- mgmt/trunk/mint/sql/schema.sql 2008-09-17 18:11:12 UTC (rev 2493)
+++ mgmt/trunk/mint/sql/schema.sql 2008-09-17 18:45:15 UTC (rev 2494)
@@ -283,28 +283,32 @@
managed_broker VARCHAR(1000),
stats_curr_id INT,
stats_prev_id INT,
+ queue_id INT,
name VARCHAR(1000),
- queue_id INT,
directory VARCHAR(1000),
base_file_name VARCHAR(1000),
write_page_size INT,
write_pages INT,
read_page_size INT,
- read_pages INT
+ read_pages INT,
+ initial_file_count SMALLINT,
+ data_file_size INT,
+ current_file_count INT
);
CREATE TABLE journal_stats (
id SERIAL PRIMARY KEY,
rec_time TIMESTAMP,
journal_id INT,
- initial_file_count SMALLINT,
- data_file_size INT,
- current_file_count INT,
record_depth INT,
record_depth_low INT,
record_depth_high INT,
- record_enqueues BIGINT,
- record_dequeues BIGINT,
+ enqueues BIGINT,
+ dequeues BIGINT,
+ txn_enqueues BIGINT,
+ txn_dequeues BIGINT,
+ txn_commits BIGINT,
+ txn_aborts BIGINT,
outstanding_ai_os INT,
outstanding_ai_os_low INT,
outstanding_ai_os_high INT,
@@ -593,13 +597,29 @@
broker_id INT,
location VARCHAR(1000),
default_initial_file_count SMALLINT,
- default_data_file_size INT
+ default_data_file_size INT,
+ tpl_is_initialized BOOL,
+ tpl_directory VARCHAR(1000),
+ tpl_write_page_size INT,
+ tpl_write_pages INT,
+ tpl_initial_file_count SMALLINT,
+ tpl_data_file_size INT,
+ tpl_current_file_count INT
);
CREATE TABLE store_stats (
id SERIAL PRIMARY KEY,
rec_time TIMESTAMP,
- store_id INT
+ store_id INT,
+ tpl_transaction_depth INT,
+ tpl_transaction_depth_low INT,
+ tpl_transaction_depth_high INT,
+ tpl_txn_prepares BIGINT,
+ tpl_txn_commits BIGINT,
+ tpl_txn_aborts BIGINT,
+ tpl_outstanding_ai_os INT,
+ tpl_outstanding_ai_os_low INT,
+ tpl_outstanding_ai_os_high INT
);
CREATE TABLE submitter (
17 years, 7 months
rhmessaging commits: r2493 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-09-17 14:11:12 -0400 (Wed, 17 Sep 2008)
New Revision: 2493
Modified:
mgmt/trunk/cumin/python/cumin/job.py
Log:
Setting and getting original property value to determine which properties were changed by the user.
Returning blank dict if GetAd times out.
Modified: mgmt/trunk/cumin/python/cumin/job.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/job.py 2008-09-17 18:08:41 UTC (rev 2492)
+++ mgmt/trunk/cumin/python/cumin/job.py 2008-09-17 18:11:12 UTC (rev 2493)
@@ -396,8 +396,9 @@
cls = self.app.model.get_class_by_object(job)
# wait for up to 20 seconds for completion to be called
- timedout = wait(predicate, timeout=20)
-
+ succeeded = wait(predicate, timeout=20)
+ if not succeeded:
+ self.job_ads = {"": ""}
# list of dictionaries
# each disctionary has:
# name:, value:, type: [, error:] [, property:] [,path:]
@@ -405,7 +406,7 @@
#TODO: handle case where completion status isn't OK
- def gen_item(self, name, value, cls, path=None, dtype=None, error=None):
+ def gen_item(self, name, value, cls, path=None, dtype=None, error=None, orig=None):
""" Generate a dict with name, value, type, error, path, property
This is called with raw GetAd data and with processed data from
@@ -417,6 +418,7 @@
idict = dict()
idict["name"] = name
idict["value"] = value
+ idict["orig"] = value
if dtype:
idict["type"] = dtype
if dtype == "number":
@@ -424,7 +426,9 @@
if nval:
idict["value"] = nval
else:
- idict["type"] = self.get_type(value)
+ idict["type"], idict["value"] = self.get_type(value)
+ if orig:
+ idict["orig"] = orig
if error:
if "error" in error:
idict["error"] = error["error"]
@@ -436,7 +440,17 @@
return idict
def get_type(self, value):
- return isinstance(value, int) and "number" or "string"
+ dvalue = value
+ if isinstance(value, int):
+ dtype = "number"
+ else:
+ dquote = value.split("\"")
+ if len(dquote) == 3 and (not dquote[0] and not dquote[2]):
+ dtype = "string"
+ dvalue = dquote[1]
+ else:
+ dtype = "expression"
+ return dtype, dvalue
class JobPropertyRenderer(TemplateRenderer):
def render_title(self, session, item):
@@ -531,7 +545,7 @@
ads = self.ads.get(session)
if len(ads):
return [self.gen_item(x, ads[x]["value"], cls, path=self.ads.path,
- dtype=ads[x]["type"], error=ads[x]) for x in ads
+ dtype=ads[x]["type"], error=ads[x], orig=ads[x]["orig"]) for x in ads
if self.is_group(x, cls, group)]
else:
items = super(JobAdsEditor, self).do_get_items(session, args)
@@ -564,13 +578,21 @@
if fval is None:
ads[field]["error"] = "Numeric value expected"
errors = True
+ elif ftype == "string":
+ fval = "\"%s\"" % fval
else:
fval = unicode(fval)
- just_ads[unicode(field)] = fval
+ if "orig" in ads[field]:
+ orig = ads[field]["orig"]
+ if ftype == "number":
+ orig = convertStr(orig)
+ if fval != orig:
+ just_ads[unicode(field)] = fval
if not errors:
- action = self.app.model.job.savead
- action.invoke(job, just_ads)
+ for field in just_ads:
+ action = self.app.model.job.setattribute
+ action.invoke(job, [field, just_ads[field]])
self.process_cancel(session, job)
class JobOutput(Form):
17 years, 7 months
rhmessaging commits: r2492 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-09-17 14:08:41 -0400 (Wed, 17 Sep 2008)
New Revision: 2492
Modified:
mgmt/trunk/cumin/python/cumin/model.py
Log:
changing name of SaveAd to SetAttribute and passing Name and Value instead of dict.
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2008-09-17 18:07:44 UTC (rev 2491)
+++ mgmt/trunk/cumin/python/cumin/model.py 2008-09-17 18:08:41 UTC (rev 2492)
@@ -1686,14 +1686,14 @@
action = self.Remove(self, "remove")
action.summary = True
- action = self.SaveAd(self, "savead")
+ action = self.SetAttribute(self, "setattribute")
action.navigable = False
def get_title(self, session):
return "Job"
def get_object_name(self, job):
- return str(job.sourceObjectId)
+ return job.GlobalJobId
def show_object(self, session, job):
frame = self.get_pool_frame(session)
@@ -1785,7 +1785,7 @@
is_deleted = job.deletionTime is not None
return not is_deleted
- class SaveAd(CuminAction):
+ class SetAttribute(CuminAction):
def show(self, session, job):
pass
@@ -1793,7 +1793,7 @@
return "Save Ad for"
def do_invoke(self, job, args, completion):
- job.SaveAd(self.cumin_model.data, completion, args)
+ job.SetAttribute(self.cumin_model.data, completion, Name=args[0], Value=args[1])
class CuminScheduler(RemoteClass):
def __init__(self, model):
17 years, 7 months
rhmessaging commits: r2491 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-09-17 14:07:44 -0400 (Wed, 17 Sep 2008)
New Revision: 2491
Modified:
mgmt/trunk/cumin/python/cumin/widgets.py
mgmt/trunk/cumin/python/cumin/widgets.strings
Log:
Adding "orig" to EditableProperties to allow determining which values have changed
Modified: mgmt/trunk/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.py 2008-09-17 16:07:31 UTC (rev 2490)
+++ mgmt/trunk/cumin/python/cumin/widgets.py 2008-09-17 18:07:44 UTC (rev 2491)
@@ -303,6 +303,7 @@
["path"] is required and should be the DictParameter path to prepend to the name
["error"] is optional and should be the error text to display for that item
["property"] is optional and should be a dictionary of item properties
+ ["orig"] is optional and should be the original value of the item before user edits
"""
def __init__(self, widget, template_key):
super(EditablePropertyRenderer, self).__init__(widget, template_key)
@@ -312,6 +313,7 @@
self.__bigstring_template = Template(self, "bigstring_html")
self.__number_template = Template(self, "number_html")
self.__readonly_template = Template(self, "readonly_html")
+ self.__orig_template = Template(self, "orig_html")
def render_title(self, session, item):
title = item["name"]
@@ -353,10 +355,24 @@
def render_ptype_name(self, session, item):
return DictParameter.sep().join(
(item["path"], escape_entity(item["name"]), "type"))
-
+
def render_ptype_value(self, session, item):
return item["type"]
+ def render_orig_value(self, session, item):
+ if "orig" in item:
+ writer = Writer()
+ self.__orig_template.render(writer, session, item)
+ return writer.to_string()
+
+ def render_porig_name(self, session, item):
+ return DictParameter.sep().join(
+ (item["path"], escape_entity(item["name"]), "orig"))
+
+ def render_porig_value(self, session, item):
+ value = item["orig"]
+ return escape_entity(str(value))
+
def render_val(self, session, item):
value = self.get_val(session, item)
return escape_entity(str(value))
Modified: mgmt/trunk/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.strings 2008-09-17 16:07:31 UTC (rev 2490)
+++ mgmt/trunk/cumin/python/cumin/widgets.strings 2008-09-17 18:07:44 UTC (rev 2491)
@@ -323,22 +323,29 @@
<input class="edit_bool" id="{pname}.true" type="radio" name="{pname}" value="TRUE" {true_selected} /> <label for="{pname}.true">True</label>
<input class="edit_bool" id="{pname}.false" type="radio" name="{pname}" value="FALSE" {false_selected} /> <label for="{pname}.false">False</label>
<input type="hidden" name="{ptype_name}" value="{ptype_value}"/>
+{orig_value}
[EditablePropertyRenderer.string_html]
<input class="edit_string" type="text" name="{pname}" value="{val}" />
<input type="hidden" name="{ptype_name}" value="{ptype_value}"/>
+{orig_value}
[EditablePropertyRenderer.bigstring_html]
<textarea class="edit_bigstring" name="{pname}" rows="4" cols="40">{val}</textarea>
<input type="hidden" name="{ptype_name}" value="{ptype_value}"/>
+{orig_value}
[EditablePropertyRenderer.number_html]
<input class="{edit_number_class}" type="text" name="{pname}" value="{val}" />{error}
<input type="hidden" name="{ptype_name}" value="{ptype_value}"/>
+{orig_value}
[EditablePropertyRenderer.readonly_html]
<span class="edit_readonly">{display_val}</span><input type="hidden" name="{ptype_name}" value="{ptype_value}"/><input type="hidden" name="{pname}" value="{val}"/>
+[EditablePropertyRenderer.orig_html]
+<input type="hidden" name="{porig_name}" value="{porig_value}"/>
+
[StateSwitch.item_html]
<li>{item_link}</li>
17 years, 7 months
rhmessaging commits: r2489 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-09-17 10:54:22 -0400 (Wed, 17 Sep 2008)
New Revision: 2489
Modified:
mgmt/trunk/cumin/python/cumin/job.py
Log:
Use GlobalJobId as job name instead of sourceId
Modified: mgmt/trunk/cumin/python/cumin/job.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/job.py 2008-09-17 13:43:04 UTC (rev 2488)
+++ mgmt/trunk/cumin/python/cumin/job.py 2008-09-17 14:54:22 UTC (rev 2489)
@@ -406,6 +406,14 @@
def gen_item(self, name, value, cls, path=None, dtype=None, error=None):
+ """ Generate a dict with name, value, type, error, path, property
+
+ This is called with raw GetAd data and with processed data from
+ a form submit. With raw data, only the name and value will be present.
+ With form data, we might have a path, dtype, or error. dtype is the
+ data type that was remembered from the raw data.
+ """
+
idict = dict()
idict["name"] = name
idict["value"] = value
17 years, 7 months
rhmessaging commits: r2488 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-09-17 09:43:04 -0400 (Wed, 17 Sep 2008)
New Revision: 2488
Modified:
mgmt/trunk/cumin/python/cumin/util.py
Log:
Don't raise an exception in wait(), just return False
Modified: mgmt/trunk/cumin/python/cumin/util.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/util.py 2008-09-17 13:42:33 UTC (rev 2487)
+++ mgmt/trunk/cumin/python/cumin/util.py 2008-09-17 13:43:04 UTC (rev 2488)
@@ -190,9 +190,9 @@
while True:
if predicate():
- return
+ return True
if time() - start > timeout:
- raise Exception("Operation timed out")
+ return False
sleep(1)
17 years, 7 months
rhmessaging commits: r2487 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-09-17 09:42:33 -0400 (Wed, 17 Sep 2008)
New Revision: 2487
Modified:
mgmt/trunk/cumin/python/cumin/job.py
Log:
Bump up timeout while waiting on GetAds to 20 seconds
Modified: mgmt/trunk/cumin/python/cumin/job.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/job.py 2008-09-17 13:41:55 UTC (rev 2486)
+++ mgmt/trunk/cumin/python/cumin/job.py 2008-09-17 13:42:33 UTC (rev 2487)
@@ -394,9 +394,9 @@
model = self.app.model
job.GetAd(model.data, completion, self.job_ads)
- # wait for up to 10 seconds for completion to be called
- wait(predicate, timeout=10)
cls = self.app.model.get_class_by_object(job)
+ # wait for up to 20 seconds for completion to be called
+ timedout = wait(predicate, timeout=20)
# list of dictionaries
# each disctionary has:
@@ -618,9 +618,7 @@
123.123.123.123 - - [26/Apr/2000:00:23:50 -0400] "GET /pics/5star.gif HTTP/1.0" 200 1031 "http://www.jafsoft.com/asctortf/" "Mozilla/4.05 (Macintosh; I; PPC)"
123.123.123.123 - - [26/Apr/2000:00:23:51 -0400] "GET /pics/a2hlogo.jpg HTTP/1.0" 200 4282 "http://www.jafsoft.com/asctortf/" "Mozilla/4.05 (Macintosh; I; PPC)"
123.123.123.123 - - [26/Apr/2000:00:23:51 -0400] "GET /cgi-bin/newcount?jafsof3&width=4&font=digital&noshow HTTP/1.0" 200 36 "http://www.jafsoft.com/asctortf/" "Mozilla/4.05 (Macintosh; I; PPC)"
-192.168.2.20 - - [28/Jul/2006:10:27:10 -0300] "GET /cgi-bin/try/ HTTP/1.0" 200 3395
-
- """
+192.168.2.20 - - [28/Jul/2006:10:27:10 -0300] "GET /cgi-bin/try/ HTTP/1.0" 200 3395"""
return escape_entity(raw)
class FetchButton(FormButton):
17 years, 7 months
rhmessaging commits: r2486 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-09-17 09:41:55 -0400 (Wed, 17 Sep 2008)
New Revision: 2486
Modified:
mgmt/trunk/cumin/python/cumin/job.strings
Log:
Temporarily removed {order_by} from Jobset sql to avoid problem with default sort column being None.
Modified: mgmt/trunk/cumin/python/cumin/job.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/job.strings 2008-09-16 21:54:14 UTC (rev 2485)
+++ mgmt/trunk/cumin/python/cumin/job.strings 2008-09-17 13:41:55 UTC (rev 2486)
@@ -20,7 +20,6 @@
left outer join job_stats as p on p.id = j.stats_prev_id
inner join scheduler as s on s.id = j.scheduler_id
{sql_where}
-{sql_orderby}
{sql_limit}
[JobSet.count_sql]
@@ -52,22 +51,6 @@
<div>{hidden_inputs}</div>
</form>
-[JobGroupSet.old.sql]
-select distinct
- j.custom_group as agroup,
-/* j.job_status,
- j.owner as submitter, */
- (select count(1)
- from job as j
- inner join scheduler as s on s.id = j.scheduler_id
- group by j.custom_group) as jobs
-from job as j
-left outer join job_stats as c on c.id = j.stats_curr_id
-left outer join job_stats as p on p.id = j.stats_prev_id
-{sql_where}
-{sql_orderby}
-{sql_limit}
-
[JobGroupSet.sql]
select distinct
j.custom_group as id,
@@ -76,7 +59,6 @@
1 as jobs
from job as j
{sql_where}
-{sql_orderby}
{sql_limit}
[JobGroupSet.count_sql]
17 years, 7 months