Skip to content

Commit

Permalink
Merge branch 'eero/vsock-timeout' into 'master'
Browse files Browse the repository at this point in the history
Fix timeouts around new VSOCK

 

See merge request dfinity-lab/public/ic!15707
  • Loading branch information
Bownairo committed Oct 31, 2023
2 parents b2553df + e5e829b commit 2202dc0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions rs/ic_os/vsock/vsock_lib/src/guest/client.rs
Expand Up @@ -85,8 +85,9 @@ fn read_response_from_host(stream: &mut VsockStream) -> anyhow::Result<String> {

fn create_stream(port: &u32) -> Result<VsockStream, std::io::Error> {
let stream = VsockStream::connect_with_cid_port(VMADDR_CID_HOST, *port)?;
stream.set_write_timeout(Some(std::time::Duration::from_secs(5)))?;
stream.set_read_timeout(Some(std::time::Duration::from_secs(5)))?;
// Set a long timeout, so HostOS has enough time to upgrade.
stream.set_write_timeout(Some(std::time::Duration::from_secs(60 * 5)))?;
stream.set_read_timeout(Some(std::time::Duration::from_secs(60 * 5)))?;

Ok(stream)
}
2 changes: 1 addition & 1 deletion rs/sys/src/utility_command.rs
Expand Up @@ -216,7 +216,7 @@ impl UtilityCommand {
// At this point, HostOS should reboot and take us down. The
// timeout on the HostOS upgrade task will catch us if we
// actually get stuck.
std::thread::sleep(std::time::Duration::from_secs(90));
std::thread::sleep(std::time::Duration::from_secs(60 * 10));
}
}

Expand Down

0 comments on commit 2202dc0

Please sign in to comment.