Releases: Snowflake-Labs/sansshell
v1.16.0: Make error reporting from a subprocess more consistent. (#173)
Add a new Packages method - Cleanup. For yum this runs yum-complete-transaction --cleanup-only which may be needed if updating the sansshell package using sansshell.
Also fix error reporting from package installation so its clearer on failures.
v1.15.1: Don't skip processing for internal commands always. (#172)
We can only do this when they are in the first couple positions. Otherwise this becomes problematic once they get passed into a subcommand+subcommand where a nil Conn == panic.
v1.15.0: Add service enable/disable support and tests (#171)
Add support for service enable/disable
v1.14.3: Add utilities for 1:1 (#168)
exec a remote command remove a remote file
v1.14.2: Start providing helper functions to wrap common 1:1 functions: (#166)
Read a file Write a file Copy a file Restart a service. N target varieties likely need to be written directly as handling N streams of output back is very implementation dependent and likely not worth abstracting.
v1.14.1
Fix Recv() on ProxyConn not working for non OneMany case
Update to go 1.19
v1.14.0 Line up comments, fix typo (#163)
v1.13.0: Add batch support to CLI. (#158)
* Add batch support to CLI. If we have thousands of targets at some point the proxy will reach a CPU/RAM limit. For most operations this isn't needed and we could instead just send N batches. If batch > 0 break up the target list into N chunks of batch size and send them over. Adjust integration tests to force a batch size of 1 to validate. Turn back off for tail/ptrace/core where we expect 2 running in parallel for testing. * Fix divide by zero... * Close the conn, not defer as they just build up in the function otherwise.
Exec/command handling fixes
Internally items such as Exec/Process/Packages/Ansible calling RunCommand wouldn't always emit the right error for things such as exec'ing a bad path.
The Go command package overloads error here to include non-zero exit as an error as well as real errors. Since non-zero exit is covered by the exit code we return and it's guaranteed to have filled in stdout/stderr we can eliminate that as an error case. Then all other errors are real and can be handled as such.
Add prefix feature for sanssh
Running sanssh with -h will now prefix every line of output with the index and target information where it came from. Similar to egrep -H