From 92b2a02ce7be68c12f40c0d2495589298f986316 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Tue, 12 Oct 2021 15:54:53 -0400 Subject: [PATCH 1/4] Try multiple node-odm hostnames --- app/management/commands/getnodehostname.py | 21 +++++++++++++++++++++ requirements.txt | 5 +++-- start.sh | 3 ++- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 app/management/commands/getnodehostname.py diff --git a/app/management/commands/getnodehostname.py b/app/management/commands/getnodehostname.py new file mode 100644 index 00000000..651bcd93 --- /dev/null +++ b/app/management/commands/getnodehostname.py @@ -0,0 +1,21 @@ +import os +from django.core.management.base import BaseCommand +import socket + +class Command(BaseCommand): + requires_system_checks = [] + + def add_arguments(self, parser): + parser.add_argument("host", type=str) + + super(Command, self).add_arguments(parser) + + def handle(self, **options): + host = options.get('host') + try: + socket.gethostbyname(host) + print(host) + except: + # Try replacing _ with "-" + host = host.replace("_", "-") + print(host) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 018ea2e8..3464741b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -37,13 +37,14 @@ pip-autoremove==0.9.0 psycopg2==2.8.6 psycopg2-binary==2.8.6 PyJWT==1.5.3 -pyodm==1.5.6 +pyodm==1.5.8 +requests==2.26.0 +urllib3==1.26.7 pyparsing==2.4.7 pytz==2020.1 rcssmin==1.0.6 redis==3.2.0 requests-toolbelt==0.9.1 -requests==2.21.0 rfc3987==1.3.7 rjsmin==1.0.12 simplejson==3.10.0 diff --git a/start.sh b/start.sh index f46f2dfc..f5abd204 100755 --- a/start.sh +++ b/start.sh @@ -65,7 +65,8 @@ if [[ "$WO_DEFAULT_NODES" > 0 ]]; then while [ $i -ne "$WO_DEFAULT_NODES" ] do i=$(($i+1)) - python manage.py addnode webodm_node-odm_$i 3000 --label node-odm-$i + NODE_HOST=$(python manage.py getnodehostname webodm_node-odm_$i) + python manage.py addnode $NODE_HOST 3000 --label node-odm-$i done fi From 0d35da909bfdced338c546063113a42401b691c6 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Tue, 12 Oct 2021 15:55:13 -0400 Subject: [PATCH 2/4] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f89049ae..abf412e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "WebODM", - "version": "1.9.8", + "version": "1.9.9", "description": "User-friendly, extendable application and API for processing aerial imagery.", "main": "index.js", "scripts": { From afc8fdd1fb4bcc8915c2a061f94266153d4edd64 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Tue, 12 Oct 2021 16:58:17 -0400 Subject: [PATCH 3/4] Adjust pip deps --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 3464741b..f2575eff 100644 --- a/requirements.txt +++ b/requirements.txt @@ -37,14 +37,14 @@ pip-autoremove==0.9.0 psycopg2==2.8.6 psycopg2-binary==2.8.6 PyJWT==1.5.3 -pyodm==1.5.8 -requests==2.26.0 +pyodm==1.5.9 urllib3==1.26.7 pyparsing==2.4.7 pytz==2020.1 rcssmin==1.0.6 redis==3.2.0 requests-toolbelt==0.9.1 +requests>=2.21.0 rfc3987==1.3.7 rjsmin==1.0.12 simplejson==3.10.0 From ff4203d464a59beb8255f54c2bc5f558170e639e Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Tue, 12 Oct 2021 17:13:07 -0400 Subject: [PATCH 4/4] Remove urllib3 dep --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f2575eff..d95349b7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -38,7 +38,6 @@ psycopg2==2.8.6 psycopg2-binary==2.8.6 PyJWT==1.5.3 pyodm==1.5.9 -urllib3==1.26.7 pyparsing==2.4.7 pytz==2020.1 rcssmin==1.0.6