From c80ae9742c1a07210da9c4e9e3256a8507021030 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Wed, 18 Mar 2009 14:52:58 +0000 Subject: [PATCH] Settings for the Real Time Monitor: - using DN of testing machine for now - set-up necessary index - disabled by default for now New variable GLITE_LB_SUPER_USERS with additional superusers. --- org.glite.yaim.lb/config/functions/config_glite_lb | 23 ++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/org.glite.yaim.lb/config/functions/config_glite_lb b/org.glite.yaim.lb/config/functions/config_glite_lb index 8019531..03e2450 100644 --- a/org.glite.yaim.lb/config/functions/config_glite_lb +++ b/org.glite.yaim.lb/config/functions/config_glite_lb @@ -14,6 +14,9 @@ function config_glite_lb_setenv(){ yaimgridenv_set GLITE_LB_EXPORT_ENABLED ${GLITE_LB_EXPORT_ENABLED:-false} yaimgridenv_set GLITE_LB_EXPORT_PURGE_ARGS "${GLITE_LB_EXPORT_PURGE_ARGS:---cleared 2d --aborted 15d --cancelled 15d --other 60d}" yaimgridenv_set GLITE_LB_EXPORT_JPPS ${GLITE_LB_EXPORT_JPPS:-} + yaimgridenv_set GLITE_LB_RTM_ENABLED ${GLITE_LB_RTM_ENABLED:-false} + yaimgridenv_set GLITE_LB_RTM_DN ${GLITE_LB_RTM_DN:-/C=UK/O=eScience/OU=Imperial/L=Physics/CN=heppc24.hep.ph.ic.ac.uk/Email=janusz.martyniak@imperial.ac.uk} + yaimgridenv_set GLITE_LB_SUPER_USERS ${GLITE_LB_SUPER_USERS:-} yaimgridpath_append LD_LIBRARY_PATH ${INSTALL_ROOT:-opt}/c-ares/lib yaimgridpath_append LD_LIBRARY_PATH ${INSTALL_ROOT:-opt}/classads/lib @@ -86,12 +89,21 @@ function config_glite_lb() { mysql -u root --password="$MYSQL_PASSWORD" -e "ALTER TABLE long_fields MAX_ROWS=55000000;" lbserver20 mysql -u root --password="$MYSQL_PASSWORD" -e "ALTER TABLE states MAX_ROWS=9500000;" lbserver20 mysql -u root --password="$MYSQL_PASSWORD" -e "ALTER TABLE events MAX_ROWS=175000000;" lbserver20 + + if [ x"$GLITE_LB_RTM_ENABLED" = x"true" ]; then + # index for querying older jobs by real time monitor + cat << EOF | $GLITE_LOCATION/bin/glite-lb-bkindex -rv +[ + JobIndices = { + [ type = "system"; name = "lastUpdateTime" ] + } +] +EOF + fi else yaimlog WARNING "Database lbserver20 already exists" fi - # do we need bkindex? - mkdir -p $GLITE_LOCATION_VAR # Needed to store PID of LB server chown $GLITE_USER:$GLITE_USER $GLITE_LOCATION_VAR @@ -147,6 +159,13 @@ EOF fi touch ${GLITE_LOCATION}/etc/LB-super-users + echo "$GLITE_LB_SUPER_USERS" > ${GLITE_LOCATION}/etc/LB-super-users.add + if [ x"$GLITE_LB_RTM_ENABLED" = x"true" ]; then + echo "$GLITE_LB_RTM_DN" >> ${GLITE_LOCATION}/etc/LB-super-users.add + fi + mv ${GLITE_LOCATION}/etc/LB-super-users ${GLITE_LOCATION}/etc/LB-super-users.prev + cat ${GLITE_LOCATION}/etc/LB-super-users.prev ${GLITE_LOCATION}/etc/LB-super-users.add | sort | uniq > ${GLITE_LOCATION}/etc/LB-super-users + rm ${GLITE_LOCATION}/etc/LB-super-users.prev ${GLITE_LOCATION}/etc/LB-super-users.add . /opt/glite/etc/profile.d/grid-env.sh ${GLITE_LOCATION}/etc/init.d/glite-lb-bkserverd stop -- 1.8.2.3