r5415 - trunk/rosemary/python/rosemary
by tmckay@fedoraproject.org
Author: tmckay
Date: 2012-06-14 20:14:04 +0000 (Thu, 14 Jun 2012)
New Revision: 5415
Modified:
trunk/rosemary/python/rosemary/model.py
Log:
Allow statistics to always be null in main tables
Modified: trunk/rosemary/python/rosemary/model.py
===================================================================
--- trunk/rosemary/python/rosemary/model.py 2012-06-14 18:03:33 UTC (rev 5414)
+++ trunk/rosemary/python/rosemary/model.py 2012-06-14 20:14:04 UTC (rev 5415)
@@ -1032,7 +1032,8 @@
type = sql_types_by_qmf_type_string[self.type]
self.sql_column = SqlColumn(self.cls.sql_table, self.name, type)
- self.sql_column.nullable = self.optional
+ # always let stats be optional in the main table
+ self.sql_column.nullable = True
col = SqlColumn(self.cls.sql_samples_table, self.name, type)
col.nullable = self.optional
11 years, 10 months
r5414 - trunk/cumin/python/cumin
by tmckay@fedoraproject.org
Author: tmckay
Date: 2012-06-14 18:03:33 +0000 (Thu, 14 Jun 2012)
New Revision: 5414
Modified:
trunk/cumin/python/cumin/config.py
Log:
Undo revision 5413
Modified: trunk/cumin/python/cumin/config.py
===================================================================
--- trunk/cumin/python/cumin/config.py 2012-06-14 15:39:26 UTC (rev 5413)
+++ trunk/cumin/python/cumin/config.py 2012-06-14 18:03:33 UTC (rev 5414)
@@ -40,14 +40,7 @@
paths.append(os.path.join(self.home, "etc", "cumin.conf"))
paths.append(os.path.join(os.path.expanduser("~"), ".cumin.conf"))
- # If config values reference $CUMIN_HOME, replace with the
- # resolved value
- vals = self.parse_files(paths)
- for sect_key, sect_vals in vals.iteritems():
- for param, value in sect_vals.iteritems():
- if type(value) is str and "$CUMIN_HOME" in value:
- sect_vals[param] = value.replace("$CUMIN_HOME", self.home)
- return vals
+ return self.parse_files(paths)
class CuminCommonConfig(CuminConfig):
'''
11 years, 10 months
r5413 - trunk/cumin/python/cumin
by tmckay@fedoraproject.org
Author: tmckay
Date: 2012-06-14 15:39:26 +0000 (Thu, 14 Jun 2012)
New Revision: 5413
Modified:
trunk/cumin/python/cumin/config.py
Log:
Allow $CUMIN_HOME as part of a string in cumin.conf parameter values.
$CUMIN_HOME will be replaced with the resolved path before the configuration
values are passed back.
Modified: trunk/cumin/python/cumin/config.py
===================================================================
--- trunk/cumin/python/cumin/config.py 2012-06-13 19:38:27 UTC (rev 5412)
+++ trunk/cumin/python/cumin/config.py 2012-06-14 15:39:26 UTC (rev 5413)
@@ -40,7 +40,14 @@
paths.append(os.path.join(self.home, "etc", "cumin.conf"))
paths.append(os.path.join(os.path.expanduser("~"), ".cumin.conf"))
- return self.parse_files(paths)
+ # If config values reference $CUMIN_HOME, replace with the
+ # resolved value
+ vals = self.parse_files(paths)
+ for sect_key, sect_vals in vals.iteritems():
+ for param, value in sect_vals.iteritems():
+ if type(value) is str and "$CUMIN_HOME" in value:
+ sect_vals[param] = value.replace("$CUMIN_HOME", self.home)
+ return vals
class CuminCommonConfig(CuminConfig):
'''
11 years, 10 months
r5412 - trunk/cumin/model/upgrades
by tmckay@fedoraproject.org
Author: tmckay
Date: 2012-06-13 19:38:27 +0000 (Wed, 13 Jun 2012)
New Revision: 5412
Modified:
trunk/cumin/model/upgrades/1.2_to_1.3
Log:
Change of schema from 1.2 to 1.3 include moving of the BrokerGroup and BrokerGroupMapping tables from com.redhat.cumin to com.redhat.cumin.messaging.
Modified: trunk/cumin/model/upgrades/1.2_to_1.3
===================================================================
--- trunk/cumin/model/upgrades/1.2_to_1.3 2012-06-13 00:39:48 UTC (rev 5411)
+++ trunk/cumin/model/upgrades/1.2_to_1.3 2012-06-13 19:38:27 UTC (rev 5412)
@@ -19,4 +19,51 @@
echo 'ALTER TABLE "com.redhat.grid.plumage"."OSUtil_samples" ADD COLUMN usedcpu int8 NOT NULL DEFAULT 0' | psql -d cumin -U cumin -h localhost
echo 'ALTER TABLE "com.redhat.grid.plumage"."OSUtil_samples" ADD COLUMN availcpu int8 NOT NULL DEFAULT 0' | psql -d cumin -U cumin -h localhost
echo 'ALTER TABLE "com.redhat.grid.plumage"."OSUtil_samples" ADD COLUMN totalcpu int8 NOT NULL DEFAULT 0' | psql -d cumin -U cumin -h localhost
-
+echo 'DROP TABLE "com.redhat.cumin"."BrokerGroup" cascade' | psql -d cumin -U cumin -h localhost
+echo 'DROP TABLE "com.redhat.cumin"."BrokerGroup_samples" cascade' | psql -d cumin -U cumin -h localhost
+echo 'DROP TABLE "com.redhat.cumin"."BrokerGroupMapping" cascade' | psql -d cumin -U cumin -h localhost
+echo 'DROP TABLE "com.redhat.cumin"."BrokerGroupMapping_samples" cascade' | psql -d cumin -U cumin -h localhost
+echo 'DROP SEQUENCE "com.redhat.cumin"."BrokerGroup_id_seq"' | psql -d cumin -U cumin -h localhost
+echo 'DROP SEQUENCE "com.redhat.cumin"."BrokerGroupMapping_id_seq"' | psql -d cumin -U cumin -h localhost
+echo 'create schema "com.redhat.cumin.messaging"' | psql -d cumin -U cumin -h localhost
+echo 'create sequence "com.redhat.cumin.messaging"."BrokerGroup_id_seq"'| psql -d cumin -U cumin -h localhost
+echo 'create sequence "com.redhat.cumin.messaging"."BrokerGroupMapping_id_seq"'| psql -d cumin -U cumin -h localhost
+echo 'create table "com.redhat.cumin.messaging"."BrokerGroup" (
+ "_id" int8 not null,
+ "_qmf_agent_id" text not null,
+ "_qmf_object_id" text not null,
+ "_qmf_create_time" timestamp not null,
+ "_qmf_update_time" timestamp not null,
+ "_qmf_delete_time" timestamp,
+ "name" text not null,
+ "description" text,
+ constraint "BrokerGroup_pk" primary key ("_id"),
+ constraint "BrokerGroup_qmf_id_uq" unique ("_qmf_agent_id", "_qmf_object_id")
+ )' | psql -d cumin -U cumin -h localhost
+echo 'create table "com.redhat.cumin.messaging"."BrokerGroup_samples" (
+ "_qmf_agent_id" text not null,
+ "_qmf_object_id" text not null,
+ "_qmf_update_time" timestamp not null
+ )' | psql -d cumin -U cumin -h localhost
+echo 'create table "com.redhat.cumin.messaging"."BrokerGroupMapping" (
+ "_id" int8 not null,
+ "_qmf_agent_id" text not null,
+ "_qmf_object_id" text not null,
+ "_qmf_create_time" timestamp not null,
+ "_qmf_update_time" timestamp not null,
+ "_qmf_delete_time" timestamp,
+ "_broker_id" int8,
+ "_group_id" int8,
+ constraint "BrokerGroupMapping_pk" primary key ("_id"),
+ constraint "BrokerGroupMapping_qmf_id_uq" unique ("_qmf_agent_id", "_qmf_object_id")
+ )' | psql -d cumin -U cumin -h localhost
+echo 'create table "com.redhat.cumin.messaging"."BrokerGroupMapping_samples" (
+ "_qmf_agent_id" text not null,
+ "_qmf_object_id" text not null,
+ "_qmf_update_time" timestamp not null
+ )' | psql -d cumin -U cumin -h localhost
+echo 'create index "BrokerGroup_samples_qmf_id_idx" on "com.redhat.cumin.messaging"."BrokerGroup_samples" ("_qmf_agent_id", "_qmf_object_id")' | psql -d cumin -U cumin -h localhost
+echo 'create index "BrokerGroupMapping_samples_qmf_id_idx" on "com.redhat.cumin.messaging"."BrokerGroupMapping_samples" ("_qmf_agent_id", "_qmf_object_id")' | psql -d cumin -U cumin -h localhost
+echo 'alter table "com.redhat.cumin.messaging"."BrokerGroupMapping"
+ add constraint "_broker_id_fk" foreign key ("_broker_id") references "org.apache.qpid.broker"."Broker" ("_id") on update cascade on delete set null,
+ add constraint "_group_id_fk" foreign key ("_group_id") references "com.redhat.cumin.messaging"."BrokerGroup" ("_id") on update cascade on delete set null' | psql -d cumin -U cumin -h localhost
11 years, 10 months
r5411 - trunk/cumin/model/access
by tmckay@fedoraproject.org
Author: tmckay
Date: 2012-06-13 00:39:48 +0000 (Wed, 13 Jun 2012)
New Revision: 5411
Modified:
trunk/cumin/model/access/persona.xml
Log:
Restore order of tabs in the default persona
BZ830854
Modified: trunk/cumin/model/access/persona.xml
===================================================================
--- trunk/cumin/model/access/persona.xml 2012-06-12 19:49:56 UTC (rev 5410)
+++ trunk/cumin/model/access/persona.xml 2012-06-13 00:39:48 UTC (rev 5411)
@@ -2,9 +2,9 @@
<Persona name="default" auth="True">
<Module name="account"/>
<Module name="configuration"/>
+ <Module name="messaging"/>
<Module name="grid"/>
<Module name="inventory"/>
- <Module name="messaging"/>
<Module name="usergrid"/>
<GroupAccess name="nogroup">
@@ -48,7 +48,7 @@
<Persona name="messaging" auth="False">
<Module name="account"/>
+ <Module name="messaging"/>
<Module name="inventory"/>
- <Module name="messaging"/>
</Persona>
-</PersonaMap>
\ No newline at end of file
+</PersonaMap>
11 years, 11 months
r5410 - branches/stability/cumin/model/access
by tmckay@fedoraproject.org
Author: tmckay
Date: 2012-06-12 19:49:56 +0000 (Tue, 12 Jun 2012)
New Revision: 5410
Modified:
branches/stability/cumin/model/access/persona.xml
Log:
Add newline at end of file
Modified: branches/stability/cumin/model/access/persona.xml
===================================================================
--- branches/stability/cumin/model/access/persona.xml 2012-06-12 19:43:01 UTC (rev 5409)
+++ branches/stability/cumin/model/access/persona.xml 2012-06-12 19:49:56 UTC (rev 5410)
@@ -51,4 +51,4 @@
<Module name="messaging"/>
<Module name="inventory"/>
</Persona>
-</PersonaMap>
\ No newline at end of file
+</PersonaMap>
11 years, 11 months
r5409 - branches/stability/cumin/python/cumin
by tmckay@fedoraproject.org
Author: tmckay
Date: 2012-06-12 19:43:01 +0000 (Tue, 12 Jun 2012)
New Revision: 5409
Modified:
branches/stability/cumin/python/cumin/main.py
Log:
Add fix for time.time() in main.py (problem caused by other imports)
Modified: branches/stability/cumin/python/cumin/main.py
===================================================================
--- branches/stability/cumin/python/cumin/main.py 2012-06-12 19:25:56 UTC (rev 5408)
+++ branches/stability/cumin/python/cumin/main.py 2012-06-12 19:43:01 UTC (rev 5409)
@@ -611,6 +611,10 @@
qdate = self.field.get_content(session, record)
if qdate is None:
return 0
+ # Because of overzealous imports in different places,
+ # we have already seen 'from time import time'. So,
+ # we place the 'import time' here to clear that up.
+ import time
return fmt_duration(time.time() - secs(qdate))
def render_text_align(self, session):
11 years, 11 months
r5408 - branches/stability/cumin/model/access
by tmckay@fedoraproject.org
Author: tmckay
Date: 2012-06-12 19:25:56 +0000 (Tue, 12 Jun 2012)
New Revision: 5408
Modified:
branches/stability/cumin/model/access/persona.xml
Log:
Restore the previous order of tabs in the default persona.
Modified: branches/stability/cumin/model/access/persona.xml
===================================================================
--- branches/stability/cumin/model/access/persona.xml 2012-06-06 19:44:54 UTC (rev 5407)
+++ branches/stability/cumin/model/access/persona.xml 2012-06-12 19:25:56 UTC (rev 5408)
@@ -2,9 +2,9 @@
<Persona name="default" auth="True">
<Module name="account"/>
<Module name="configuration"/>
+ <Module name="messaging"/>
<Module name="grid"/>
<Module name="inventory"/>
- <Module name="messaging"/>
<Module name="usergrid"/>
<GroupAccess name="nogroup">
@@ -48,7 +48,7 @@
<Persona name="messaging" auth="False">
<Module name="account"/>
+ <Module name="messaging"/>
<Module name="inventory"/>
- <Module name="messaging"/>
</Persona>
</PersonaMap>
\ No newline at end of file
11 years, 11 months
r5407 - trunk/mint/python/mint
by tmckay@fedoraproject.org
Author: tmckay
Date: 2012-06-06 19:44:54 +0000 (Wed, 06 Jun 2012)
New Revision: 5407
Modified:
trunk/mint/python/mint/vacuum.py
Log:
Initialization of self.processing_vacuum was in the wrong place
Modified: trunk/mint/python/mint/vacuum.py
===================================================================
--- trunk/mint/python/mint/vacuum.py 2012-06-06 19:36:08 UTC (rev 5406)
+++ trunk/mint/python/mint/vacuum.py 2012-06-06 19:44:54 UTC (rev 5407)
@@ -6,12 +6,12 @@
class VacuumThread(MintPeriodicProcessThread):
def __init__(self, app):
super(VacuumThread, self).__init__(app, 60 * 60)
+ self.processing_vacuum = False
def init(self):
super(VacuumThread, self).init()
log.debug("Vacuum interval is %i seconds", self.interval)
- self.processing_vacuum = False
def run(self):
if self.interval >= 60 * 60:
11 years, 11 months
r5406 - in trunk: cumin/python/cumin sage/python/sage/wallaby
by tmckay@fedoraproject.org
Author: tmckay
Date: 2012-06-06 19:36:08 +0000 (Wed, 06 Jun 2012)
New Revision: 5406
Modified:
trunk/cumin/python/cumin/main.py
trunk/sage/python/sage/wallaby/wallabyoperations.py
Log:
Tweak shutdown for the wallaby thread.
Modified: trunk/cumin/python/cumin/main.py
===================================================================
--- trunk/cumin/python/cumin/main.py 2012-06-06 19:18:53 UTC (rev 5405)
+++ trunk/cumin/python/cumin/main.py 2012-06-06 19:36:08 UTC (rev 5406)
@@ -272,7 +272,7 @@
log.info("Stopping %s", self)
if self.wallaby is not None:
- self.wallaby.stop()
+ self.wallaby.stop(wait=True)
self.server.stop()
try:
Modified: trunk/sage/python/sage/wallaby/wallabyoperations.py
===================================================================
--- trunk/sage/python/sage/wallaby/wallabyoperations.py 2012-06-06 19:18:53 UTC (rev 5405)
+++ trunk/sage/python/sage/wallaby/wallabyoperations.py 2012-06-06 19:36:08 UTC (rev 5406)
@@ -286,7 +286,7 @@
self._stop = True
self._condition.notify()
self._condition.release()
- if wait:
+ if wait and self._maintain_cache.isAlive():
self._maintain_cache.join(timeout)
log.debug("WallabyOperations: stopped cache maintenance thread")
11 years, 11 months