diff --git a/packages/infra/client/manager/src/actor/oci_config.rs b/packages/infra/client/manager/src/actor/oci_config.rs index a64f0a22ba..84fde03db6 100644 --- a/packages/infra/client/manager/src/actor/oci_config.rs +++ b/packages/infra/client/manager/src/actor/oci_config.rs @@ -244,7 +244,13 @@ fn mounts(opts: &ConfigOpts) -> Result { "type": "bind", "source": opts.actor_path.join("resolv.conf").to_str().context("resolv.conf path")?, "options": ["rbind", "rprivate"] - } + }, + { + "destination": "/etc/hosts", + "type": "bind", + "source": opts.actor_path.join("hosts").to_str().context("hosts path")?, + "options": ["rbind", "rprivate"] + }, ])) } diff --git a/packages/infra/client/manager/src/actor/setup.rs b/packages/infra/client/manager/src/actor/setup.rs index 0ae870e87f..02d6eb02a2 100644 --- a/packages/infra/client/manager/src/actor/setup.rs +++ b/packages/infra/client/manager/src/actor/setup.rs @@ -297,7 +297,7 @@ impl Actor { // resolv.conf // - // See also rivet-job.conflist in lib/bolt/core/src/dep/terraform/install_scripts/files/nomad.sh + // See also rivet-actor.conflist in packages/services/cluster/src/workflows/server/install/install_scripts/files/pegboard_configure.sh fs::write( actor_path.join("resolv.conf"), indoc!( @@ -314,6 +314,18 @@ impl Actor { ) .await?; + // hosts + fs::write( + actor_path.join("hosts"), + indoc!( + " + 127.0.0.1 localhost + ::1 localhost ip6-localhost ip6-loopback + " + ), + ) + .await?; + Ok(()) } diff --git a/packages/infra/client/manager/src/runner.rs b/packages/infra/client/manager/src/runner.rs index b7e3367455..01d28632e0 100644 --- a/packages/infra/client/manager/src/runner.rs +++ b/packages/infra/client/manager/src/runner.rs @@ -1,5 +1,4 @@ use std::{ - io::Write, os::unix::process::CommandExt, path::{Path, PathBuf}, process::Stdio,