Commit b21e50c2 authored by Andrea Sciaba's avatar Andrea Sciaba
Browse files

First version

parent 7a92076d
CMS-specific Nagios files can be found here.
HOW TO BUILD THE CMS PROBE RPM
------------------------------
Run the following commands:
export NAG_TMP=`mktemp -d`
export NAG_DEST=/afs/cern.ch/cms/LCG/SAM/RPM
cd $NAG_TMP
cvs co CMSSAM
svn co svn+ssh://svn.cern.ch/reps/it-es-vos/trunk/sam-vo-probes
export NAG_SCRIPTS=/afs/cern.ch/cms/LCG/SAM/scripts
$NAG_SCRIPTS/sam2nagios.sh
Edit the spec file to change version number and add description.
Run the following commands:
$NAG_SCRIPTS/make_rpm.sh <version>
cd
rm -rf $NAG_TMP
%define site org.cms
%define dir %{_libexecdir}/grid-monitoring/probes
%define conf /usr/lib/perl5/vendor_perl/5.8.5/NCG/LocalMetrics
%define ncg /etc/ncg
Summary: WLCG Compliant Probes from %{site}
Name: grid-monitoring-probes-org.cms
Version: 0.1.41
Release: 1%{?dist}
License: GPL
Group: Network/Monitoring
Source0: %{name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: python >= 2.4
Requires: python-GridMon >= 1.1.3
Requires: python-ldap
Requires: python-suds >= 0.3.5
AutoReqProv: no
BuildArch: noarch
%description
Contains the CMS-specific probes and metrics.
%prep
%setup -q
%build
%install
%{__rm} -rf %{buildroot}
install --directory %{buildroot}/%{dir}
install --directory %{buildroot}/%{conf}
install --directory %{buildroot}/%{ncg}
install --directory %{buildroot}/etc/cron.d
%{__cp} -rpf %{site} %{buildroot}%{dir}
%{__cp} -rpf config/Hash_local.pm %{buildroot}%{conf}
%{__cp} -rpf config/cms_glexec %{buildroot}/etc/cron.d
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{dir}/%{site}
%{conf}/Hash_local.pm
/etc/cron.d/cms_glexec
%changelog
* Thu Aug 23 2012 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.41-1.
- Fixed bug in mc test causing the test to always pass
- converted errors to warnings in glexec test
* Wed Aug 22 2012 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.40-1.
- mc test now uses WMCore code
* Tue Aug 21 2012 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.39-1.
- Removed SL5 check from analysis and frontier test
* Thu Jul 5 2012 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.38-1.
- Made basic samtest-run compliant and changed SCRAM_ARCH
- Fixed squid exception for RAL in fetch-from-web
* Mon Jul 2 2012 Duncan Ralph <Duncan.Kelley.Ralph@cern.ch> 0.1.37-1.
- Updated swinst test
* Wed Jun 15 2012 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.36-1.
- Changed analysis test to use CMSSW_5_3_1; updated swinst test
* Tue May 15 2012 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.35-1.
- Allow glexec test to succeed wen only the GID changes
* Wed May 9 2012 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.34-1.
- Increased verbosity of Nagios on WN to 3
- Removed calls to unwanted commands in glprobe.sh; added sleep in analysis test to delay its execution
* Wed Apr 25 2012 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.33-1.
- Fixed bug in RPM (Hash_local.pm and cms_glexec being links)
* Thu Apr 16 2012 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.32-1.
- Set --timeout-job-discard to 84600 and --timeout-wnjob-global to 1800 for JobState; updated glexec probe
* Wed Mar 14 2012 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.31-1.
- Updated basic, CMSSW_frontier.sh and swinst
* Tue Feb 14 2012 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.30-1.
- Updated swinst
* Thu Jan 26 2012 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.29-1.
- Fixed bug in Hash_local.pm
* Wed Jan 18 2012 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.28-1.
- All WN tests (apart mc) now generate a good HTML
* Wed Dec 14 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.27-1.
- Removed hr.srce.SRM2-CertLifetime from the tests to run
* Wed Nov 30 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.26-1.
- Removed slc4 architecture from swinst test
* Wed Nov 16 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.25-1.
- Changed mc test to support fallback
* Wed Nov 2 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.24-1.
- Added support for ARC-CE in Hash_local.pm
- New version of swinst
- NCG cron disabled by default
* Tue Oct 4 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.23-1.
- NCG configuration supports OSG services
* Tue Sep 27 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.22-1.
- Fixed bug in SRM probe causing tests to fail when a cached PFN is used that was not properly deleted by a previous test
* Tue Sep 13 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.21-1.
- Fixed small bug in analysis test output
* Tue Sep 13 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.20-1.
- Updated analysis, swinst tests to new CMSSW version
* Fri Jul 29 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.19-1.
- Fixed bug in new Frontier test
* Wed Jul 27 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.18-1.
- Updated Frontier test
- Added timeouts to lcg-del in mc test
* Mon Jun 22 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.17-1.
- Added new glexec test
- New SRM probe with correct behaviour for the GetPFNFromTFC test
- Modified Hash_local.pm to expose org.cms.glexec.WN-gLExec for CREAMCE
* Tue May 31 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.16-1.
- Added glexec test
* Tue May 24 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.15-1.
- Added white/black list of sites
* Fri May 6 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.13-1.
- Timeouts for jobs lengthened to 12 h
- Timeouts for SRM lengthened to 30 minutes
* Tue Apr 11 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.12-1.
- Updated tests.
* Tue Mar 29 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.11-1.
- Updated tests, increased SRMAll timeout, fixed missing WN conf.
* Thu Mar 24 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.10-1.
- Updated tests and configuration to run SRM tests only once.
* Mon Mar 14 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.9-1.
- Updated tests.
* Mon Feb 21 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.8-1.
- Added configuration files.
* Fri Feb 18 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.7-1.
- Added configuration files.
* Fri Feb 18 2011 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.6-1.
- Added new version of srmvometrics.py.
* Thu Dec 9 2010 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.5-1.
- Added new version of srmvometrics.py.
* Tue Nov 9 2010 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.4-1.
- Added custom variables to sam-generic-wn in services.cfg.
* Wed Aug 25 2010 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.3-1.
- Upgraded to latest version of SRM probe.
* Tue Aug 3 2010 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.2-1.
- Fixed bug in SRM probe.
* Fri Jul 23 2010 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.1-1.
- Updated the CMS tests and included them all, including SRM.
* Mon Feb 08 2010 Andrea Sciaba <Andrea.Sciaba@cern.ch> 0.1.0-1.
- First version with some WN tests.
#!/bin/sh
if [ -z "$NAG_TMP" ] ; then
echo "NAG_TMP undefined"
exit 1
fi
cd $NAG_TMP
if [ -z "$NAG_SCRIPTS" ] ; then
echo "NAG_SCRIPTS undefined"
exit 1
fi
if [ -z "$NAG_DEST" ] ; then
echo "NAG_DEST undefined"
exit 1
fi
ver=$1
if [ -z "$ver" ] ; then
echo "Specify version!"
exit 1
fi
specver=`grep 'Version:' $NAG_SCRIPTS/grid-monitoring-probes-org.cms.spec | cut -d' ' -f2`
if [ "$specver" != $ver ] ; then
echo "Spec file not updated!"
exit 1
fi
rm -rf tmp/grid-monitoring-probes-org.cms-$ver
mkdir -p tmp/grid-monitoring-probes-org.cms-$ver
cp -a org.cms tmp/grid-monitoring-probes-org.cms-$ver
cp -a config tmp/grid-monitoring-probes-org.cms-$ver
cd tmp
tar zcf grid-monitoring-probes-org.cms-$ver.tgz grid-monitoring-probes-org.cms-$ver
mkdir -p $NAG_TMP/SOURCES
mkdir -p $NAG_TMP/BUILD
mkdir -p $NAG_TMP/RPMS
mv grid-monitoring-probes-org.cms-$ver.tgz $NAG_TMP/SOURCES
cd ..
cat > .rpmmacros <<EOF
%_topdir $NAG_TMP
%_dbpath $NAG_TMP/db
%_tmppath $NAG_TMP/rpm-tmp
%_sourcedir $NAG_TMP/SOURCES
EOF
export HOME=`pwd`
rpmbuild -bb $NAG_SCRIPTS/grid-monitoring-probes-org.cms.spec
if [ $? -eq 0 ] ; then
cp -i $NAG_TMP/RPMS/noarch/grid-monitoring-probes-org.cms-$ver-1.noarch.rpm $NAG_DEST/
fi
rm -rf BUILD RPMS rpm-tmp SOURCES tmp
#!/bin/bash
BASEDIR=$NAG_TMP
SAMDIR=$BASEDIR/CMSSAM
NAGDIR=$BASEDIR
NAGCONF=$SAMDIR/nagios/config
rm -rf $NAGDIR/org.cms/*
mkdir -p $NAGDIR/org.cms/wnjob/org.cms/etc/wn.d/org.cms
cp -L $NAGCONF/services.cfg $NAGCONF/commands.cfg $NAGDIR/org.cms/wnjob/org.cms/etc/wn.d/org.cms/
cp $NAGDIR/sam-vo-probes/srmvometrics.py $NAGDIR/org.cms/srmvometrics.py.ORIG
sed -e 's/org.vos/org.cms/' $NAGDIR/org.cms/srmvometrics.py.ORIG > $NAGDIR/org.cms/srmvometrics.py
chmod +x $NAGDIR/org.cms/srmvometrics.py
rm -rf $NAGDIR/org.cms/srmvometrics.py.ORIG
mkdir -p $NAGDIR/config
cp -L $NAGCONF/Hash_local.pm -L $NAGCONF/cms_glexec $NAGDIR/config/
srcdir=$SAMDIR
dstdir=$NAGDIR/org.cms/wnjob/org.cms/probes/org.cms
sensor='testjob'
modules='FroNtier MonteCarlo testjob'
for i in $modules ; do
cd $srcdir/SiteTests/$i
for j in `find . -not -regex '.*\(CVS\).*'` ; do
if [ -d $j ] ; then
mkdir -p $dstdir/$sensor/$j
else
cp $j $dstdir/$sensor/`dirname $j`
fi
done
done
cd $srcdir/nagios/
dstdir=$NAGDIR/org.cms/wnjob/
for j in `find org.cms.glexec -not -regex '.*\(CVS\).*'` ; do
if [ -d $j ] ; then
mkdir -p $dstdir/$j
else
cp $j $dstdir/`dirname $j`
fi
done
cd $BASEDIR
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment