r5331 - in trunk: cumin/model/plumage cumin/model/upgrades cumin/python/cumin cumin/python/cumin/grid mint/python/mint/plumage
by croberts@fedoraproject.org
Author: croberts
Date: 2012-04-20 18:18:31 +0000 (Fri, 20 Apr 2012)
New Revision: 5331
Modified:
trunk/cumin/model/plumage/plumage.xml
trunk/cumin/model/plumage/rosemary.xml
trunk/cumin/model/upgrades/1.2_to_1.3
trunk/cumin/python/cumin/grid/dashboard.py
trunk/cumin/python/cumin/model.py
trunk/cumin/python/cumin/stat.py
trunk/mint/python/mint/plumage/session.py
Log:
For CuminReporting we are now aggregating the stats as they come out of the ODS and storing them in the cumin database for a much lighter-weight dataset which leads to much better and sustainable performance. Included are an updated plumage.xml/rosemary.xml and the 1.2_to_1.3 database upgrade script.
Modified: trunk/cumin/model/plumage/plumage.xml
===================================================================
--- trunk/cumin/model/plumage/plumage.xml 2012-04-20 01:20:38 UTC (rev 5330)
+++ trunk/cumin/model/plumage/plumage.xml 2012-04-20 18:18:31 UTC (rev 5331)
@@ -2,14 +2,10 @@
<schema package="com.redhat.grid.plumage" package_type="generic">
<class name="OSUtil">
<statistic name="ts" type="absTime" unit="uint32" />
- <statistic name="m" type="sstr" optional="y" default=""/>
- <statistic name="n" type="sstr" optional="y" default="" />
- <statistic name="ar" type="sstr" optional="y" default=""/>
- <statistic name="os" type="sstr" optional="y" default=""/>
- <statistic name="ki" type="uint32" uint="uint32" optional="y" default="0"/>
- <statistic name="la" type="uint32" uint="uint32" optional="y" default="0"/>
- <statistic name="st" type="sstr" optional="y" default=""/>
- <statistic name="cpu" type="uint32" uint="uint32" optional="y" default="0" />
- <statistic name="mem" type="uint32" uint="uint32" optional="y" default="0"/>
+ <statistic name="total" type="uint32" uint="uint32" />
+ <statistic name="used" type="uint32" uint="uint32" />
+ <statistic name="unused" type="uint32" uint="uint32" />
+ <statistic name="owner" type="uint32" uint="uint32" />
+ <statistic name="efficiency" type="float" />
</class>
</schema>
Modified: trunk/cumin/model/plumage/rosemary.xml
===================================================================
--- trunk/cumin/model/plumage/rosemary.xml 2012-04-20 01:20:38 UTC (rev 5330)
+++ trunk/cumin/model/plumage/rosemary.xml 2012-04-20 18:18:31 UTC (rev 5331)
@@ -9,42 +9,26 @@
<statistic name="ts" timestamp="y">
</statistic>
- <statistic name="m">
- <title>Machine</title>
- </statistic>
-
- <statistic name="n">
- <title>Slot</title>
- </statistic>
-
- <statistic name="ar">
- <title>Architecture</title>
- </statistic>
-
- <statistic name="os">
- <title>OS</title>
- </statistic>
-
- <statistic name="ki">
- <title>KB idle</title>
- </statistic>
-
- <statistic name="la">
- <title>Last active</title>
- </statistic>
-
- <statistic name="st">
- <title>State</title>
- </statistic>
-
- <statistic name="cpu">
- <title>CPU</title>
- </statistic>
-
- <statistic name="mem">
- <title>Memory</title>
- </statistic>
+ <statistic name="total">
+ <title>Total</title>
+ </statistic>
+ <statistic name="used">
+ <title>Used</title>
+ </statistic>
+
+ <statistic name="unused">
+ <title>Unused</title>
+ </statistic>
+
+ <statistic name="owner">
+ <title>Owner</title>
+ </statistic>
+
+ <statistic name="efficiency">
+ <title>Efficiency</title>
+ </statistic>
+
</class>
</package>
Modified: trunk/cumin/model/upgrades/1.2_to_1.3
===================================================================
--- trunk/cumin/model/upgrades/1.2_to_1.3 2012-04-20 01:20:38 UTC (rev 5330)
+++ trunk/cumin/model/upgrades/1.2_to_1.3 2012-04-20 18:18:31 UTC (rev 5331)
@@ -1,5 +1,5 @@
#!/bin/bash
echo 'create schema "com.redhat.grid.plumage"' | psql -d cumin -U cumin -h localhost
echo 'create sequence "com.redhat.grid.plumage"."OSUtil_id_seq"' | psql -d cumin -U cumin -h localhost
-echo 'create table "com.redhat.grid.plumage"."OSUtil" ("_id" int8 not null, "ts" timestamp not null, "m" text, "n" text, "ar" text, "os" text, "ki" int8, "la" int8, "st" text, "cpu" int8, "mem" int8, constraint "OSUtil_pk" primary key ("_id"))' | psql -d cumin -U cumin -h localhost
-echo 'create table "com.redhat.grid.plumage"."OSUtil_samples" ("ts" timestamp not null,"m" text,"n" text,"ar" text,"os" text,"ki" int8,"la" int8,"st" text,"cpu" int8,"mem" int8)'| psql -d cumin -U cumin -h localhost
+echo 'create table "com.redhat.grid.plumage"."OSUtil" ("_id" int8 not null,"ts" timestamp not null,"total" int8 not null,"used" int8 not null,"unused" int8 not null,"owner" int8 not null,"efficiency" float4 not null,constraint "OSUtil_pk" primary key ("_id"))'| psql -d cumin -U cumin -h localhost
+echo 'create table "com.redhat.grid.plumage"."OSUtil_samples" ("ts" timestamp not null,"total" int8 not null,"used" int8 not null,"unused" int8 not null,"owner" int8 not null,"efficiency" float4 not null)'| psql -d cumin -U cumin -h localhost
Modified: trunk/cumin/python/cumin/grid/dashboard.py
===================================================================
--- trunk/cumin/python/cumin/grid/dashboard.py 2012-04-20 01:20:38 UTC (rev 5330)
+++ trunk/cumin/python/cumin/grid/dashboard.py 2012-04-20 18:18:31 UTC (rev 5331)
@@ -95,10 +95,7 @@
self.add_child(os_data)
chart = self.UtilChart(app, "util", app.model.com_redhat_grid_plumage.OSUtil)
- chart.stats = ["total", "avail", "unavail", "used"]
- # these titles are a temporary requirement. Eventually, we will have an "aggregate" class available that will
- # let us store queries or other info in the rosemary.xml model but NOT have an actual column in the database
- chart.titles = ["Total", "Available", "Unavailable", "Used", ]
+ chart.stats = ["total", "unused", "owner", "used"]
chart.duration.param.default = "3600"
self.add_child(chart)
@@ -107,7 +104,7 @@
class UtilChart(ReportingChart):
def render_title(self, session):
- return "Grid utilization"
+ return "Slot utilization"
class DefinitionSet(StatSet):
def __init__(self, app, name, object, title):
Modified: trunk/cumin/python/cumin/model.py
===================================================================
--- trunk/cumin/python/cumin/model.py 2012-04-20 01:20:38 UTC (rev 5330)
+++ trunk/cumin/python/cumin/model.py 2012-04-20 18:18:31 UTC (rev 5331)
@@ -420,61 +420,6 @@
samples = self.get_data({}, options)
return len(samples) and samples[0][0] or None
-class AggregateSamplesSqlAdapter(SamplesSqlAdapter):
- def __init__(self, app, cls, sig):
- super(AggregateSamplesSqlAdapter, self).__init__(app, cls, sig)
- self.querymap = {"used":"sum(case when st = 'Claimed' then 1 else 0 end) as value",
- "avail":"sum(case when st = 'Claimed' or st = 'Unclaimed' then 1 else 0 end) as value",
- "total":"sum(case when st = 'Claimed' or st = 'Unclaimed' or st = 'Owner' then 1 else 0 end) as value",
- "unavail":"sum(case when st = 'Owner' then 1 else 0 end) as value"}
-
- self.max_samples = 60
-
- def avg_samples(self, stat, secs, interval, secs2):
- updated_col = self.table._columns_by_name[self.update_col]
-
- org_filters = list(self.query.filters)
- max_col = "max(%s) as interval_end" % updated_col.identifier
- value_col = self.querymap[stat.name]
- dev_col = "count(1) as dev"
-
- columns = list()
- columns.append(max_col)
- columns.append(value_col)
- columns.append(dev_col)
- self.columns = columns
-
- when = "now() - interval '%i seconds'" % int(secs + secs2)
- filter = SqlComparisonFilter(updated_col, when, ">=")
- self.query.add_filter(filter)
- when2 = ""
- filter2 = None
- if secs2:
- when2 = "now() - interval '%i seconds'" % int(secs2)
- filter2 = SqlComparisonFilter(updated_col, when2, "<=")
- self.query.add_filter(filter2)
-
- options = SqlQueryOptions()
- options.sort_column = "interval_end"
- options.sort_ascending = False
- options.group_column = "floor(extract(epoch from %s) / %i)" % (updated_col.identifier, interval)
-
- samples = self.get_data({}, options)
-
- # reset the filters in case we need to re-run the query in this same request
- del self.query.filters[:]
- self.query.filters = org_filters
-
- reduced_samples = None
- if len(samples) > self.max_samples:
- reduced_interval = int(len(samples) / self.max_samples)
- # show every N samples + we always want the first and last
- reduced_samples = [sample for i, sample in enumerate(samples) if i % reduced_interval == 0 or i == 0 or i == len(samples) -1]
- samples = reduced_samples
-
- return samples
-
-
class CuminStatistic(object):
formatters = {
NoneType: lambda x: fmt_none(),
Modified: trunk/cumin/python/cumin/stat.py
===================================================================
--- trunk/cumin/python/cumin/stat.py 2012-04-20 01:20:38 UTC (rev 5330)
+++ trunk/cumin/python/cumin/stat.py 2012-04-20 18:18:31 UTC (rev 5331)
@@ -11,7 +11,7 @@
BooleanParameter
from cumin.formats import fmt_bytes, fmt_duration_brief
-from cumin.model import CuminStatistic, SamplesSqlAdapter, AggregateSamplesSqlAdapter
+from cumin.model import CuminStatistic, SamplesSqlAdapter
from cumin.widgets import StateSwitch
from wooly.template import WidgetTemplate
from cumin.util import calc_rate, secs, nvl, xml_escape
@@ -220,7 +220,7 @@
params.append("type=%s" % "reportarea")
for i, stat in enumerate(self.stats):
- params.append("stat=%s|%s" % (stat, self.titles[i]))
+ params.append("stat=%s" % stat)
if self.mode:
params.append("mode=%s" % self.mode)
@@ -467,15 +467,8 @@
signature = self.object_signature.get(session)
- if(session.get("type") == "reportarea"):
- # the stats here are not RosemaryStatistics, so we need a specialized sql adapter
- # for the time being. Eventually we will have a Rosemary class available for
- # things like these
- adapter = AggregateSamplesSqlAdapter(self.app, rosemary_class, signature)
- stats = [self.Pseudostat(x) for x in self.stats.get(session)]
- else:
- adapter = SamplesSqlAdapter(self.app, rosemary_class, signature)
- stats = [getattr(rosemary_class, x) for x in self.stats.get(session)]
+ adapter = SamplesSqlAdapter(self.app, rosemary_class, signature)
+ stats = [getattr(rosemary_class, x) for x in self.stats.get(session)]
return (adapter, stats)
Modified: trunk/mint/python/mint/plumage/session.py
===================================================================
--- trunk/mint/python/mint/plumage/session.py 2012-04-20 01:20:38 UTC (rev 5330)
+++ trunk/mint/python/mint/plumage/session.py 2012-04-20 18:18:31 UTC (rev 5331)
@@ -1,4 +1,5 @@
-import logging
+from __future__ import division
+
import time
from mint.util import MintDaemonThread
@@ -11,6 +12,10 @@
from pymongo.collection import Collection
from pymongo.database import Database
+from dateutil.parser import *
+
+import logging
+
log = logging.getLogger("mint.plumage.session")
UTC_DIFF = datetime.utcnow() - datetime.now() # needed because everything in mongo is UTC
@@ -115,16 +120,18 @@
oldest = oldest + UTC_DIFF
log.info("PlumageSessionThread--history: Loading records older than %s" % oldest)
- itemSet = self.collection.find({"ts": {'$lt': oldest}}).sort("ts", -1)
- for item in itemSet:
+ times = sorted(self.collection.find({"ts": {'$lt': oldest}}).distinct('ts'), reverse=True)
+ sample_times = map(lambda i: times[i],filter(lambda i: i%5 == 0,range(len(times))))
+
+ for time in sample_times:
record = OSUtil()
- for name, value in item.iteritems():
- if isinstance(value, datetime):
- #required since MongoDB uses UTC for everything, here we get our sanity back
- setattr(record, name, value - UTC_DIFF)
- else:
- setattr(record, name, value)
-
+ record.total = len(self.collection.find({'ts':time}).distinct('n'))
+ record.used = len(self.collection.find({'ts':time,'st':{'$nin':['Unclaimed','Owner']}}).distinct('n'))
+ record.unused = len(self.collection.find({'ts':time,'st':'Unclaimed'}).distinct('n'))
+ record.owner = len(self.collection.find({'ts':time,'st':'Owner'}).distinct('n'))
+ record.efficiency = (record.used/(record.total-record.owner))*100
+ record.ts = time - UTC_DIFF
+
obj = ObjectUpdate(self.app.model, record, self.cls)
self.app.update_thread.enqueue(obj)
@@ -145,19 +152,22 @@
log.info("PlumageSessionThread--current: Loading records newer than %s" % most_recent)
- itemSet = self.collection.find({"ts": {'$gt': most_recent}}).sort("ts", -1)
- for item in itemSet:
+ times = sorted(self.collection.find({"ts": {'$gt': most_recent}}).distinct('ts'), reverse=True)
+ sample_times = map(lambda i: times[i],filter(lambda i: i%5 == 0,range(len(times))))
+
+ for time in sample_times:
record = OSUtil()
- for name, value in item.iteritems():
- if isinstance(value, datetime):
- setattr(record, name, value - UTC_DIFF)
- else:
- setattr(record, name, value)
-
+ record.total = len(self.collection.find({'ts':time}).distinct('n'))
+ record.used = len(self.collection.find({'ts':time,'st':{'$nin':['Unclaimed','Owner']}}).distinct('n'))
+ record.unused = len(self.collection.find({'ts':time,'st':'Unclaimed'}).distinct('n'))
+ record.owner = len(self.collection.find({'ts':time,'st':'Owner'}).distinct('n'))
+ record.efficiency = (record.used/(record.total-record.owner))*100
+ record.ts = time - UTC_DIFF
+
obj = ObjectUpdate(self.app.model, record, self.cls)
self.app.update_thread.enqueue(obj)
- log.info("PlumageSessionThread--current: pass completed %s records added" % itemSet.count())
- sleep(300)
+ log.info("PlumageSessionThread--current: pass completed")
+ sleep(300)
'''This thread is meant to run once at startup. It will figure out the newest record in the cumin
@@ -169,18 +179,23 @@
(oldest, newest) = self.app.update_thread.get_first_and_last_sample_timestamp(self.cls)
if newest is not None:
log.info("CatchUpPlumageSessionThread: Starting for records newer than %s" % newest)
- itemSet = self.collection.find({"ts": {'$gt': newest + UTC_DIFF, '$lt': datetime.now() - timedelta(seconds=300) + UTC_DIFF}}).sort("ts", -1)
- for item in itemSet:
+
+ times = sorted(self.collection.find({"ts": {'$gt': newest + UTC_DIFF, '$lt': datetime.now() - timedelta(seconds=300) + UTC_DIFF}}).distinct('ts'), reverse=True)
+ sample_times = map(lambda i: times[i],filter(lambda i: i%5 == 0,range(len(times))))
+
+ for time in sample_times:
record = OSUtil()
- for name, value in item.iteritems():
- if isinstance(value, datetime):
- #required since MongoDB uses UTC for everything, here we get our sanity back
- setattr(record, name, value - UTC_DIFF)
- else:
- setattr(record, name, value)
-
+ record.total = len(self.collection.find({'ts':time}).distinct('n'))
+ record.used = len(self.collection.find({'ts':time,'st':{'$nin':['Unclaimed','Owner']}}).distinct('n'))
+ record.unused = len(self.collection.find({'ts':time,'st':'Unclaimed'}).distinct('n'))
+ record.owner = len(self.collection.find({'ts':time,'st':'Owner'}).distinct('n'))
+ record.efficiency = (record.used/(record.total-record.owner))*100
+ record.ts = time - UTC_DIFF
+
obj = ObjectUpdate(self.app.model, record, self.cls)
self.app.update_thread.enqueue(obj)
- log.info("CatchUpPlumageSessionThread--catch-up: catch-up run completed for %s records newer than %s and older than %s" % (itemSet.count(), newest, datetime.now() - timedelta(seconds=300) + UTC_DIFF))
+ log.info("PlumageSessionThread--catch-up: pass completed")
+ sleep(300)
+ log.info("CatchUpPlumageSessionThread--catch-up: catch-up run completed for records newer than %s and older than %s" % (newest, datetime.now() - timedelta(seconds=300) + UTC_DIFF))
else:
- log.info("CatchUpPlumageSessionThread: Skipping catch-up, no records present (probably first-run)")
+ log.info("CatchUpPlumageSessionThread: Skipping catch-up, no records present (probably first-run)")
\ No newline at end of file
12 years
r5330 - trunk/cumin/model/upgrades
by tmckay@fedoraproject.org
Author: tmckay
Date: 2012-04-20 01:20:38 +0000 (Fri, 20 Apr 2012)
New Revision: 5330
Modified:
trunk/cumin/model/upgrades/1.2_to_1.3
Log:
Set the executable bit on the upgrade script
Property changes on: trunk/cumin/model/upgrades/1.2_to_1.3
___________________________________________________________________
Added: svn:executable
+ *
12 years
r5329 - trunk/cumin/model/upgrades
by croberts@fedoraproject.org
Author: croberts
Date: 2012-04-19 21:41:02 +0000 (Thu, 19 Apr 2012)
New Revision: 5329
Modified:
trunk/cumin/model/upgrades/1.2_to_1.3
Log:
Ok, really done now. Needed to make sure that the sequence was in the correct schema as well.
Modified: trunk/cumin/model/upgrades/1.2_to_1.3
===================================================================
--- trunk/cumin/model/upgrades/1.2_to_1.3 2012-04-19 21:30:40 UTC (rev 5328)
+++ trunk/cumin/model/upgrades/1.2_to_1.3 2012-04-19 21:41:02 UTC (rev 5329)
@@ -1,5 +1,5 @@
#!/bin/bash
echo 'create schema "com.redhat.grid.plumage"' | psql -d cumin -U cumin -h localhost
-echo 'create sequence "OSUtil_id_seq"' | psql -d cumin -U cumin -h localhost
+echo 'create sequence "com.redhat.grid.plumage"."OSUtil_id_seq"' | psql -d cumin -U cumin -h localhost
echo 'create table "com.redhat.grid.plumage"."OSUtil" ("_id" int8 not null, "ts" timestamp not null, "m" text, "n" text, "ar" text, "os" text, "ki" int8, "la" int8, "st" text, "cpu" int8, "mem" int8, constraint "OSUtil_pk" primary key ("_id"))' | psql -d cumin -U cumin -h localhost
echo 'create table "com.redhat.grid.plumage"."OSUtil_samples" ("ts" timestamp not null,"m" text,"n" text,"ar" text,"os" text,"ki" int8,"la" int8,"st" text,"cpu" int8,"mem" int8)'| psql -d cumin -U cumin -h localhost
12 years
r5328 - trunk/cumin/python/cumin
by croberts@fedoraproject.org
Author: croberts
Date: 2012-04-19 21:30:40 +0000 (Thu, 19 Apr 2012)
New Revision: 5328
Modified:
trunk/cumin/python/cumin/admin.py
Log:
Incrementing current database schema to version 1.3
Modified: trunk/cumin/python/cumin/admin.py
===================================================================
--- trunk/cumin/python/cumin/admin.py 2012-04-19 21:30:12 UTC (rev 5327)
+++ trunk/cumin/python/cumin/admin.py 2012-04-19 21:30:40 UTC (rev 5328)
@@ -7,7 +7,7 @@
log = logging.getLogger("cumin.admin")
-schema_version = "1.2"
+schema_version = "1.3"
class SchemaMissing(Exception):
pass
12 years
r5327 - trunk/cumin/model/upgrades
by croberts@fedoraproject.org
Author: croberts
Date: 2012-04-19 21:30:12 +0000 (Thu, 19 Apr 2012)
New Revision: 5327
Modified:
trunk/cumin/model/upgrades/1.2_to_1.3
Log:
Placing the tables in the proper schema.
Modified: trunk/cumin/model/upgrades/1.2_to_1.3
===================================================================
--- trunk/cumin/model/upgrades/1.2_to_1.3 2012-04-19 21:05:59 UTC (rev 5326)
+++ trunk/cumin/model/upgrades/1.2_to_1.3 2012-04-19 21:30:12 UTC (rev 5327)
@@ -1,5 +1,5 @@
#!/bin/bash
echo 'create schema "com.redhat.grid.plumage"' | psql -d cumin -U cumin -h localhost
echo 'create sequence "OSUtil_id_seq"' | psql -d cumin -U cumin -h localhost
-echo 'create table "OSUtil" ("_id" int8 not null, "ts" timestamp not null, "m" text, "n" text, "ar" text, "os" text, "ki" int8, "la" int8, "st" text, "cpu" int8, "mem" int8, constraint "OSUtil_pk" primary key ("_id"))' | psql -d cumin -U cumin -h localhost
-echo 'create table "OSUtil_samples" ("ts" timestamp not null,"m" text,"n" text,"ar" text,"os" text,"ki" int8,"la" int8,"st" text,"cpu" int8,"mem" int8)'| psql -d cumin -U cumin -h localhost
+echo 'create table "com.redhat.grid.plumage"."OSUtil" ("_id" int8 not null, "ts" timestamp not null, "m" text, "n" text, "ar" text, "os" text, "ki" int8, "la" int8, "st" text, "cpu" int8, "mem" int8, constraint "OSUtil_pk" primary key ("_id"))' | psql -d cumin -U cumin -h localhost
+echo 'create table "com.redhat.grid.plumage"."OSUtil_samples" ("ts" timestamp not null,"m" text,"n" text,"ar" text,"os" text,"ki" int8,"la" int8,"st" text,"cpu" int8,"mem" int8)'| psql -d cumin -U cumin -h localhost
12 years
r5326 - trunk/cumin/model/upgrades
by croberts@fedoraproject.org
Author: croberts
Date: 2012-04-19 21:05:59 +0000 (Thu, 19 Apr 2012)
New Revision: 5326
Modified:
trunk/cumin/model/upgrades/1.2_to_1.3
Log:
cumin database upgrade script to go from version 1.2 to 1.3.
Modified: trunk/cumin/model/upgrades/1.2_to_1.3
===================================================================
--- trunk/cumin/model/upgrades/1.2_to_1.3 2012-04-19 20:26:50 UTC (rev 5325)
+++ trunk/cumin/model/upgrades/1.2_to_1.3 2012-04-19 21:05:59 UTC (rev 5326)
@@ -1,3 +1,5 @@
#!/bin/bash
-echo CREATE TABLE "com.redhat.grid.plumage"."OSUtil"( _id bigint NOT NULL, ts timestamp without time zone NOT NULL, m text, n text, ar text, os text, ki bigint, la bigint, st text,pu bigint, mem bigint, CONSTRAINT "OSUtil_pk" PRIMARY KEY (_id ))WITH (OIDS=FALSE);ALTER TABLE "com.redhat.grid.plumage"."OSUtil" OWNER TO cumin;| psql -d cumin -U cumin -h localhost
-echo CREATE TABLE "com.redhat.grid.plumage"."OSUtil_samples"( ts timestamp without time zone NOT NULL, m text, n text, ar text, os text, ki bigint, la bigint, st text, cpu bigint, mem bigint) WITH (OIDS=FALSE);ALTER TABLE "com.redhat.grid.plumage"."OSUtil_samples" OWNER TO cumin;| psql -d cumin -U cumin -h localhost
\ No newline at end of file
+echo 'create schema "com.redhat.grid.plumage"' | psql -d cumin -U cumin -h localhost
+echo 'create sequence "OSUtil_id_seq"' | psql -d cumin -U cumin -h localhost
+echo 'create table "OSUtil" ("_id" int8 not null, "ts" timestamp not null, "m" text, "n" text, "ar" text, "os" text, "ki" int8, "la" int8, "st" text, "cpu" int8, "mem" int8, constraint "OSUtil_pk" primary key ("_id"))' | psql -d cumin -U cumin -h localhost
+echo 'create table "OSUtil_samples" ("ts" timestamp not null,"m" text,"n" text,"ar" text,"os" text,"ki" int8,"la" int8,"st" text,"cpu" int8,"mem" int8)'| psql -d cumin -U cumin -h localhost
12 years
r5325 - trunk/cumin/model/upgrades
by croberts@fedoraproject.org
Author: croberts
Date: 2012-04-19 20:26:50 +0000 (Thu, 19 Apr 2012)
New Revision: 5325
Added:
trunk/cumin/model/upgrades/1.2_to_1.3
Log:
Databae update script to add the OSUtil table for the reporting feature.
Added: trunk/cumin/model/upgrades/1.2_to_1.3
===================================================================
--- trunk/cumin/model/upgrades/1.2_to_1.3 (rev 0)
+++ trunk/cumin/model/upgrades/1.2_to_1.3 2012-04-19 20:26:50 UTC (rev 5325)
@@ -0,0 +1,3 @@
+#!/bin/bash
+echo CREATE TABLE "com.redhat.grid.plumage"."OSUtil"( _id bigint NOT NULL, ts timestamp without time zone NOT NULL, m text, n text, ar text, os text, ki bigint, la bigint, st text,pu bigint, mem bigint, CONSTRAINT "OSUtil_pk" PRIMARY KEY (_id ))WITH (OIDS=FALSE);ALTER TABLE "com.redhat.grid.plumage"."OSUtil" OWNER TO cumin;| psql -d cumin -U cumin -h localhost
+echo CREATE TABLE "com.redhat.grid.plumage"."OSUtil_samples"( ts timestamp without time zone NOT NULL, m text, n text, ar text, os text, ki bigint, la bigint, st text, cpu bigint, mem bigint) WITH (OIDS=FALSE);ALTER TABLE "com.redhat.grid.plumage"."OSUtil_samples" OWNER TO cumin;| psql -d cumin -U cumin -h localhost
\ No newline at end of file
12 years
r5324 - trunk/cumin
by tmckay@fedoraproject.org
Author: tmckay
Date: 2012-04-19 20:15:11 +0000 (Thu, 19 Apr 2012)
New Revision: 5324
Modified:
trunk/cumin/Makefile
Log:
Tweak make file
Modified: trunk/cumin/Makefile
===================================================================
--- trunk/cumin/Makefile 2012-04-19 20:08:40 UTC (rev 5323)
+++ trunk/cumin/Makefile 2012-04-19 20:15:11 UTC (rev 5324)
@@ -32,7 +32,9 @@
install -d ${CUMIN_HOME}/model/admin
install -pm 0644 model/*.xml ${CUMIN_HOME}/model
- install -pm 0755 model/upgrades/* ${CUMIN_HOME}/model/upgrades/
- install -pm 0644 model/access/* ${CUMIN_HOME}/model/access/
+ install -pm 0644 model/access/*.xml ${CUMIN_HOME}/model/access/
+ install -pm 0644 model/plumage/*.xml ${CUMIN_HOME}/model/plumage/
+ install -pm 0644 model/admin/*.xml ${CUMIN_HOME}/model/admin/
install -d ${CUMIN_HOME}/resources
install -pm 0644 ../wooly/resources/*.css ${CUMIN_HOME}/resources
install -pm 0644 ../wooly/resources/*.js ${CUMIN_HOME}/resources
12 years
r5323 - trunk/cumin/model/access
by tmckay@fedoraproject.org
Author: tmckay
Date: 2012-04-19 20:08:40 +0000 (Thu, 19 Apr 2012)
New Revision: 5323
Removed:
trunk/cumin/model/access/usergrid.xml
Log:
Remove usergrid.xml
Deleted: trunk/cumin/model/access/usergrid.xml
===================================================================
--- trunk/cumin/model/access/usergrid.xml 2012-04-19 20:00:05 UTC (rev 5322)
+++ trunk/cumin/model/access/usergrid.xml 2012-04-19 20:08:40 UTC (rev 5323)
@@ -1,39 +0,0 @@
-<AccessMap>
- <GroupAccess name="nogroup">
- <WidgetAccess reg="cumin.account.widgets.LoginForm"/>
- <WidgetAccess reg="cumin.account.widgets.LoginPage"/>
- <WidgetAccess reg="cumin.account.widgets.Submit"/>
- <FallbackPage name="login.html"/>
- </GroupAccess>
- <GroupAccess name="user">
- <SubGroupAccess name="nogroup"/>
- <WidgetAccess reg="cumin.usergrid.*" />
- <WidgetAccess reg="cumin.account.*" />
- <WidgetAccess reg="cumin.task.*" />
- <WidgetAccess reg="cumin.widgets.CuminPageLinks"/>
- <WidgetAccess reg="cumin.widgets.CuminHeartBeat"/>
- <WidgetAccess reg="cumin.objectselector.*"/>
- <WidgetAccess reg="cumin.widgets.About*" />
- <WidgetAccess reg="cumin.widgets.CuminFormPage" />
- <WidgetAccess reg="cumin.grid.submission.*" />
- <WidgetAccess reg="cumin.objectframe.*" />
- <WidgetAccess reg="cumin.widgets.Notification*" />
- <WidgetAccess reg="cumin.grid.job.*" />
- <FallbackPage name="usergrid.html"/>
- </GroupAccess>
- <GroupAccess name="admin">
- <WidgetAccess reg=".*"/>
- </GroupAccess>
- <GroupAccess name="genericadmin">
- <SubGroupAccess name="user"/>
- <WidgetAccess reg="cumin.main.Main*"/>
- <WidgetAccess reg="cumin.main.Overview*"/>
- <WidgetAccess reg="cumin.main.Top*"/>
- <WidgetAccess reg="cumin.widgets.Top*"/>
- </GroupAccess>
- <GroupAccess name="messagingadmin">
- <SubGroupAccess name="user"/>
- <WidgetAccess reg="cumin.main.Main*"/>
- <WidgetAccess reg="cumin.main.MessagingView"/>
- </GroupAccess>
-</AccessMap>
12 years
r5322 - trunk/cumin
by tmckay@fedoraproject.org
Author: tmckay
Date: 2012-04-19 20:00:05 +0000 (Thu, 19 Apr 2012)
New Revision: 5322
Modified:
trunk/cumin/Makefile
Log:
Include mode/admin and model/plumage in the install.
Include REPORTING-README in the install
Modified: trunk/cumin/Makefile
===================================================================
--- trunk/cumin/Makefile 2012-04-19 19:50:45 UTC (rev 5321)
+++ trunk/cumin/Makefile 2012-04-19 20:00:05 UTC (rev 5322)
@@ -23,10 +23,13 @@
install -pm 0755 bin/cumin bin/cumin-* ${CUMIN_HOME}/bin
install -d ${CUMIN_HOME}/doc
install -pm 0644 LICENSE COPYING ${CUMIN_HOME}/doc
+ install -pm 0644 ../mint/python/mint/plumage/REPORTING-README ${CUMIN_HOME}/doc
install -pm 0644 ../wooly/LICENSE-for-wsgiserver ${CUMIN_HOME}/doc
install -pm 0644 ../wooly/COPYING-for-wsgiserver ${CUMIN_HOME}/doc
install -d ${CUMIN_HOME}/model/upgrades
install -d ${CUMIN_HOME}/model/access
+ install -d ${CUMIN_HOME}/model/plumage
+ install -d ${CUMIN_HOME}/model/admin
install -pm 0644 model/*.xml ${CUMIN_HOME}/model
- install -pm 0755 model/upgrades/* ${CUMIN_HOME}/model/upgrades/
install -pm 0644 model/access/* ${CUMIN_HOME}/model/access/
12 years