alces-software / adminware

A sandbox CLI for running commands remotely across nodes
1 stars 0 forks source link

A bunk entry is being added to the Job table of the DB for each job ran #122

Closed DavidMarchant closed 5 years ago

DavidMarchant commented 5 years ago

an example of such an entry is:

``` adminware> view result 150 ╔═══════════╦════════════════════════════╗ ║ Date ║ 2018-10-31 15:20:08.406823 ║ ╠═══════════╬════════════════════════════╣ ║ Job ID ║ 150 ║ ╠═══════════╬════════════════════════════╣ ║ Node ║ test_node ║ ╠═══════════╬════════════════════════════╣ ║ Exit Code ║ None ║ ╠═══════════╬════════════════════════════╣ ║ Command ║ steve ║ ╠═══════════╬════════════════════════════╣ ║ Arguments ║ ║ ╠═══════════╬════════════════════════════╣ ║ STDOUT ║ None ║ ╠═══════════╬════════════════════════════╣ ║ STDERR ║ None ║ ╚═══════════╩════════════════════════════╝ ```

this is commited immediately after the legitimate one, for example:

``` adminware> view result 149 ╔═══════════╦════════════════════════════════════╗ ║ Date ║ 2018-10-31 15:20:08.232035 ║ ╠═══════════╬════════════════════════════════════╣ ║ Job ID ║ 149 ║ ╠═══════════╬════════════════════════════════════╣ ║ Node ║ test_node ║ ╠═══════════╬════════════════════════════════════╣ ║ Exit Code ║ -1 ║ ╠═══════════╬════════════════════════════════════╣ ║ Command ║ steve ║ ╠═══════════╬════════════════════════════════════╣ ║ Arguments ║ ║ ╠═══════════╬════════════════════════════════════╣ ║ STDOUT ║ None ║ ╠═══════════╬════════════════════════════════════╣ ║ STDERR ║ Could not establish ssh connection ║ ╚═══════════╩════════════════════════════════════╝ ```

If running a command over >1 node or a group all the 'bunk' entries follow all legitimate ones.

In addition to using up twice as many Job_IDs, this interferes greatly with the node-status command (all the "most recent exit code"s are labeled as None)

It very likely results from the merging of code involved with parallelization to develop (https://github.com/alces-software/adminware/commit/87cf03d64ea2b25a692dbcf06577389e5e9e3754).