diff --git a/ChangeLog b/ChangeLog index 7408d33..823a4bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,17 @@ SGAS BART ChangeLog 008: +Changed default behavior of idtimestamp to true and moved config +option into the [slurm] module. + +Bart do exits with error code if something goes wrong (Fixes #1) + +Diffrent errors gives diffrent severity in log files (Fixes #2) + +Client side verification of UR XML before sending (Fixes #4) + +Rewritten the LRMS modules for easier maintainance (Fixes #3) + Changed how slurm reports number of nodes. This change the output format from the sacct command. diff --git a/bart/__init__.py b/bart/__init__.py index a9eee25..054ef81 100644 --- a/bart/__init__.py +++ b/bart/__init__.py @@ -1,8 +1,4 @@ # bart/__init__.py -import time -gmt = time.gmtime() - -# set this to "correct" version when making a release -__version__ = 'svn-%04d%02d%02d' % (gmt.tm_year, gmt.tm_mon, gmt.tm_mday) +__version__ = '008' diff --git a/bart/common.py b/bart/common.py index 1082065..4adfe70 100644 --- a/bart/common.py +++ b/bart/common.py @@ -61,6 +61,11 @@ def getSeconds(time_str): Convert a string of the form '%d-%H:%M:%S', '%H:%M:%S' or '%M:%S' to seconds. """ + + # an empty string will never be a time... + if time_str == "": + return None + # sometimes the timestamp includs a fractional second part time_str = time_str.split('.')[0] @@ -78,7 +83,7 @@ def getSeconds(time_str): sec = st.tm_min*60+st.tm_sec except ValueError: logging.error('String: %s does not match time format.' % time_str) - return -1 + return None return sec @@ -101,4 +106,4 @@ def writeUr(ur,cfg): ur_file = os.path.join(ur_dir, ur.record_id) ur.writeXML(ur_file) - logging.info('Wrote usage record to %s' % ur_file) \ No newline at end of file + logging.info('Wrote usage record to %s' % ur_file) diff --git a/bart/config.py b/bart/config.py index b140447..3f4289c 100644 --- a/bart/config.py +++ b/bart/config.py @@ -78,8 +78,6 @@ def getConfigValueBool(self, section, value, default=None): # Check for missing items and check syntax def validate(self,section,lrms): - print lrms - for key in lrms.CONFIG: item = lrms.CONFIG[key] value = self.getConfigValue(section, key, None) diff --git a/datafiles/etc/bart.conf b/datafiles/etc/bart.conf index f1b66de..11b1710 100644 --- a/datafiles/etc/bart.conf +++ b/datafiles/etc/bart.conf @@ -16,10 +16,6 @@ #logfile=/var/log/bart.log #statedir=/var/spool/bart -# If you use bart together with ARC, please read docs/arc-codeployment first! -# This should probably be true as default. -idtimestamp=true - ## Logging points [logger] #log_all="https://host.example.org:6143/sgas" @@ -40,4 +36,7 @@ idtimestamp=true ## example slurm configuration ## uncomment the section if you want to use SLURM #[slurm] +# If you use bart together with ARC, please read docs/arc-codeployment first! +# This should probably be true as default. +#idtimestamp=true diff --git a/sgas-bart.spec b/sgas-bart.spec index dfb7ba0..08902fb 100644 --- a/sgas-bart.spec +++ b/sgas-bart.spec @@ -1,5 +1,5 @@ %define name sgas-bart -%define version 007 +%define version 008 %define release 1 Summary: SGAS Batch system Reporting Tool