alces-software / adminware

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

Is the default command functionality as desired? #84

Closed DavidMarchant closed 6 years ago

DavidMarchant commented 6 years ago

Just a question: because the behavior for if a tool doesn't have a valid command associated with it is to just to echo a statement saying this (https://github.com/alces-software/adminware/blob/develop/src/models/config.py#L17), if you run a batch command with an incorrectly configured or missing command it runs the echo command (not whatever command was intended) and returns a Pass - is this the desired functionality? Wouldn't it be better to error if someone tries to run a tool that doesn't do any thing?

DavidMarchant commented 6 years ago

:see_no_evil:

mjtko commented 6 years ago

Good spot -- I would say this was incorrect in both places. Worth fixing!

DavidMarchant commented 6 years ago

From IRL discussion, in this case we want to error & exit before the ssh conection is attempted & set job exit code as -2 w/ appropriate error process. Do not exit the process, allow batch & job to complete & save.