aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordiogo464 <[email protected]>2025-10-30 20:28:06 +0000
committerdiogo464 <[email protected]>2025-10-30 20:28:06 +0000
commit647c0c95fd1bfd47f810547742e1b9f0832a48db (patch)
tree484f6119b9a76f333bba771206b6cd1416fa3ddc /src
parent4082e97c42f77f97db0269c0454c4b12d8877089 (diff)
fixed clippy warnings
Diffstat (limited to 'src')
-rw-r--r--src/main.rs24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/main.rs b/src/main.rs
index f16a7db..537780a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -242,13 +242,10 @@ async fn context_from_common(common: &Common) -> Result<Context> {
242 ) 242 )
243 .await?; 243 .await?;
244 244
245 match ctx.node { 245 if let ExecutionNode::Machine(_) = ctx.node {
246 ExecutionNode::Machine(_) => { 246 tracing::warn!(
247 tracing::warn!( 247 "executing oar-p2p from a job machine is not currently support, run from the frontend or your own machine"
248 "executing oar-p2p from a job machine is not currently support, run from the frontend or your own machine" 248 );
249 );
250 }
251 _ => {}
252 } 249 }
253 250
254 Ok(ctx) 251 Ok(ctx)
@@ -688,9 +685,7 @@ async fn machine_containers_save_logs(
688async fn machine_copy_logs_dir(ctx: &Context, machine: Machine, output_dir: &Path) -> Result<()> { 685async fn machine_copy_logs_dir(ctx: &Context, machine: Machine, output_dir: &Path) -> Result<()> {
689 tracing::info!("copying container logs from machine"); 686 tracing::info!("copying container logs from machine");
690 687
691 let mut rsync_rsh = format!( 688 let mut rsync_rsh = "ssh -o ConnectionAttempts=3 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null".to_string();
692 "ssh -o ConnectionAttempts=3 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
693 );
694 if ctx.node == ExecutionNode::Unknown { 689 if ctx.node == ExecutionNode::Unknown {
695 rsync_rsh += &format!(" -J {}", ctx.frontend_hostname()?); 690 rsync_rsh += &format!(" -J {}", ctx.frontend_hostname()?);
696 } 691 }
@@ -737,7 +732,7 @@ async fn machines_clean(ctx: &Context, machines: &[Machine]) -> Result<()> {
737 732
738#[tracing::instrument(ret, err, skip_all)] 733#[tracing::instrument(ret, err, skip_all)]
739async fn machines_containers_clean(ctx: &Context, machines: &[Machine]) -> Result<()> { 734async fn machines_containers_clean(ctx: &Context, machines: &[Machine]) -> Result<()> {
740 machine::for_each(machines, |machine| machine_containers_clean(&ctx, machine)).await?; 735 machine::for_each(machines, |machine| machine_containers_clean(ctx, machine)).await?;
741 Ok(()) 736 Ok(())
742} 737}
743 738
@@ -759,7 +754,7 @@ async fn machines_configure(ctx: &Context, configs: &[MachineConfig]) -> Result<
759 machine::for_each(machines, |machine| { 754 machine::for_each(machines, |machine| {
760 let ctx = ctx.clone(); 755 let ctx = ctx.clone();
761 let config = configs.iter().find(|c| c.machine == machine).unwrap(); 756 let config = configs.iter().find(|c| c.machine == machine).unwrap();
762 async move { machine_configure(&ctx, &config).await } 757 async move { machine_configure(&ctx, config).await }
763 }) 758 })
764 .await?; 759 .await?;
765 Ok(()) 760 Ok(())
@@ -1066,15 +1061,14 @@ fn machine_generate_configs(
1066 .push(address); 1061 .push(address);
1067 } 1062 }
1068 1063
1069 if !matrix_wrap { 1064 if !matrix_wrap
1070 if addresses.len() > matrix.dimension() { 1065 && addresses.len() > matrix.dimension() {
1071 return Err(eyre::eyre!( 1066 return Err(eyre::eyre!(
1072 "latency matrix is too small, size is {} but {} was required", 1067 "latency matrix is too small, size is {} but {} was required",
1073 matrix.dimension(), 1068 matrix.dimension(),
1074 addresses.len() 1069 addresses.len()
1075 )); 1070 ));
1076 } 1071 }
1077 }
1078 1072
1079 for &machine in machines { 1073 for &machine in machines {
1080 let machine_addresses = &addresses_per_machine[&machine]; 1074 let machine_addresses = &addresses_per_machine[&machine];