Skip to content

Commit

Permalink
merge: #3134 #3135
Browse files Browse the repository at this point in the history
3134: build(deps): patch `tokio-postgres-rustls` to use ring 0.17 r=fnichol a=fnichol

This change bumps all Rust dependencies to use the ring 0.17.x release stream, leaving one version of ring to build, and benefits from the pin to ring 0.17.5 which the Buck2/Reindeer fixup supports.

References: jbg/tokio-postgres-rustls#17

3135: feat: close the firecracker VM when cyclone exits r=sprutton1 a=sprutton1

Ok, here me out. This reverts us back to the old behavior of never calling the `terminate()` methods and instead relying on cyclone exiting by itself. I figured out I can replicate this in Firecracker by simply following the cyclone call with `&& reboot`, which will kill the firecracker VM. This whole thing feels weird to me as we define terminate methods that are never used, but I think this method may be better as it's currently possible that we'll call terminate on a running VM because the healthcheck will return unhealthy if it's already (or currently) running one. I think this may be leading to some strange performance issues that are difficult to diagnose, but I'm not entirely sure.

`@fnichol` at some point I'd love to talk to you about this and how deadpool works. I'm not sure I entirely understand the recycle semantics and what you were planning here.

Co-authored-by: Fletcher Nichol <[email protected]>
Co-authored-by: Scott Prutton <[email protected]>
  • Loading branch information
3 people authored Jan 9, 2024
3 parents 56bfb47 + 88a4529 + df82923 commit 85fbe20
Show file tree
Hide file tree
Showing 8 changed files with 1,500 additions and 2,104 deletions.
450 changes: 210 additions & 240 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,6 @@ docker-api = { git = "https://github.com/vv9k/docker-api-rs.git", branch = "mast
# https://github.com/durch/rust-s3/pull/372
# Note that this helps us to narrow down the number of `ring`/`rustls` versions to 1 each
rust-s3 = { git = "https://github.com/ScuffleTV/rust-s3.git", branch = "troy/rustls" }
# pending a potential merge and release of
# https://github.com/jbg/tokio-postgres-rustls/pull/17
tokio-postgres-rustls = { git = "https://github.com/fnichol/tokio-postgres-rustls.git", branch = "ring-0.17" }
8 changes: 1 addition & 7 deletions lib/deadpool-cyclone/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,7 @@ where
obj: &mut Self::Type,
_: &Metrics,
) -> managed::RecycleResult<Self::Error> {
match obj.ensure_healthy().await {
Ok(_) => Ok(()),
Err(err) => {
obj.terminate().await?;
Result::map_err(Err(err), Into::into)
}
}
obj.ensure_healthy().await.map_err(Into::into)
}
}

Expand Down
6 changes: 4 additions & 2 deletions prelude-si/rootfs/rootfs_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,13 @@ cat <<EOF >"/etc/init.d/cyclone"
name="cyclone"
description="Cyclone"
supervisor="supervise-daemon"
command="cyclone"
command_args="${cyclone_args[*]}"
pidfile="/cyclone/agent.pid"
output_log="/var/log/cyclone.log"
error_log="/var/log/cyclone.err"
start(){
cyclone ${cyclone_args[*]} && reboot &
}
EOF
chmod +x "/etc/init.d/cyclone"
Expand Down
Loading

0 comments on commit 85fbe20

Please sign in to comment.