@@ -68,33 +68,35 @@ def _defn_to_xml_et(defn, /, *, parent=None):
6868
6969def poweroff (ip ):
7070 try :
71- ssh (ip , ["poweroff" ], options = SSHOPTS )
71+ ssh (ip , ["/sbin/ poweroff" ], options = SSHOPTS )
7272 except SSHCommandFailed as e :
7373 # ignore connection closed by reboot
7474 if e .returncode == 255 and "closed by remote host" in e .stdout :
7575 logging .info ("sshd closed the connection" )
7676 pass
77+ elif e .returncode == 255 :
78+ logging .info ("sshd misbehaving?" )
7779 else :
7880 raise
7981
8082def monitor_install (* , ip ):
8183 # wait for "yum install" phase to finish
82- wait_for (lambda : ssh (ip , ["grep" ,
84+ wait_for (lambda : "DISPATCH: NEW PHASE: Completing installation" in ssh (ip , ["grep" ,
8385 "'DISPATCH: NEW PHASE: Completing installation'" ,
8486 "/tmp/install-log" ],
8587 check = False , simple_output = False ,
8688 options = SSHOPTS ,
87- ).returncode == 0 ,
89+ ).stdout ,
8890 "Wait for rpm installation to succeed" ,
8991 timeout_secs = 40 * 60 ) # FIXME too big
9092
9193 # wait for install to finish
92- wait_for (lambda : ssh (ip , ["grep" ,
94+ wait_for (lambda : "The installation completed successfully" in ssh (ip , ["grep" ,
9395 "'The installation completed successfully'" ,
9496 "/tmp/install-log" ],
9597 check = False , simple_output = False ,
9698 options = SSHOPTS ,
97- ).returncode == 0 ,
99+ ).stdout ,
98100 "Wait for system installation to succeed" ,
99101 timeout_secs = 40 * 60 ) # FIXME too big
100102
0 commit comments