Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
6 changes: 1 addition & 5 deletions bart/__init__.py
Original file line number Diff line number Diff line change
@@ -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'

9 changes: 7 additions & 2 deletions bart/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand All @@ -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

Expand All @@ -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)
logging.info('Wrote usage record to %s' % ur_file)
2 changes: 0 additions & 2 deletions bart/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 3 additions & 4 deletions datafiles/etc/bart.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

2 changes: 1 addition & 1 deletion sgas-bart.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%define name sgas-bart
%define version 007
%define version 008
%define release 1

Summary: SGAS Batch system Reporting Tool
Expand Down