Skip to content

Commit

Permalink
fix(clusters): continue provisioning a server even when marked for de…
Browse files Browse the repository at this point in the history
…letion
  • Loading branch information
MasterPtato committed Jun 20, 2024
1 parent b93652c commit 38ae1f3
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions svc/pkg/cluster/worker/src/workers/server_provision.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ async fn inner(

// Check if server is already provisioned
// NOTE: sql record already exists before this worker is called
let (provider_server_id, destroyed) = sql_fetch_one!(
[ctx, (Option<String>, bool)]
let (provider_server_id,) = sql_fetch_one!(
[ctx, (Option<String>,)]
"
SELECT
provider_server_id, cloud_destroy_ts IS NOT NULL
provider_server_id
FROM db_cluster.servers
WHERE server_id = $1
",
Expand All @@ -54,10 +54,6 @@ async fn inner(
);
return Ok(());
}
if destroyed {
tracing::warn!(?server_id, "attempting to provision a destroyed server");
return Ok(());
}

// Fetch datacenter config
let datacenter_res = op!([ctx] cluster_datacenter_get {
Expand Down

0 comments on commit 38ae1f3

Please sign in to comment.