Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions plane/src/drone/backend_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ impl BackendManager {
let runtime = self.runtime.clone();
let backend_id = self.backend_id.clone();
StepStatusResult::future_status(async move {
tracing::info!(%backend_id, "preparing...");
tracing::debug!(%backend_id, "preparing...");
if let Err(err) = runtime.prepare(&executor_config).await {
tracing::error!(?err, %backend_id, "failed to prepare");
state.to_terminated(None)
} else {
tracing::info!(%backend_id, "done preparing...");
tracing::debug!(%backend_id, "done preparing...");
state.to_starting()
}
})
Expand Down Expand Up @@ -224,7 +224,7 @@ impl BackendManager {
pub fn set_state(self: &Arc<Self>, state: BackendState) {
let mut lock = self.state.lock().expect("State lock is poisoned");

tracing::info!(
tracing::debug!(
backend_id = self.backend_id.as_value(),
state = state.as_value(),
"Updating backend state"
Expand Down Expand Up @@ -281,7 +281,7 @@ impl BackendManager {
.expect("State lock is poisoned")
.state
.clone();
tracing::info!(
tracing::debug!(
backend_id = self.backend_id.as_value(),
state = state.as_value(),
"Marking backend as terminated"
Expand Down
8 changes: 4 additions & 4 deletions plane/src/drone/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl Executor {
let mut events = docker.events();
while let Some(event) = events.next().await {
if let Some((_, manager)) = backends.remove(&event.backend_id) {
tracing::info!(
tracing::debug!(
backend_id = event.backend_id.as_value(),
exit_code = event.exit_code.unwrap_or(-1),
"Backend terminated.",
Expand All @@ -54,7 +54,7 @@ impl Executor {
}
}

tracing::info!("Backend event listener stopped.");
tracing::debug!("Backend event listener stopped.");
})
};

Expand Down Expand Up @@ -198,11 +198,11 @@ impl Executor {
key.clone(),
static_token.clone(),
);
tracing::info!(backend_id = backend_id.as_value(), "Inserting backend.");
tracing::debug!(backend_id = backend_id.as_value(), "Inserting backend.");
self.backends.insert(backend_id.clone(), manager);
}
BackendAction::Terminate { kind, reason } => {
tracing::info!("Terminating backend {}.", backend_id);
tracing::debug!("Terminating backend {}.", backend_id);

let manager = {
// We need to be careful here not to hold the lock when we call terminate, or
Expand Down
2 changes: 1 addition & 1 deletion plane/src/drone/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ pub async fn drone_loop(
}
MessageToDrone::RenewKeyResponse(renew_key_response) => {
let RenewKeyResponse { backend, deadlines } = renew_key_response;
tracing::info!(
tracing::debug!(
backend_id = backend.as_value(),
deadlines = deadlines.as_value(),
"Received key renewal response."
Expand Down
4 changes: 2 additions & 2 deletions plane/src/drone/runtime/docker/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub async fn pull_image(
force: bool,
) -> Result<()> {
if !force && image_exists(docker, image).await? {
tracing::info!(image, "Skipping image that already exists.");
tracing::debug!(image, "Skipping image that already exists.");
return Ok(());
}

Expand All @@ -47,7 +47,7 @@ pub async fn pull_image(
}
}

tracing::info!(?image, "Pulled image.");
tracing::debug!(?image, "Pulled image.");

Ok(())
}
Expand Down
4 changes: 2 additions & 2 deletions plane/src/drone/runtime/docker/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ fn metrics_message_from_container_stats(
.ok_or_else(|| anyhow::anyhow!("No memory limit found in stats."))?;

let Some(total_system_cpu_used) = stats.cpu_stats.system_cpu_usage else {
tracing::info!("No system cpu usage found in stats (normal on first stats event).");
tracing::debug!("No system cpu usage found in stats (normal on first stats event).");
return Ok(None);
};
let Some(prev_total_system_cpu_used) = stats.precpu_stats.system_cpu_usage else {
tracing::info!(
tracing::debug!(
"No previous system cpu usage found in stats (normal on first stats event)."
);
return Ok(None);
Expand Down
8 changes: 4 additions & 4 deletions plane/src/drone/runtime/docker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async fn events_loop(
Ok(e) => e,
};

tracing::info!(event=?e, "Received event");
tracing::debug!(event=?e, "Received event");

let Some(actor) = &e.actor else {
tracing::warn!("Received event without actor.");
Expand All @@ -120,11 +120,11 @@ async fn events_loop(
};

if e.action.as_deref() == Some("start") {
tracing::info!(?backend_id, "Received start event.");
tracing::debug!(?backend_id, "Received start event.");

let docker = docker.clone();
let metrics_callback = metrics_callback.clone();
tracing::info!(%backend_id, "Spawning metrics loop.");
tracing::debug!(%backend_id, "Spawning metrics loop.");
tokio::spawn(async move {
metrics_loop(backend_id, docker, metrics_callback).await;
});
Expand All @@ -137,7 +137,7 @@ async fn events_loop(
let exit_code = attributes.get("exitCode");
let exit_code = exit_code.and_then(|s| s.parse::<i32>().ok());

tracing::info!(
tracing::debug!(
exit_code,
backend_id = backend_id.as_value(),
"Received exit code"
Expand Down
Loading