main: Remove --net-backend and --block-backend from cloud-hypervisor

Remove the parameters used for self spawning from the cloud-hypervisor
binary.

See: #1925

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-11-17 11:06:27 +00:00 committed by Samuel Ortiz
parent fb70baece0
commit d1d0421103
3 changed files with 8 additions and 36 deletions

2
Cargo.lock generated
View File

@ -230,8 +230,6 @@ dependencies = [
"tempdir",
"tempfile",
"thiserror",
"vhost_user_block",
"vhost_user_net",
"vmm",
"vmm-sys-util",
"wait-timeout",

View File

@ -24,8 +24,6 @@ option_parser = { path = "option_parser" }
seccomp = { git = "https://github.com/firecracker-microvm/firecracker", tag = "v0.22.0" }
serde_json = "1.0.59"
thiserror = "1.0"
vhost_user_block = { path = "vhost_user_block"}
vhost_user_net = { path = "vhost_user_net"}
vmm = { path = "vmm" }
vmm-sys-util = "0.7.0"
wait-timeout = "0.2.0"

View File

@ -18,8 +18,6 @@ use std::env;
use std::sync::mpsc::channel;
use std::sync::{Arc, Mutex};
use thiserror::Error;
use vhost_user_block::start_block_backend;
use vhost_user_net::start_net_backend;
use vmm::config;
use vmm_sys_util::eventfd::EventFd;
@ -307,22 +305,6 @@ fn create_app<'a, 'b>(
.min_values(1)
.group("vmm-config"),
)
.arg(
Arg::with_name("net-backend")
.long("net-backend")
.help(vhost_user_net::SYNTAX)
.takes_value(true)
.conflicts_with_all(&["block-backend", "kernel"])
.min_values(1),
)
.arg(
Arg::with_name("block-backend")
.long("block-backend")
.help(vhost_user_block::SYNTAX)
.takes_value(true)
.conflicts_with_all(&["net-backend", "kernel"])
.min_values(1),
)
.arg(
Arg::with_name("seccomp")
.long("seccomp")
@ -471,23 +453,17 @@ fn main() {
.map(|()| log::set_max_level(log_level))
.expect("Expected to be able to setup logger");
if let Some(backend_command) = cmd_arguments.value_of("net-backend") {
start_net_backend(backend_command);
} else if let Some(backend_command) = cmd_arguments.value_of("block-backend") {
start_block_backend(backend_command);
} else {
let api_socket_path = cmd_arguments
.value_of("api-socket")
.expect("Missing argument: api-socket")
.to_string();
let api_socket_path = cmd_arguments
.value_of("api-socket")
.expect("Missing argument: api-socket")
.to_string();
if let Err(e) = start_vmm(cmd_arguments, &api_socket_path) {
eprintln!("{}", e);
std::fs::remove_file(api_socket_path).ok();
std::process::exit(1);
}
if let Err(e) = start_vmm(cmd_arguments, &api_socket_path) {
eprintln!("{}", e);
std::fs::remove_file(api_socket_path).ok();
std::process::exit(1);
}
std::fs::remove_file(api_socket_path).ok();
}
#[cfg(test)]