ALPHA: wire is a tool to deploy nixos systems wire.althaea.zone/
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix typo in "get_preferred_host"

+12 -12
+1 -1
wire/lib/src/commands/common.rs
··· 28 28 "nix --extra-experimental-features nix-command \ 29 29 copy --substitute-on-destination --to ssh://{user}@{host} {path}", 30 30 user = node.target.user, 31 - host = node.target.get_preffered_host()?, 31 + host = node.target.get_preferred_host()?, 32 32 path = match push { 33 33 Push::Derivation(drv) => format!("{drv} --derivation"), 34 34 Push::Path(path) => path.clone(),
+1 -1
wire/lib/src/commands/interactive.rs
··· 357 357 let mut command = portable_pty::CommandBuilder::new("ssh"); 358 358 359 359 command.args(["-l", target.user.as_ref()]); 360 - command.arg(target.get_preffered_host()?.as_ref()); 360 + command.arg(target.get_preferred_host()?.as_ref()); 361 361 command.args(["-p", &target.port.to_string()]); 362 362 363 363 Ok(command)
+1 -1
wire/lib/src/commands/noninteractive.rs
··· 197 197 let mut command = Command::new("ssh"); 198 198 199 199 command.args(["-l", target.user.as_ref()]); 200 - command.arg(target.get_preffered_host()?.as_ref()); 200 + command.arg(target.get_preferred_host()?.as_ref()); 201 201 command.args(["-p", &target.port.to_string()]); 202 202 203 203 Ok(command)
+2 -2
wire/lib/src/hive/node.rs
··· 70 70 } 71 71 72 72 impl Target { 73 - pub fn get_preffered_host(&self) -> Result<&Arc<str>, HiveLibError> { 73 + pub fn get_preferred_host(&self) -> Result<&Arc<str>, HiveLibError> { 74 74 self.hosts 75 75 .get(self.current_host) 76 76 .ok_or(HiveLibError::NetworkError(NetworkError::HostsExhausted)) ··· 134 134 } 135 135 136 136 pub async fn ping(&self, clobber_lock: Arc<Mutex<()>>) -> Result<(), HiveLibError> { 137 - let host = self.target.get_preffered_host()?; 137 + let host = self.target.get_preferred_host()?; 138 138 139 139 let command_string = format!( 140 140 "nix --extra-experimental-features nix-command \
+5 -5
wire/lib/src/hive/steps/activate.rs
··· 19 19 } 20 20 21 21 pub async fn wait_for_ping(ctx: &Context<'_>) -> Result<(), HiveLibError> { 22 - let host = ctx.node.target.get_preffered_host()?; 22 + let host = ctx.node.target.get_preferred_host()?; 23 23 let mut result = ctx.node.ping(ctx.clobber_lock.clone()).await; 24 24 25 25 for num in 0..2 { ··· 154 154 error!( 155 155 "Failed to get regain connection to {name} via {host} after reboot.", 156 156 name = ctx.name, 157 - host = ctx.node.target.get_preffered_host()? 157 + host = ctx.node.target.get_preferred_host()? 158 158 ); 159 159 160 160 return Err(HiveLibError::NetworkError( 161 161 NetworkError::HostUnreachableAfterReboot( 162 - ctx.node.target.get_preffered_host()?.to_string(), 162 + ctx.node.target.get_preferred_host()?.to_string(), 163 163 ), 164 164 )); 165 165 } ··· 186 186 error!( 187 187 "Failed to get regain connection to {name} via {host} after {goal} activation.", 188 188 name = ctx.name, 189 - host = ctx.node.target.get_preffered_host()? 189 + host = ctx.node.target.get_preferred_host()? 190 190 ); 191 191 192 192 return Err(HiveLibError::NetworkError( 193 193 NetworkError::HostUnreachableAfterReboot( 194 - ctx.node.target.get_preffered_host()?.to_string(), 194 + ctx.node.target.get_preferred_host()?.to_string(), 195 195 ), 196 196 )); 197 197 }
+2 -2
wire/lib/src/hive/steps/ping.rs
··· 24 24 #[instrument(skip_all, name = "ping")] 25 25 async fn execute(&self, ctx: &mut Context<'_>) -> Result<(), HiveLibError> { 26 26 loop { 27 - info!("Attempting host {}", ctx.node.target.get_preffered_host()?); 27 + info!("Attempting host {}", ctx.node.target.get_preferred_host()?); 28 28 29 29 if ctx.node.ping(ctx.clobber_lock.clone()).await.is_ok() { 30 30 return Ok(()); ··· 33 33 warn!( 34 34 "Failed to ping host {}", 35 35 // ? will take us out if we ran out of hosts 36 - ctx.node.target.get_preffered_host()? 36 + ctx.node.target.get_preferred_host()? 37 37 ); 38 38 ctx.node.target.host_failed(); 39 39 }