From b38d1bb66c3989ae89b11e7d223259e7120fb163 Mon Sep 17 00:00:00 2001 From: Stephen Soltesz Date: Tue, 16 Jun 2009 20:35:34 +0000 Subject: [PATCH] enable monitor in plc-config add easy_install packages to update critical packages for monitor auto-close a ticket whose status was changed in RT --- Monitor.spec | 13 +++++++++---- monitor/database/info/action.py | 2 +- monitor/database/info/interface.py | 2 ++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Monitor.spec b/Monitor.spec index af4111f..5ac70fe 100644 --- a/Monitor.spec +++ b/Monitor.spec @@ -211,12 +211,17 @@ rm -rf $RPM_BUILD_ROOT /%{_initrddir}/monitor-runlevelagent %post server-deps -#easy_install --build-directory /var/tmp -UZ Elixir #easy_install --build-directory /var/tmp -UZ ElementTree -## TODO: something is bad wrong with this approach. ##easy_install --build-directory /var/tmp -UZ http://pypi.python.org/packages/2.5/E/Extremes/Extremes-1.1-py2.5.egg -#easy_install --build-directory /var/tmp -UZ http://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.5.3.tar.gz -#easy_install --build-directory /var/tmp -UZ http://files.turbogears.org/eggs/TurboGears-1.0.7-py2.5.egg + +# NOTE: enable monitor by default, since we're installing it. +plc-config --save /etc/planetlab/default_config.xml \ + --category plc_monitor --variable enabled --value true + +## TODO: something is bad wrong with this approach. +easy_install --build-directory /var/tmp -UZ http://files.turbogears.org/eggs/TurboGears-1.0.7-py2.5.egg +easy_install --build-directory /var/tmp -UZ http://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.5.3.tar.gz +easy_install --build-directory /var/tmp -UZ Elixir # crazy openssl libs for racadm binary ln -s /lib/libssl.so.0.9.8b /usr/lib/libssl.so.2 diff --git a/monitor/database/info/action.py b/monitor/database/info/action.py index 0abec62..ab55ed0 100644 --- a/monitor/database/info/action.py +++ b/monitor/database/info/action.py @@ -83,7 +83,7 @@ class ActionRecord(Entity): # TODO: need to sort on 'round' since actions will not be globally sync'd. return cls.query.filter_by(**kwargs).order_by(ActionRecord.id.desc()).first() -# ACCOUNTING + # ACCOUNTING date_created = Field(DateTime,default=datetime.now) loginbase = Field(String,default=None) hostname = Field(String,default=None) diff --git a/monitor/database/info/interface.py b/monitor/database/info/interface.py index c0ffbf3..0692ede 100644 --- a/monitor/database/info/interface.py +++ b/monitor/database/info/interface.py @@ -127,6 +127,8 @@ class SiteInterface(HistorySiteRecord): if viart: self.getTicketStatus() # get current message status + if self.db.message_status not in ['open', 'new']: + self.closeTicket() m = Message(message[0] % args, message[1] % args, viart, self.db.message_id) -- 2.43.0