From 9db9ee03d844ef9b5343369692f8f0d743699382 Mon Sep 17 00:00:00 2001 From: Keven Richly Date: Mon, 29 Apr 2019 11:33:42 +0200 Subject: [PATCH 1/3] change base_url for master --- config/deploy/production.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/deploy/production.rb b/config/deploy/production.rb index 9b93785b..4d5791e4 100644 --- a/config/deploy/production.rb +++ b/config/deploy/production.rb @@ -16,4 +16,4 @@ set :slack_emoji, ':production:' # will be used as the avatar for the message set :slack_stage, 'master' -set :base_url, 'https://hart.epic-hpi.de' +set :base_url, 'vm-swt-hrmt-master.eaalab.hpi.uni-potsdam.de' From b19c74f87ef4ceaef7839c1a61237b40deb24f6d Mon Sep 17 00:00:00 2001 From: Tom Braun Date: Wed, 1 May 2019 00:29:41 +0200 Subject: [PATCH 2/3] create new connections if needed --- app/api/v_sphere/connection.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/api/v_sphere/connection.rb b/app/api/v_sphere/connection.rb index 111d92f5..0ea13140 100644 --- a/app/api/v_sphere/connection.rb +++ b/app/api/v_sphere/connection.rb @@ -56,7 +56,15 @@ def initialize_settings def connect return unless configured? - create_connection if @vim.nil? + + # only create new connection if there is no other valid, because otherwise it will allocate more and more tcp + # connections until it is not possible to create more and thus the server will throw an error + create_connection if @vim.nil? || !connected? + end + + # currentSession is nil if session does not exist, e.g. because it disconnected + def connected? + !@vim.serviceContent.sessionManager.currentSession.nil? end def create_connection From d202ee3fe9ce6ca486954f0b08572bcb60d78c15 Mon Sep 17 00:00:00 2001 From: Tom Braun Date: Fri, 3 May 2019 14:02:53 +0200 Subject: [PATCH 3/3] deploy