Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sled-agent] Update propolis dependency, to use simpler paths #950

Merged
merged 3 commits into from
Apr 19, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package-manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,5 @@ zone = true
[external_package.propolis-server.source]
type = "prebuilt"
repo = "propolis"
commit = "e984409a425df97338efa2c53ba3e40c73668638"
sha256 = "206ef42e90d157e3314f4745ddb4422b3c93a16881749824037853e6f39f3762"
commit = "7f370d295813be75160b5e6ecc79f6d3c7ed9368"
sha256 = "32994c25bc7481f9aeb3e0976425cf39a6ee6fd8a501929371884d9add53d310"
smklein marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion sled-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ omicron-common = { path = "../common" }
p256 = "0.9.0"
percent-encoding = "2.1.0"
progenitor = { git = "https://github.com/oxidecomputer/progenitor" }
propolis-client = { git = "https://github.com/oxidecomputer/propolis", rev = "3a4fd8fa54ce8e1117bfa259bea39bca87f8ea14" }
propolis-client = { git = "https://github.com/oxidecomputer/propolis", rev = "7f370d295813be75160b5e6ecc79f6d3c7ed9368" }
rand = { version = "0.8.5", features = ["getrandom"] }
reqwest = { version = "0.11.8", default-features = false, features = ["rustls-tls", "stream"] }
schemars = { version = "0.8", features = [ "chrono", "uuid" ] }
Expand Down
13 changes: 5 additions & 8 deletions sled-agent/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async fn wait_for_http_server(
// This request is nonsensical - we don't expect an instance to be
// using the nil UUID - but getting a response that isn't a
smklein marked this conversation as resolved.
Show resolved Hide resolved
// connection-based error informs us the HTTP server is alive.
match client.instance_get(Uuid::nil()).await {
match client.instance_get().await {
Ok(_) => return Ok(()),
Err(value) => {
if let propolis_client::Error::Status(_) = &value {
Expand Down Expand Up @@ -254,7 +254,7 @@ impl InstanceInner {
.as_ref()
.expect("Propolis client should be initialized before usage")
.client
.instance_state_put(*self.id(), request)
.instance_state_put(request)
.await?;
Ok(())
}
Expand Down Expand Up @@ -590,19 +590,16 @@ impl Instance {
//
// They aren't modified after being initialized, so it's fine to grab
// a copy.
let (instance_id, client) = {
let client = {
let inner = self.inner.lock().await;
let id = *inner.id();
let client = inner.running_state.as_ref().unwrap().client.clone();
(id, client)
inner.running_state.as_ref().unwrap().client.clone()
};

let mut gen = 0;
loop {
// State monitoring always returns the most recent state/gen pair
// known to Propolis.
let response =
client.instance_state_monitor(instance_id, gen).await?;
let response = client.instance_state_monitor(gen).await?;
let reaction =
self.inner.lock().await.observe_state(response.state).await?;

Expand Down