From f995b5a12a522212dfa80ff51f08f598772aeb79 Mon Sep 17 00:00:00 2001 From: Aiden McClelland Date: Sat, 2 Oct 2021 14:55:50 -0600 Subject: [PATCH] disable gateway timeout --- Makefile | 1 + appmgr/src/nginx/diagnostic-ui.conf | 1 + appmgr/src/nginx/main-ui.conf | 1 + appmgr/src/nginx/setup-wizard.conf | 1 + appmgr/src/setup.rs | 17 +++++++++++++++++ 5 files changed, 21 insertions(+) diff --git a/Makefile b/Makefile index 266ad6d20..0a1609076 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ clean: rm -rf patch-db/client/dist eos.img: $(EMBASSY_SRC) + ! test -f eos.img || rm eos.img ./build/make-image.sh ubuntu.img: diff --git a/appmgr/src/nginx/diagnostic-ui.conf b/appmgr/src/nginx/diagnostic-ui.conf index e83593507..32b12c370 100644 --- a/appmgr/src/nginx/diagnostic-ui.conf +++ b/appmgr/src/nginx/diagnostic-ui.conf @@ -12,6 +12,7 @@ server { proxy_request_buffering off; proxy_socket_keepalive on; proxy_http_version 1.1; + proxy_read_timeout 1800; location /rpc/ { proxy_pass http://127.0.0.1:5959/; diff --git a/appmgr/src/nginx/main-ui.conf b/appmgr/src/nginx/main-ui.conf index 1b39a1c57..be1c1cda9 100644 --- a/appmgr/src/nginx/main-ui.conf +++ b/appmgr/src/nginx/main-ui.conf @@ -12,6 +12,7 @@ server { proxy_request_buffering off; proxy_socket_keepalive on; proxy_http_version 1.1; + proxy_read_timeout 1800; location /rpc/ { proxy_pass http://127.0.0.1:5959/; diff --git a/appmgr/src/nginx/setup-wizard.conf b/appmgr/src/nginx/setup-wizard.conf index 4521698e6..3f1d88f4e 100644 --- a/appmgr/src/nginx/setup-wizard.conf +++ b/appmgr/src/nginx/setup-wizard.conf @@ -12,6 +12,7 @@ server { proxy_request_buffering off; proxy_socket_keepalive on; proxy_http_version 1.1; + proxy_read_timeout 1800; location /rpc/ { proxy_pass http://127.0.0.1:5959/; diff --git a/appmgr/src/setup.rs b/appmgr/src/setup.rs index 7e92c195a..543665dbe 100644 --- a/appmgr/src/setup.rs +++ b/appmgr/src/setup.rs @@ -43,6 +43,23 @@ pub async fn execute( #[context] ctx: SetupContext, #[arg(rename = "embassy-logicalname")] embassy_logicalname: PathBuf, #[arg(rename = "embassy-password")] embassy_password: String, +) -> Result { + match execute_inner(ctx, embassy_logicalname, embassy_password).await { + Ok(a) => { + log::info!("Setup Successful! Tor Address: {}", a.tor_address); + Ok(a) + } + Err(e) => { + log::error!("Error Setting Up Embassy: {}", e); + Err(e) + } + } +} + +pub async fn execute_inner( + ctx: SetupContext, + embassy_logicalname: PathBuf, + embassy_password: String, ) -> Result { let guid = crate::disk::main::create(&ctx.zfs_pool_name, [embassy_logicalname], DEFAULT_PASSWORD)