Replace external reachability with an owned canary
This commit is contained in:
parent
0f6825c3b9
commit
31e9ab0f2d
1 changed files with 1409 additions and 1972 deletions
|
|
@ -1,12 +1,12 @@
|
|||
use super::{
|
||||
Arc, ContainerId, ControlError, CoordinatorId, DomainId, GenerationId, HashMap,
|
||||
HostCoordinatorDomainStore, HostCoordinatorTerminalRecorder, InteractiveControlSession,
|
||||
InteractiveSessionBatch, InteractiveSessionEvent, InteractiveSessionExecutor,
|
||||
InteractiveSessionMessage, InteractiveSessionRequest, Mutex, OsString, PathBuf,
|
||||
PidfsProcessIdentityV1, PromptRouteCancellation, ProtocolVersion, RunscSessionTerminalFactory,
|
||||
SessionId, SessionPromptTransport, SessionTerminal, SessionTerminalEvent,
|
||||
SessionTerminalFactory, SessionTerminalMessage, SessionTerminalProcess, TerminalAcquisition,
|
||||
TerminalError, TerminalLoss, TerminalRoute, VecDeque,
|
||||
Arc, BTreeMap, ContainerId, ControlError, CoordinatorId, DomainId, EnvironmentValue,
|
||||
GenerationId, HashMap, HostCoordinatorDomainStore, HostCoordinatorTerminalRecorder,
|
||||
InteractiveControlSession, InteractiveSessionBatch, InteractiveSessionEvent,
|
||||
InteractiveSessionExecutor, InteractiveSessionMessage, InteractiveSessionRequest, Mutex,
|
||||
OsString, PathBuf, PidfsProcessIdentityV1, PromptRouteCancellation, ProtocolVersion,
|
||||
RunscSessionTerminalFactory, SessionId, SessionPromptTransport, SessionTerminal,
|
||||
SessionTerminalEvent, SessionTerminalFactory, SessionTerminalMessage, SessionTerminalProcess,
|
||||
TerminalAcquisition, TerminalError, TerminalLoss, TerminalRoute, VecDeque,
|
||||
};
|
||||
|
||||
pub(super) struct ActiveTerminal {
|
||||
|
|
@ -36,6 +36,7 @@ pub struct RunscInteractiveSessionExecutor {
|
|||
host_coordinator: PidfsProcessIdentityV1,
|
||||
runsc_program: OsString,
|
||||
runsc_global_arguments: Vec<OsString>,
|
||||
environment: BTreeMap<String, EnvironmentValue>,
|
||||
runtime_root: PathBuf,
|
||||
}
|
||||
|
||||
|
|
@ -50,6 +51,7 @@ impl RunscInteractiveSessionExecutor {
|
|||
container_id: ContainerId,
|
||||
host_coordinator: PidfsProcessIdentityV1,
|
||||
command: &lazaret_runtime_supervisor::sandbox::RunscCommand,
|
||||
environment: BTreeMap<String, EnvironmentValue>,
|
||||
runtime_root: PathBuf,
|
||||
) -> Result<Self, TerminalError> {
|
||||
let run = command
|
||||
|
|
@ -75,6 +77,7 @@ impl RunscInteractiveSessionExecutor {
|
|||
host_coordinator,
|
||||
runsc_program: command.program().to_owned(),
|
||||
runsc_global_arguments: command.arguments()[..run].to_vec(),
|
||||
environment,
|
||||
runtime_root,
|
||||
})
|
||||
}
|
||||
|
|
@ -104,6 +107,7 @@ impl InteractiveSessionExecutor for RunscInteractiveSessionExecutor {
|
|||
host_coordinator: self.host_coordinator,
|
||||
runsc_program: self.runsc_program.clone(),
|
||||
runsc_global_arguments: self.runsc_global_arguments.clone(),
|
||||
environment: self.environment.clone(),
|
||||
internal_pid_file: self.runtime_root.join(format!(
|
||||
"session-{}.pid",
|
||||
hex_session(request.session_id.as_bytes())
|
||||
|
|
|
|||
Loading…
Reference in a new issue