Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Simone Rossi
main
Commits
6e89d58e
Commit
6e89d58e
authored
Oct 02, 2018
by
Daniele Venzano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support expanding the proxy path in the url template
Do not set multiple times the cleaning up status
parent
52feb452
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
zoe_api/api_endpoint.py
zoe_api/api_endpoint.py
+2
-1
zoe_master/scheduler/elastic_scheduler.py
zoe_master/scheduler/elastic_scheduler.py
+0
-2
No files found.
zoe_api/api_endpoint.py
View file @
6e89d58e
...
...
@@ -210,11 +210,12 @@ class APIEndpoint:
services_info
.
append
(
self
.
service_by_id
(
user
,
service
.
id
))
for
port
in
service
.
ports
:
if
port
.
external_ip
is
not
None
:
endpoint
=
port
.
url_template
.
format
(
**
{
"ip_port"
:
port
.
external_ip
+
":"
+
str
(
port
.
external_port
)})
if
zoe_lib
.
config
.
get_conf
().
traefik_zk_ips
is
None
or
not
port
.
enable_proxy
:
endpoint
=
port
.
url_template
.
format
(
**
{
"ip_port"
:
port
.
external_ip
+
":"
+
str
(
port
.
external_port
)})
endpoint_ext
=
None
else
:
endpoint_ext
=
'{}/{}'
.
format
(
zoe_lib
.
config
.
get_conf
().
traefik_base_url
,
port
.
proxy_key
())
endpoint
=
port
.
url_template
.
format
(
**
{
"ip_port"
:
port
.
external_ip
+
":"
+
str
(
port
.
external_port
),
"proxy_path"
:
endpoint_ext
})
endpoints
.
append
((
port
.
readable_name
,
endpoint
,
endpoint_ext
))
return
services_info
,
endpoints
...
...
zoe_master/scheduler/elastic_scheduler.py
View file @
6e89d58e
...
...
@@ -111,7 +111,6 @@ class ZoeElasticScheduler:
def
_terminate_executions
(
self
):
while
len
(
self
.
queue_termination
)
>
0
:
execution
=
self
.
queue_termination
.
pop
(
0
)
execution
.
set_cleaning_up
()
try
:
self
.
queue
.
remove
(
execution
)
except
ValueError
:
...
...
@@ -331,7 +330,6 @@ class ZoeElasticScheduler:
if
service
.
essential
and
service
.
backend_status
==
service
.
BACKEND_DIE_STATUS
:
log
.
info
(
"Essential service {} ({}) of execution {} died, terminating execution"
.
format
(
service
.
id
,
service
.
name
,
execution
.
id
))
service
.
restarted
()
execution
.
set_cleaning_up
()
self
.
terminate
(
execution
)
break
# Check for executions that need to be re-queued because one of the elastic components died
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment