parmentelat / apssh

asyncio-based parallel ssh
Other
9 stars 2 forks source link

Down status hosts not show in apssh's screen output #5

Closed subcrew closed 2 years ago

subcrew commented 7 years ago

let me show a commad example

⋊> ~ pssh -l root -h hosts hostname
[1] 12:19:57 [SUCCESS] 192.168.14.14
[2] 12:19:57 [SUCCESS] 192.168.14.12
[3] 12:19:57 [SUCCESS] 192.168.14.19
[4] 12:19:57 [SUCCESS] 192.168.14.18
[5] 12:19:57 [SUCCESS] 192.168.14.22
[6] 12:19:57 [SUCCESS] 192.168.14.16
[7] 12:19:57 [SUCCESS] 192.168.14.24
[8] 12:19:57 [SUCCESS] 192.168.14.11
[9] 12:19:57 [SUCCESS] 192.168.14.25
[10] 12:19:57 [SUCCESS] 192.168.14.23
[11] 12:19:57 [SUCCESS] 192.168.14.28
[12] 12:19:57 [SUCCESS] 192.168.14.27
[13] 12:19:59 [FAILURE] 192.168.14.10 Exited with error code 255
[14] 12:19:59 [FAILURE] 192.168.14.21 Exited with error code 255
[15] 12:19:59 [FAILURE] 192.168.14.29 Exited with error code 255
⋊> ~ apssh -l root -t hosts hostname 
192.168.14.14:test.local 
192.168.14.12:test.local
192.168.14.19:test.local
192.168.14.24:test.local
192.168.14.16:test.local
192.168.14.22:test.local
192.168.14.18:test.local
192.168.14.11:test.local
192.168.14.25:test.local
192.168.14.23:test.local
192.168.14.28:test.local
192.168.14.27:test.local

pssh's output will show three down status hosts(192.168.14.10 , 192.168.14.21, 192.168.14.29) with failure, but apssh's output show nothing about them's status.

parmentelat commented 7 years ago

You are comparing 2 things that are a little different

apssh won't have a mode that does exactly what pssh does in this case; you could get something similar by using the -o option to redirect the outputs, and the -m option to gather return codes

It is not exactly what you're asking for, but the closest to it without altering the code

I will keep this issue open, so that I can try and improve this next time I work on this module

parmentelat commented 2 years ago

as of 0.22.0 this has been addressed; see #17 for details