Skip to content

Commit

Permalink
Merging deb/5.1.3-1 into 5.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
arlake228 committed Sep 6, 2024
2 parents d8b8099 + 2002245 commit a3efdfb
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 10 deletions.
10 changes: 7 additions & 3 deletions psconfig/perfsonar-psconfig/bin/commands/agentctl
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,13 @@ elif len(args.values) > 0:
cli.print_msg("Successfully set {} in {}".format(args.prop, config_file))
elif args.unset:
#unset an option
del agent_conf.data[args.prop]
_save_and_validate(agent_conf, config_client, cli)
cli.print_msg("Successfully unset {} in {}".format(args.prop, config_file))
try:
del agent_conf.data[args.prop]
_save_and_validate(agent_conf, config_client, cli)
cli.print_msg("Successfully unset {} in {}".format(args.prop, config_file))
except KeyError:
cli.print_msg("{} was not set in {}. No action performed".format(args.prop, config_file))

else:
# print current value of property
_print_prop(args.prop, agent_conf.data.get(args.prop, None), cli)
2 changes: 1 addition & 1 deletion psconfig/perfsonar-psconfig/psconfig/base_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def run(self):
check_interval = None

try:
check_interval = duration_to_seconds(agent_conf.check_interval())
check_interval = int(duration_to_seconds(agent_conf.check_interval()))
except Exception as e:
self.logger.error(self.logf.format("Error parsing check-interval. Defaulting to " + str(self.check_interval_seconds) + " seconds: {}".format(e)))
pass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,8 @@ def _evaluate_task(self, tmap, need_new_task, new_start_time):
if ((not old_task['task'].detail_exclusive()) #not exclusive
and old_task['task'].detail_multiresult() #is multi-result
and (old_task_start_ts + 15*60) < int(time.time()) #started at least 15 min ago
and (
(old_task['task'].detail_runs_started() is not None and (old_task['task'].detail_runs_started()== 0)) #have at no runs started (v1.1 and later)
or (old_task['task'].detail_runs_started() is not None and (old_task['task'].detail_runs() <= 2)) #have less than two runs (not 1 because count bugged) (pre-v1.1)
)):
and (old_task['task'].detail_runs_started() is not None and (old_task['task'].detail_runs_started()== 0)) #no runs started
):

#if background-multi, one or less runs and start time is 15 minutes (arbitrary)
# in the past the start time is immediately. Fixes special cases where bgm
Expand Down
2 changes: 1 addition & 1 deletion psconfig/perfsonar-psconfig/psconfig/pscheduler/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def _run_start(self, agent_conf):
task_min_ttl_seconds = None

try:
task_min_ttl_seconds = duration_to_seconds(agent_conf.task_min_ttl())
task_min_ttl_seconds = int(duration_to_seconds(agent_conf.task_min_ttl()))
except Exception as e:
self.logger.error(self.logf.format("Error parsing task-min-ttl. Defaulting to " + str(self.task_min_ttl_seconds) + " seconds: {}".format(e)))

Expand Down
3 changes: 2 additions & 1 deletion psconfig/perfsonar-psconfig/psconfig/utilities/iso8601.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import isodate

def duration_to_seconds(iso):
"""Convert an ISO 8601 string to a timdelta and return total seconds"""
"""Convert an ISO 8601 string to a timdelta and return total seconds
Returns float"""
try:
duration = isodate.parse_duration(iso)
except isodate.isoerror.ISO8601Error:
Expand Down
6 changes: 6 additions & 0 deletions psconfig/perfsonar-psconfig/unibuild-packaging/deb/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ perfsonar-psconfig (5.2.0~a1.0-1) perfsonar-5.2-snapshot; urgency=low

-- perfSONAR developers <[email protected]> Tue, 11 Jun 2024 18:27:11 +0200

perfsonar-psconfig (5.1.3-1) perfsonar-5.1; urgency=low

* New upstream version.

-- perfSONAR developers <[email protected]> Fri, 06 Sep 2024 11:41:34 -0400

perfsonar-psconfig (5.1.2-1) perfsonar-5.1; urgency=low

* New upstream version.
Expand Down

0 comments on commit a3efdfb

Please sign in to comment.