0.90.0
Slight backwards incompatible change in order to make command start and remote connection initiation asynchronous.
Exit code will now not be immediately available even for commands that exit immediately.
At least one of
- Iterating over stdout/stderr
- Calling
client.join(output)
is now necessary to cause parallel-ssh
to wait for commands to finish and be able to gather exit codes.
This was already covered in documentation so no API change has happened.
However, since behaviour has in fact changed version has been bumped to a new series.
Example of code that needs changing
output = client.run_command('exit 1')
exit_code = output[<host>]['exit_code']
exit_code
above will now be None
. The above needs changing to
output = client.run_command('exit 1')
client.join(output)
exit_code = output[<host>]['exit_code']
or iterating over either stdout/stderr.
Iterating over stdout/stderr will automatically cause exit code(s) to be gathered without explicitly calling get_exit_codes
. See documentation for more examples.
0.9x.y
will be the last series before a 1.x
release where remaining open, some quite old, issues will hopefully be resolved.
Contributions very much welcome and thank you so much again to all current and future contributors. 👍
Contributors either raised or provided PR for all bugs fixed in this release! 😆
Changes:
- Commands with no output would cause client to block until completion - #56
- Unicode in stdout would cause exception when reading stdout - #54
- Failed hosts with
stop_on_errors=False
would causejoin
andget_exit_codes
to throw exception - #53 - More documentation, parallel commands example under examples directory of the repository. Examples and documentation of overriding host list on an existing client object, iterators for host list parameter and filtering host list.
- Connection establishment and command execution are now much faster, 200ms at least for each, with no enforced delays.