christopherwharrop / rocoto

Rocoto Workflow Management System
Apache License 2.0
21 stars 16 forks source link

Bug in backup log file numbering #72

Open christopherwharrop opened 4 years ago

christopherwharrop commented 4 years ago

The following was reported by Gerard Ketefian:

Hi (Chris?),

Just wanted to report a minor bug in rocoto that I've noticed for a long time now but haven't gotten around to reporting.

As you know, when a task is called more than one time, the previous log file(s) from that task get renumbered as [task_name].log.0, [task_name].log.1, etc, with the largest integer corresponding to the oldest file.

I've noticed that when the number of times a task is called reaches 10 or more (e.g. due to issuing of repeated "rocotoboot"s), there are no even-numbered task log files. For example, if the task name is make_grid, then I get the following files:

$ ls -alF make_grid.log make_grid.log.0 make_grid.log.1 make_grid.log.11 make_grid.log.13 make_grid.log.15 make_grid.log.17 make_grid.log.2 make_grid.log.3 make_grid.log.4 make_grid.log.5 make_grid.log.6 make_grid.log.7 make_grid.log.8 make_grid.log.9

The one without a number at the end (in bold) is the log from the latest execution of the task, and the others are from previous executions. You can see that 10, 12, 14, 16, etc are missing.

I don't know what happens when you get to the 20's. I'm on hera and using rocoto/1.3.1.