r4551 - trunk/cumin/bin
by tmckay@fedoraproject.org
Author: tmckay
Date: 2011-02-22 19:11:15 +0000 (Tue, 22 Feb 2011)
New Revision: 4551
Modified:
trunk/cumin/bin/cumin-admin
Log:
Add logging for cumin-admin back in, but log to admin.log
Modified: trunk/cumin/bin/cumin-admin
===================================================================
--- trunk/cumin/bin/cumin-admin 2011-02-22 17:55:24 UTC (rev 4550)
+++ trunk/cumin/bin/cumin-admin 2011-02-22 19:11:15 UTC (rev 4551)
@@ -31,6 +31,11 @@
parser.set_usage(generate_usage())
config, values, opts, args = get_configuration(parser, CuminDataConfig)
+ # Override the log_file value so that cumin-admin does not log
+ # to the same place as cumin-data
+ opts.log_file = os.path.join(config.get_home(), "log", "admin.log")
+ setup_operational_logging(opts)
+
try:
name = args[0]
except IndexError:
13 years, 3 months
r4550 - trunk/parsley/python/parsley
by tmckay@fedoraproject.org
Author: tmckay
Date: 2011-02-22 17:55:24 +0000 (Tue, 22 Feb 2011)
New Revision: 4550
Modified:
trunk/parsley/python/parsley/loggingex.py
Log:
If a log file is created by root, make the ownership
match the ownership if the containing directory. This
applies in a rollover case as well.
Modified: trunk/parsley/python/parsley/loggingex.py
===================================================================
--- trunk/parsley/python/parsley/loggingex.py 2011-02-22 15:30:12 UTC (rev 4549)
+++ trunk/parsley/python/parsley/loggingex.py 2011-02-22 17:55:24 UTC (rev 4550)
@@ -1,6 +1,6 @@
import logging
-from logging import handlers
-
+import os
+from logging.handlers import RotatingFileHandler
from collectionsex import defaultdict
_levels_by_name = {
@@ -13,6 +13,31 @@
_handlers_by_logger = defaultdict(list)
+def set_log_owner(file_obj):
+ # If the current user is root, make sure
+ # that the file has the same ownership
+ # as the containing directory
+ if os.getuid() == 0:
+ try:
+ dir_name = os.path.split(file_obj)[0]
+ dir_stat = os.stat(dir_name)
+ os.chown(file_obj, dir_stat.st_uid, dir_stat.st_gid)
+ except:
+ pass
+
+class MyRotatingFileHandler(RotatingFileHandler):
+ def __init__(self, filename, maxBytes, backupCount):
+ RotatingFileHandler.__init__(self,
+ filename,
+ maxBytes = maxBytes,
+ backupCount = backupCount)
+
+ def doRollover(self):
+ RotatingFileHandler.doRollover(self)
+ if hasattr(self, "baseFilename"):
+ # Try to fix up permissions on new file
+ set_log_owner(self.baseFilename)
+
def enable_logging(name, level, file_obj, max_MB = 0, max_archives = 0):
assert level
assert file_obj
@@ -23,9 +48,16 @@
level = _levels_by_name[level.lower()]
if type(file_obj) is str:
- handler = logging.handlers.RotatingFileHandler(file_obj,
- maxBytes = max_MB * 1024 *1024,
- backupCount = max_archives)
+ # Assume file_obj is a path name. If the file does not
+ # exist try to create the file with the correct uid/gid
+ # based on the containing dir.
+ if not os.path.exists(file_obj):
+ open(file_obj, 'a+')
+ set_log_owner(file_obj)
+
+ handler = MyRotatingFileHandler(file_obj,
+ maxBytes = max_MB * 1024 *1024,
+ backupCount = max_archives)
else:
handler = logging.StreamHandler(file_obj)
13 years, 3 months
r4549 - trunk/cumin/etc
by tmckay@fedoraproject.org
Author: tmckay
Date: 2011-02-22 15:30:12 +0000 (Tue, 22 Feb 2011)
New Revision: 4549
Modified:
trunk/cumin/etc/sysvinit-cumin
Log:
Don't redirect stderr to /dev/null. Let /usr/bin/cumin handle redirection.
Modified: trunk/cumin/etc/sysvinit-cumin
===================================================================
--- trunk/cumin/etc/sysvinit-cumin 2011-02-22 14:07:29 UTC (rev 4548)
+++ trunk/cumin/etc/sysvinit-cumin 2011-02-22 15:30:12 UTC (rev 4549)
@@ -43,7 +43,7 @@
# Invoke in foreground with arguments to test validity, if args have been set
if [ -n "$CUMIN_OPTIONS" ] ; then
daemon --user cumin --check $servicename $processname \
- "--init-only "$CUMIN_OPTIONS 2> /dev/null
+ "--init-only "$CUMIN_OPTIONS
[ $? -ne 0 ] && failure && echo && return
fi
# Launch for real now...
13 years, 3 months
r4548 - trunk/cumin/bin
by tmckay@fedoraproject.org
Author: tmckay
Date: 2011-02-22 14:07:29 +0000 (Tue, 22 Feb 2011)
New Revision: 4548
Modified:
trunk/cumin/bin/cumin
Log:
Missing set of path before referncing cumin modules.
Modified: trunk/cumin/bin/cumin
===================================================================
--- trunk/cumin/bin/cumin 2011-02-22 13:30:45 UTC (rev 4547)
+++ trunk/cumin/bin/cumin 2011-02-22 14:07:29 UTC (rev 4548)
@@ -6,11 +6,13 @@
import os
import sys
import signal
-from parsley.loggingex import *
-log = logging.getLogger("cumin.master")
home = os.environ.get("CUMIN_HOME", os.path.normpath("/usr/share/cumin"))
+sys.path.append(os.path.join(home, "python"))
+from parsley.loggingex import *
+log = logging.getLogger("cumin.master")
+
def call_sys_exit(sig,frame):
sys.exit()
13 years, 3 months
r4547 - in trunk/cumin/python/cumin: . grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-02-22 13:30:45 +0000 (Tue, 22 Feb 2011)
New Revision: 4547
Modified:
trunk/cumin/python/cumin/grid/pool.py
trunk/cumin/python/cumin/widgets.py
Log:
Fix exception when clicking on Grid tab after navigating to a sub frame. Now clicking on the Grid tab will always take you to the top frame under Grid.
Modified: trunk/cumin/python/cumin/grid/pool.py
===================================================================
--- trunk/cumin/python/cumin/grid/pool.py 2011-02-21 22:12:53 UTC (rev 4546)
+++ trunk/cumin/python/cumin/grid/pool.py 2011-02-22 13:30:45 UTC (rev 4547)
@@ -69,6 +69,8 @@
self.limits = LimitSelector(app, "limits", self.object)
self.view.add_tab(self.limits)
+ self.top_tab = True
+
def render_title(self, session):
return "Grid"
Modified: trunk/cumin/python/cumin/widgets.py
===================================================================
--- trunk/cumin/python/cumin/widgets.py 2011-02-21 22:12:53 UTC (rev 4546)
+++ trunk/cumin/python/cumin/widgets.py 2011-02-22 13:30:45 UTC (rev 4547)
@@ -76,15 +76,7 @@
return lsess.marshal()
def render_tab_href(self, session, tab):
- if hasattr(tab, "sticky_view"):
- if tab.sticky_view:
- try:
- name = "sticky_%s" % tab.name
- obj = session.client_session.attributes[name]
- return tab.sticky_view.frame.get_href(session, obj)
- except KeyError:
- pass
-
+ if hasattr(tab, "top_tab"):
branch = session.branch()
tab.mode.set(branch, None)
tab.show(branch)
@@ -149,7 +141,7 @@
self.__edit = None
self.__remove = None
- self.sticky_view = None
+ self.top_tab = True
def init(self):
super(CuminFrame, self).init()
13 years, 3 months
r4546 - in trunk/cumin/python/cumin: . grid inventory
by eallen@fedoraproject.org
Author: eallen
Date: 2011-02-21 22:12:53 +0000 (Mon, 21 Feb 2011)
New Revision: 4546
Modified:
trunk/cumin/python/cumin/grid/job.py
trunk/cumin/python/cumin/grid/main.py
trunk/cumin/python/cumin/grid/negotiator.py
trunk/cumin/python/cumin/grid/pool.py
trunk/cumin/python/cumin/grid/scheduler.py
trunk/cumin/python/cumin/grid/slot.py
trunk/cumin/python/cumin/grid/submission.py
trunk/cumin/python/cumin/grid/submitter.py
trunk/cumin/python/cumin/inventory/system.py
trunk/cumin/python/cumin/main.py
Log:
Implemented BZ 673189 - Show data from only one pool.
- Bypassed the Pool Frame and it's PoolSelector
- Assume the most recently updated collector is the one we want to use (if there are multiple)
- Adjust the frame paths to reflect the missing pool frame
Modified: trunk/cumin/python/cumin/grid/job.py
===================================================================
--- trunk/cumin/python/cumin/grid/job.py 2011-02-21 22:08:00 UTC (rev 4545)
+++ trunk/cumin/python/cumin/grid/job.py 2011-02-21 22:12:53 UTC (rev 4546)
@@ -208,7 +208,7 @@
self.table.adapter = JobSummariesAdapter(app, cls, submission)
self.submission = submission
- frame = "main.grid.pool.submission.job"
+ frame = "main.grid.submission.job"
self.job_id_col = self.JobIdColumn(app, "job", cls.GlobalJobId, cls.JobId, frame, self.render_dynamic_header)
self.add_column(self.job_id_col)
Modified: trunk/cumin/python/cumin/grid/main.py
===================================================================
--- trunk/cumin/python/cumin/grid/main.py 2011-02-21 22:08:00 UTC (rev 4545)
+++ trunk/cumin/python/cumin/grid/main.py 2011-02-21 22:12:53 UTC (rev 4546)
@@ -20,27 +20,10 @@
self.dag_job_submit = DagJobSubmit(app)
self.vm_job_submit = VmJobSubmit(app)
- # cls = app.model.com_redhat_grid.Job
-
- # JobHold(self, cls)
- # JobRelease(self, cls)
- # JobRemove(self, cls)
- # JobSetAttribute(self, cls)
-
- # cls = app.model.com_redhat_grid.Negotiator
-
- # NegotiatorEditDynamicQuota(self, cls)
- # NegotiatorEditStaticQuota(self, cls)
- # NegotiatorEditPrioFactor(self, cls)
- # NegotiatorUserPrioFactor(self, cls)
- # NegotiatorEditRegroup(self, cls)
- # NegotiatorUserRegroup(self, cls)
- # NegotiatorAddGroup(self, cls)
-
def init(self):
super(Module, self).init()
- self.frame = GridFrame(self.app, "grid")
+ self.frame = PoolFrame(self.app, "grid")
self.app.main_page.main.grid = self.frame
self.app.main_page.main.add_tab(self.frame)
@@ -53,37 +36,3 @@
def init_test(self, test):
GridTest("grid", test)
-
-class GridFrame(CuminFrame):
- def __init__(self, app, name):
- super(GridFrame, self).__init__(app, name)
-
- self.view = GridView(app, "view")
- self.add_mode(self.view)
-
- self.pool = PoolFrame(app, "pool")
- self.add_mode(self.pool)
- # XXX self.add_sticky_view(self.pool)
-
- def render_title(self, session):
- return "Grid"
-
-class GridView(Widget):
- def __init__(self, app, name):
- super(GridView, self).__init__(app, name)
-
- heading = self.Heading(app, "heading")
- self.add_child(heading)
-
- self.tabs = TabbedModeSet(app, "tabs")
- self.add_child(self.tabs)
-
- self.pools = PoolSelector(app, "pools")
- self.tabs.add_tab(self.pools)
-
- class Heading(CuminHeading):
- def render_title(self, session):
- return "Grid"
-
- def render_icon_href(self, session):
- return "resource?name=pool-36.png"
Modified: trunk/cumin/python/cumin/grid/negotiator.py
===================================================================
--- trunk/cumin/python/cumin/grid/negotiator.py 2011-02-21 22:08:00 UTC (rev 4545)
+++ trunk/cumin/python/cumin/grid/negotiator.py 2011-02-21 22:12:53 UTC (rev 4546)
@@ -31,7 +31,7 @@
self.add_filter(self.pool, cls.Pool)
- frame = "main.grid.pool.negotiator"
+ frame = "main.grid.negotiator"
col = ObjectLinkColumn(app, "name", cls.Name, cls._id, frame)
self.add_column(col)
self.add_search_filter(col)
@@ -391,7 +391,7 @@
class NegotiatorGroupTask(ObjectFrameTask):
def do_exit(self, session):
- self.app.main_page.main.grid.pool.view.show(session)
+ self.app.main_page.main.grid.view.show(session)
def do_invoke(self, invoc, negotiator, group, value):
# don't call self.qmf_call here since we need to
Modified: trunk/cumin/python/cumin/grid/pool.py
===================================================================
--- trunk/cumin/python/cumin/grid/pool.py 2011-02-21 22:08:00 UTC (rev 4545)
+++ trunk/cumin/python/cumin/grid/pool.py 2011-02-21 22:12:53 UTC (rev 4546)
@@ -2,8 +2,6 @@
from cumin.widgets import Session, StateSwitch
from wooly.util import StringCatalog
-from cumin.objectselector import ObjectSelector, ObjectLinkColumn
-from rosemary.sqlfilter import SqlComparisonFilter
from cumin.objectframe import ObjectFrame
from submission import SubmissionFrame, PoolSubmissionJoinSelector
from slot import SlotFrame, SlotSelector, SlotMap, SlotMapPage
@@ -21,33 +19,6 @@
strings = StringCatalog(__file__)
log = logging.getLogger("cumin.pool")
-class PoolSelector(ObjectSelector):
- def __init__(self, app, name):
- cls = app.model.com_redhat_grid.Collector
-
- super(PoolSelector, self).__init__(app, name, cls)
-
- frame = "main.grid.pool"
- col = self.PoolNameColumn(app, "name", cls.Name, cls._id, frame)
- self.add_column(col)
-
- self.add_attribute_column(cls.RunningJobs)
- self.add_attribute_column(cls.IdleJobs)
- self.add_attribute_column(cls.HostsTotal)
-
- def init(self):
- super(PoolSelector, self).init()
-
- table = self.cls.sql_table
-
- when = "now() - interval '1 day'"
- filter = SqlComparisonFilter(table._qmf_update_time, when, ">")
- self.table.adapter.query.add_filter(filter)
-
- class PoolNameColumn(ObjectLinkColumn):
- def render_header_content(self, session):
- return "Pool"
-
class PoolFrame(ObjectFrame):
def __init__(self, app, name):
cls = app.model.com_redhat_grid.Collector
@@ -56,6 +27,8 @@
self.icon_href = "resource?name=pool-36.png"
+ self.mode.default = self.view
+
self.submission = SubmissionFrame(app, "submission")
self.add_mode(self.submission)
@@ -96,6 +69,27 @@
self.limits = LimitSelector(app, "limits", self.object)
self.view.add_tab(self.limits)
+ def render_title(self, session):
+ return "Grid"
+
+ def do_process(self, session):
+ id = self.id.get(session)
+ if not id:
+ # get all the collectors
+ collectors = self.cls.get_selection(session.cursor)
+ try:
+ youngest = collectors[0]
+ except IndexError:
+ return
+
+ for collector in collectors:
+ if collector._qmf_update_time > youngest._qmf_update_time:
+ youngest = collector
+ collector = youngest
+ self.id.set(session, collector._id)
+
+ super(PoolFrame, self).do_process(session)
+
class NegotiatorAttribute(Attribute):
def __init__(self, app, name, collector):
super(PoolFrame.NegotiatorAttribute, self).__init__(app, name)
Modified: trunk/cumin/python/cumin/grid/scheduler.py
===================================================================
--- trunk/cumin/python/cumin/grid/scheduler.py 2011-02-21 22:08:00 UTC (rev 4545)
+++ trunk/cumin/python/cumin/grid/scheduler.py 2011-02-21 22:12:53 UTC (rev 4546)
@@ -82,7 +82,7 @@
self.add_filter(self.pool, cls.Pool)
- frame = "main.grid.pool.scheduler"
+ frame = "main.grid.scheduler"
col = ObjectLinkColumn(app, "name", cls.Name, cls._id, frame)
self.add_column(col)
self.add_search_filter(col)
Modified: trunk/cumin/python/cumin/grid/slot.py
===================================================================
--- trunk/cumin/python/cumin/grid/slot.py 2011-02-21 22:08:00 UTC (rev 4545)
+++ trunk/cumin/python/cumin/grid/slot.py 2011-02-21 22:12:53 UTC (rev 4546)
@@ -24,7 +24,7 @@
self.add_filter(self.pool, cls.Pool, cls.Pool)
- frame = "main.grid.pool.slot"
+ frame = "main.grid.slot"
col = ObjectLinkColumn(app, "name", cls.Name, cls._id, frame)
self.add_column(col)
self.add_search_filter(col)
@@ -395,7 +395,7 @@
def render_slot_url(self, session):
slot = Identifiable("XXX")
try:
- return self.page.main.grid.pool.slot.get_href(session, slot)
+ return self.page.main.grid.slot.get_href(session, slot)
except:
pass
Modified: trunk/cumin/python/cumin/grid/submission.py
===================================================================
--- trunk/cumin/python/cumin/grid/submission.py 2011-02-21 22:08:00 UTC (rev 4545)
+++ trunk/cumin/python/cumin/grid/submission.py 2011-02-21 22:12:53 UTC (rev 4546)
@@ -84,7 +84,7 @@
cls = app.model.com_redhat_grid.JobServer
self.add_filter(self.pool, cls.Pool)
- frame = "main.grid.pool.submission"
+ frame = "main.grid.submission"
col = ObjectLinkColumn(app, "name", self.cls.Name, self.cls._id, frame)
self.insert_column(1, col)
self.add_search_filter(col)
@@ -117,7 +117,7 @@
self.SchedulerJoin(app, self.table.adapter.query, self.cls.sql_table,
self.cls.jobserverRef.sql_column, "jid")
- frame = "main.grid.pool.scheduler"
+ frame = "main.grid.scheduler"
col = self.SchedulerColumn(app, "Scheduler", scheduler.Name, scheduler._id, frame)
self.insert_column(3, col)
Modified: trunk/cumin/python/cumin/grid/submitter.py
===================================================================
--- trunk/cumin/python/cumin/grid/submitter.py 2011-02-21 22:08:00 UTC (rev 4545)
+++ trunk/cumin/python/cumin/grid/submitter.py 2011-02-21 22:12:53 UTC (rev 4546)
@@ -40,7 +40,7 @@
self.add_reference_filter(self.scheduler, cls.schedulerRef)
- frame = "main.grid.pool.scheduler.submitter"
+ frame = "main.grid.scheduler.submitter"
col = ObjectLinkColumn(app, "name", cls.Name, cls._id, frame)
self.add_column(col)
self.add_search_filter(col)
Modified: trunk/cumin/python/cumin/inventory/system.py
===================================================================
--- trunk/cumin/python/cumin/inventory/system.py 2011-02-21 22:08:00 UTC (rev 4545)
+++ trunk/cumin/python/cumin/inventory/system.py 2011-02-21 22:12:53 UTC (rev 4546)
@@ -83,7 +83,7 @@
def render_slot_job_url(self, session):
#job = Identifiable("XXX")
- #return self.page.main.grid.pool.job.get_href(session, job, None)
+ #return self.page.main.grid.job.get_href(session, job, None)
return session.marshal() # XXX
class MemoryFlashChart(StatFlashChart):
Modified: trunk/cumin/python/cumin/main.py
===================================================================
--- trunk/cumin/python/cumin/main.py 2011-02-21 22:08:00 UTC (rev 4545)
+++ trunk/cumin/python/cumin/main.py 2011-02-21 22:12:53 UTC (rev 4546)
@@ -437,9 +437,9 @@
collector = self.parent.get_collector(session, submission_id)
if collector:
branch = session.branch()
- self.page.main.grid.pool.id.set(session, collector._id)
- self.page.main.grid.pool.submission.id.set(session, submission_id)
- self.page.main.grid.pool.submission.view.show(session)
+ self.page.main.grid.id.set(session, collector._id)
+ self.page.main.grid.submission.id.set(session, submission_id)
+ self.page.main.grid.submission.view.show(session)
return branch.marshal()
class DurationColumn(TopTableColumn):
13 years, 3 months
r4545 - in trunk: cumin/python/cumin parsley/python/parsley
by tmckay@fedoraproject.org
Author: tmckay
Date: 2011-02-21 22:08:00 +0000 (Mon, 21 Feb 2011)
New Revision: 4545
Modified:
trunk/cumin/python/cumin/config.py
trunk/parsley/python/parsley/loggingex.py
Log:
Changed logging to use rotating log handler.
Max log size, max number of archives configurable from cumin.conf
BZ677398
Modified: trunk/cumin/python/cumin/config.py
===================================================================
--- trunk/cumin/python/cumin/config.py 2011-02-21 22:07:12 UTC (rev 4544)
+++ trunk/cumin/python/cumin/config.py 2011-02-21 22:08:00 UTC (rev 4545)
@@ -103,6 +103,12 @@
param = ConfigParameter(self, "log-level", str)
param.default = "info"
+ param = ConfigParameter(self, "log-max-mb", float)
+ param.default = 10
+
+ param = ConfigParameter(self, "log-max-archives", int)
+ param.default = 1
+
param = ConfigParameter(self, "debug", bool)
param.default = False
@@ -134,6 +140,8 @@
self._apply_default(section, "brokers")
self._apply_default(section, "log_file")
self._apply_default(section, "log_level")
+ self._apply_default(section, "log_max_mb")
+ self._apply_default(section, "log_max_archives")
self._apply_default(section, "debug")
class CuminWebOptionParser(CuminMultiOptionParser):
@@ -205,7 +213,8 @@
def setup_operational_logging(values):
for name in _logging_modules:
disable_logging(name)
- enable_logging(name, values.log_level, values.log_file)
+ enable_logging(name, values.log_level, values.log_file,
+ values.log_max_mb, values.log_max_archives)
if values.debug:
for name in _logging_modules:
Modified: trunk/parsley/python/parsley/loggingex.py
===================================================================
--- trunk/parsley/python/parsley/loggingex.py 2011-02-21 22:07:12 UTC (rev 4544)
+++ trunk/parsley/python/parsley/loggingex.py 2011-02-21 22:08:00 UTC (rev 4545)
@@ -1,4 +1,5 @@
import logging
+from logging import handlers
from collectionsex import defaultdict
@@ -12,18 +13,22 @@
_handlers_by_logger = defaultdict(list)
-def enable_logging(name, level, file):
+def enable_logging(name, level, file_obj, max_MB = 0, max_archives = 0):
assert level
- assert file
+ assert file_obj
+ assert type(max_MB) in (float,int)
+ assert type(max_archives) is int
if type(level) is str:
level = _levels_by_name[level.lower()]
- if type(file) is str:
- file = open(file, "a")
+ if type(file_obj) is str:
+ handler = logging.handlers.RotatingFileHandler(file_obj,
+ maxBytes = max_MB * 1024 *1024,
+ backupCount = max_archives)
+ else:
+ handler = logging.StreamHandler(file_obj)
- handler = logging.StreamHandler(file)
-
fmt = "%(process)d %(asctime)s %(levelname)s %(message)s"
handler.setFormatter(logging.Formatter(fmt))
handler.setLevel(level)
13 years, 3 months
r4544 - trunk/cumin/bin
by eallen@fedoraproject.org
Author: eallen
Date: 2011-02-21 22:07:12 +0000 (Mon, 21 Feb 2011)
New Revision: 4544
Modified:
trunk/cumin/bin/cumin-admin
trunk/cumin/bin/cumin-bench
trunk/cumin/bin/cumin-data
trunk/cumin/bin/cumin-smoke-test
trunk/cumin/bin/cumin-web
Log:
Only use the 1st broker listed in the config file
Modified: trunk/cumin/bin/cumin-admin
===================================================================
--- trunk/cumin/bin/cumin-admin 2011-02-21 20:40:45 UTC (rev 4543)
+++ trunk/cumin/bin/cumin-admin 2011-02-21 22:07:12 UTC (rev 4544)
@@ -47,7 +47,8 @@
print "Command '%s' is unknown" % name
sys.exit(1)
- broker_uris = [x.strip() for x in opts.brokers.split(",")]
+ # take the 1st broker listed
+ broker_uris = [x.strip() for x in opts.brokers.split(",")[0:1]]
app = Cumin(config.get_home(), broker_uris, opts.database)
Modified: trunk/cumin/bin/cumin-bench
===================================================================
--- trunk/cumin/bin/cumin-bench 2011-02-21 20:40:45 UTC (rev 4543)
+++ trunk/cumin/bin/cumin-bench 2011-02-21 22:07:12 UTC (rev 4544)
@@ -14,7 +14,8 @@
setup_operational_logging(opts)
- broker_uris = [x.strip() for x in opts.brokers.split(",")]
+ # take the 1st broker listed
+ broker_uris = [x.strip() for x in opts.brokers.split(",")[0:1]]
cumin = Cumin(config.get_home(), broker_uris, opts.database)
Modified: trunk/cumin/bin/cumin-data
===================================================================
--- trunk/cumin/bin/cumin-data 2011-02-21 20:40:45 UTC (rev 4543)
+++ trunk/cumin/bin/cumin-data 2011-02-21 22:07:12 UTC (rev 4544)
@@ -19,7 +19,8 @@
model_dir = os.path.join(config.home, "model")
- broker_uris = [x.strip() for x in opts.brokers.split(",")]
+ # take the 1st broker listed
+ broker_uris = [x.strip() for x in opts.brokers.split(",")[0:1]]
mint = Mint(model_dir, broker_uris, opts.database)
Modified: trunk/cumin/bin/cumin-smoke-test
===================================================================
--- trunk/cumin/bin/cumin-smoke-test 2011-02-21 20:40:45 UTC (rev 4543)
+++ trunk/cumin/bin/cumin-smoke-test 2011-02-21 22:07:12 UTC (rev 4544)
@@ -19,7 +19,8 @@
setup_operational_logging(opts)
- broker_uris = [x.strip() for x in opts.brokers.split(",")]
+ # take the 1st broker listed
+ broker_uris = [x.strip() for x in opts.brokers.split(",")[0:1]]
cumin = Cumin(config.get_home(), broker_uris, opts.database,
opts.host, opts.port)
Modified: trunk/cumin/bin/cumin-web
===================================================================
--- trunk/cumin/bin/cumin-web 2011-02-21 20:40:45 UTC (rev 4543)
+++ trunk/cumin/bin/cumin-web 2011-02-21 22:07:12 UTC (rev 4544)
@@ -17,7 +17,8 @@
setup_operational_logging(opts)
- broker_uris = [x.strip() for x in opts.brokers.split(",")]
+ # take the 1st broker listed
+ broker_uris = [x.strip() for x in opts.brokers.split(",")[0:1]]
cumin = Cumin(config.get_home(), broker_uris, opts.database,
opts.host, opts.port)
13 years, 3 months
r4543 - in trunk/cumin/python/cumin: . grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-02-21 20:40:45 +0000 (Mon, 21 Feb 2011)
New Revision: 4543
Modified:
trunk/cumin/python/cumin/charts.py
trunk/cumin/python/cumin/grid/slot.py
Log:
Tweaks to png slot vis
Modified: trunk/cumin/python/cumin/charts.py
===================================================================
--- trunk/cumin/python/cumin/charts.py 2011-02-21 20:38:40 UTC (rev 4542)
+++ trunk/cumin/python/cumin/charts.py 2011-02-21 20:40:45 UTC (rev 4543)
@@ -31,6 +31,7 @@
cr.rectangle(0, 0, width - 1, height - 1)
cr.fill()
+ cr.set_line_width(2)
self._plot_shape(cr, interior, shape, 0, 0, width, height)
return surface
Modified: trunk/cumin/python/cumin/grid/slot.py
===================================================================
--- trunk/cumin/python/cumin/grid/slot.py 2011-02-21 20:38:40 UTC (rev 4542)
+++ trunk/cumin/python/cumin/grid/slot.py 2011-02-21 20:40:45 UTC (rev 4543)
@@ -129,9 +129,9 @@
shapes = {"Unavailable": {"shape": "filled_triangle", "color": (.6,.6,.6)},
"Available": {"shape": "box", "color": (.6,.6,.6)},
- "Stopping": {"shape": "diagonal", "color": (.8,0,0)},
- "Starting": {"shape": "diagonal", "color": (0,0,.8)},
- "Paused": {"shape": "solid", "color": (.4,.4,1)},
+ "Stopping": {"shape": "diagonal", "color": (1,.2,.2)},
+ "Starting": {"shape": "diagonal", "color": (.2,1,8)},
+ "Paused": {"shape": "solid", "color": (1,.2,.2)},
"Running": {"shape": "solid", "color": (0,.8,0)},
"Busy": {"shape": "solid", "color": (0,.8,0)},
"Transitioning": {"shape": "diagonal", "color": (.8,0,.8)},
13 years, 3 months
r4542 - trunk/cumin/bin
by tmckay@fedoraproject.org
Author: tmckay
Date: 2011-02-21 20:38:40 +0000 (Mon, 21 Feb 2011)
New Revision: 4542
Modified:
trunk/cumin/bin/cumin
Log:
Log to $CUMIN_HOME/log/master.log, not $CUMIN_HOME/master.log
Modified: trunk/cumin/bin/cumin
===================================================================
--- trunk/cumin/bin/cumin 2011-02-21 20:11:08 UTC (rev 4541)
+++ trunk/cumin/bin/cumin 2011-02-21 20:38:40 UTC (rev 4542)
@@ -45,7 +45,7 @@
SECTION = 1
PROGRAM = 2
- enable_logging("cumin.master", logging.INFO, os.path.join(home, "master.log"))
+ enable_logging("cumin.master", logging.INFO, os.path.join(home, "log", "master.log"))
parser = OptionParser()
13 years, 3 months