Upgrade dependencies for occlum_exec

This commit is contained in:
volcano0dr 2022-09-06 14:41:19 +08:00 committed by Zongmin.Gu
parent 06f716b0b0
commit 8fac6d3652
6 changed files with 556 additions and 480 deletions

2
.gitmodules vendored

@ -17,7 +17,7 @@
[submodule "deps/grpc-rust"] [submodule "deps/grpc-rust"]
path = deps/grpc-rust path = deps/grpc-rust
url = https://github.com/stepancheg/grpc-rust.git url = https://github.com/stepancheg/grpc-rust.git
branch = v0.7 branch = v0.8
[submodule "deps/ringbuf"] [submodule "deps/ringbuf"]
path = deps/ringbuf path = deps/ringbuf
url = https://github.com/agerasev/ringbuf.git url = https://github.com/agerasev/ringbuf.git

2
deps/grpc-rust vendored

@ -1 +1 @@
Subproject commit 18acae5ed98afca2b971779eb851a45bb55f2fdc Subproject commit c0a95e7c658ba6a30624c0bb9df0546bef5d2e73

1010
src/exec/Cargo.lock generated

File diff suppressed because it is too large Load Diff

@ -13,17 +13,17 @@ path = "../../deps/grpc-rust/grpc"
path = "../../deps/grpc-rust/grpc-protobuf" path = "../../deps/grpc-rust/grpc-protobuf"
[dependencies] [dependencies]
protobuf = "2.14" protobuf = "2.18"
futures = "0.3" futures = "0.3"
env_logger = "0.7" env_logger = "0.9"
tempdir = "0.3" tempdir = "0.3"
clap = "2.33" clap = "3.2.17"
timer = "0.2" timer = "0.2"
chrono = "0.4" chrono = "0.4"
libc = "0.2" libc = "0.2"
sendfd = "0.3" sendfd = "0.4.3"
signal-hook = "0.1" signal-hook = "0.3.14"
nix = "0.17" nix = "0.25.0"
log = "0.4.8" log = "0.4.8"
[build-dependencies] [build-dependencies]

@ -21,8 +21,8 @@ use occlum_exec::occlum_exec_grpc::OcclumExecClient;
use occlum_exec::{DEFAULT_SERVER_FILE, DEFAULT_SERVER_TIMER, DEFAULT_SOCK_FILE}; use occlum_exec::{DEFAULT_SERVER_FILE, DEFAULT_SERVER_TIMER, DEFAULT_SOCK_FILE};
use protobuf::RepeatedField; use protobuf::RepeatedField;
use sendfd::SendWithFd; use sendfd::SendWithFd;
use signal_hook::consts::{SIGINT, SIGKILL, SIGQUIT, SIGTERM, SIGUSR1};
use signal_hook::iterator::Signals; use signal_hook::iterator::Signals;
use signal_hook::{SIGINT, SIGKILL, SIGQUIT, SIGTERM, SIGUSR1};
use std::cmp; use std::cmp;
use std::env; use std::env;
use std::os::unix::net::UnixListener; use std::os::unix::net::UnixListener;
@ -242,7 +242,7 @@ fn main() -> Result<(), i32> {
.version("0.1.0") .version("0.1.0")
.arg( .arg(
Arg::with_name("instance_dir") Arg::with_name("instance_dir")
.short("d") .short('d')
.long("instance_dir") .long("instance_dir")
.takes_value(true) .takes_value(true)
.default_value("./") .default_value("./")
@ -260,7 +260,7 @@ fn main() -> Result<(), i32> {
) )
.arg( .arg(
Arg::with_name("time") Arg::with_name("time")
.short("t") .short('t')
.long("time") .long("time")
.takes_value(true) .takes_value(true)
.help("Seconds to wait before killing the applications running on the Occlum server.") .help("Seconds to wait before killing the applications running on the Occlum server.")
@ -322,7 +322,7 @@ fn main() -> Result<(), i32> {
// Create the signal handler // Create the signal handler
let process_killed = Arc::new(Mutex::new(false)); let process_killed = Arc::new(Mutex::new(false));
let process_killed_clone = Arc::clone(&process_killed); let process_killed_clone = Arc::clone(&process_killed);
let signals = Signals::new(&[SIGUSR1, SIGINT, SIGQUIT, SIGTERM]).unwrap(); let mut signals = Signals::new(&[SIGUSR1, SIGINT, SIGQUIT, SIGTERM]).unwrap();
let signal_thread = thread::spawn(move || { let signal_thread = thread::spawn(move || {
for signal in signals.forever() { for signal in signals.forever() {
debug!("Received signal {:?}", signal); debug!("Received signal {:?}", signal);

@ -58,7 +58,7 @@ fn main() -> Result<(), i32> {
.version("0.1.0") .version("0.1.0")
.arg( .arg(
Arg::with_name("instance_dir") Arg::with_name("instance_dir")
.short("d") .short('d')
.long("instance_dir") .long("instance_dir")
.takes_value(true) .takes_value(true)
.default_value("./") .default_value("./")