@@ -1405,17 +1405,19 @@ pub async fn execute(log_level: &str, spec_file_path: &str, skip_prompt: bool) -
1405
1405
sleep ( Duration :: from_secs ( 15 ) ) . await ;
1406
1406
1407
1407
for ssh_command in ssh_commands. iter ( ) {
1408
- let output = ssh_command
1409
- . run ( "tail -10 /var/log/cloud-init-output.log" )
1410
- . unwrap ( ) ;
1411
- println ! (
1412
- "{} (anchor node) init script std output:\n {}\n " ,
1413
- ssh_command. instance_id, output. stdout
1414
- ) ;
1415
- println ! (
1416
- "{} (anchor node) init script std err:\n {}\n " ,
1417
- ssh_command. instance_id, output. stderr
1418
- ) ;
1408
+ match ssh_command. run ( "tail -10 /var/log/cloud-init-output.log" ) {
1409
+ Ok ( output) => {
1410
+ println ! (
1411
+ "{} (anchor node) init script std output:\n {}\n " ,
1412
+ ssh_command. instance_id, output. stdout
1413
+ ) ;
1414
+ println ! (
1415
+ "{} (anchor node) init script std err:\n {}\n " ,
1416
+ ssh_command. instance_id, output. stderr
1417
+ ) ;
1418
+ }
1419
+ Err ( e) => log:: warn!( "failed to run ssh command {}" , e) ,
1420
+ }
1419
1421
}
1420
1422
}
1421
1423
}
@@ -1867,17 +1869,19 @@ pub async fn execute(log_level: &str, spec_file_path: &str, skip_prompt: bool) -
1867
1869
sleep ( Duration :: from_secs ( 20 ) ) . await ;
1868
1870
1869
1871
for ssh_command in ssh_commands. iter ( ) {
1870
- let output = ssh_command
1871
- . run ( "tail -10 /var/log/cloud-init-output.log" )
1872
- . unwrap ( ) ;
1873
- println ! (
1874
- "{} (non-anchor node) init script std output:\n {}\n " ,
1875
- ssh_command. instance_id, output. stdout
1876
- ) ;
1877
- println ! (
1878
- "{} (non-anchor node) init script std err:\n {}\n " ,
1879
- ssh_command. instance_id, output. stderr
1880
- ) ;
1872
+ match ssh_command. run ( "tail -10 /var/log/cloud-init-output.log" ) {
1873
+ Ok ( output) => {
1874
+ println ! (
1875
+ "{} (non-anchor node) init script std output:\n {}\n " ,
1876
+ ssh_command. instance_id, output. stdout
1877
+ ) ;
1878
+ println ! (
1879
+ "{} (non-anchor node) init script std err:\n {}\n " ,
1880
+ ssh_command. instance_id, output. stderr
1881
+ ) ;
1882
+ }
1883
+ Err ( e) => log:: warn!( "failed to run ssh command {}" , e) ,
1884
+ }
1881
1885
}
1882
1886
}
1883
1887
}
@@ -2825,17 +2829,19 @@ default-spec --log-level=info --funded-keys={funded_keys} --region={region} --up
2825
2829
2826
2830
sleep ( Duration :: from_secs ( 10 ) ) . await ;
2827
2831
for ssh_command in ssh_commands. iter ( ) {
2828
- let output = ssh_command
2829
- . run ( "tail -10 /var/log/cloud-init-output.log" )
2830
- . unwrap ( ) ;
2831
- println ! (
2832
- "{} (dev machine) init script std output:\n {}\n " ,
2833
- ssh_command. instance_id, output. stdout
2834
- ) ;
2835
- println ! (
2836
- "{} (dev machine) init script std err:\n {}\n " ,
2837
- ssh_command. instance_id, output. stderr
2838
- ) ;
2832
+ match ssh_command. run ( "tail -10 /var/log/cloud-init-output.log" ) {
2833
+ Ok ( output) => {
2834
+ println ! (
2835
+ "{} (dev machine) init script std output:\n {}\n " ,
2836
+ ssh_command. instance_id, output. stdout
2837
+ ) ;
2838
+ println ! (
2839
+ "{} (dev machine) init script std err:\n {}\n " ,
2840
+ ssh_command. instance_id, output. stderr
2841
+ ) ;
2842
+ }
2843
+ Err ( e) => log:: warn!( "failed to run ssh command {}" , e) ,
2844
+ }
2839
2845
}
2840
2846
2841
2847
//
0 commit comments