Skip to content

Commit 545de96

Browse files
author
Andrei Neagu
committed
hotfix #5931
1 parent 74d4870 commit 545de96

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

services/director-v2/tests/integration/02/utils.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
import json
55
import logging
66
import os
7+
import re
78
import urllib.parse
89
from collections.abc import AsyncIterator
910
from contextlib import asynccontextmanager, suppress
10-
from typing import Any
11+
from typing import Any, Final
1112

1213
import aiodocker
1314
import httpx
@@ -518,6 +519,13 @@ def run_command(command: str) -> str:
518519
return command_result
519520

520521

522+
_SERVICE_CONVERGED_PATTERN: Final[str] = r"verify: Service.+converged$"
523+
524+
525+
def _assert_service_converged(string) -> None:
526+
assert bool(re.search(_SERVICE_CONVERGED_PATTERN, string)) is True
527+
528+
521529
async def _port_forward_legacy_service( # pylint: disable=redefined-outer-name
522530
service_name: str, internal_port: PositiveInt
523531
) -> PositiveInt:
@@ -529,13 +537,13 @@ async def _port_forward_legacy_service( # pylint: disable=redefined-outer-name
529537
# Legacy services are started --endpoint-mode dnsrr, it needs to
530538
# be changed to vip otherwise the port forward will not work
531539
result = run_command(f"docker service update {service_name} --endpoint-mode=vip")
532-
assert "verify: Service converged" in result
540+
_assert_service_converged(result)
533541

534542
# Finally forward the port on a random assigned port.
535543
result = run_command(
536544
f"docker service update {service_name} --publish-add :{internal_port}"
537545
)
538-
assert "verify: Service converged" in result
546+
_assert_service_converged(result)
539547

540548
# inspect service and fetch the port
541549
async with aiodocker.Docker() as docker_client:
@@ -626,4 +634,4 @@ async def sleep_for(interval: PositiveInt, reason: str) -> None:
626634
assert interval > 0
627635
for i in range(1, interval + 1):
628636
await asyncio.sleep(1)
629-
print(f"[{i}/{interval}]Sleeping: {reason}")
637+
print(f"[{i}/{interval}]Sleeping: {reason}")

services/docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ services:
521521
webserver:
522522
image: ${DOCKER_REGISTRY:-itisfoundation}/webserver:${DOCKER_IMAGE_TAG:-latest}
523523
init: true
524-
hostname: "{{.Node.Hostname}}-{{.Task.Slot}}"
524+
hostname: "wb-{{.Node.Hostname}}-{{.Task.Slot}}" # the hostname is used in conjonction with other services and must be unique see https://github.com/ITISFoundation/osparc-simcore/pull/5931
525525
environment: &webserver_environment
526526
AIODEBUG_SLOW_DURATION_SECS: ${AIODEBUG_SLOW_DURATION_SECS}
527527

@@ -727,7 +727,7 @@ services:
727727
wb-api-server:
728728
image: ${DOCKER_REGISTRY:-itisfoundation}/webserver:${DOCKER_IMAGE_TAG:-latest}
729729
init: true
730-
hostname: "{{.Node.Hostname}}-{{.Task.Slot}}"
730+
hostname: "api-{{.Node.Hostname}}-{{.Task.Slot}}" # the hostname is used in conjonction with other services and must be unique see https://github.com/ITISFoundation/osparc-simcore/pull/5931
731731
environment:
732732
<<: *webserver_environment
733733
WEBSERVER_HOST: ${WB_API_WEBSERVER_HOST}
@@ -740,7 +740,7 @@ services:
740740
wb-db-event-listener:
741741
image: ${DOCKER_REGISTRY:-itisfoundation}/webserver:${DOCKER_IMAGE_TAG:-latest}
742742
init: true
743-
hostname: "{{.Node.Hostname}}-{{.Task.Slot}}"
743+
hostname: "db-{{.Node.Hostname}}-{{.Task.Slot}}" # the hostname is used in conjonction with other services and must be unique see https://github.com/ITISFoundation/osparc-simcore/pull/5931
744744
environment:
745745
WEBSERVER_LOGLEVEL: ${WB_DB_EL_LOGLEVEL}
746746

@@ -824,7 +824,7 @@ services:
824824
wb-garbage-collector:
825825
image: ${DOCKER_REGISTRY:-itisfoundation}/webserver:${DOCKER_IMAGE_TAG:-latest}
826826
init: true
827-
hostname: "{{.Node.Hostname}}-{{.Task.Slot}}"
827+
hostname: "gc-{{.Node.Hostname}}-{{.Task.Slot}}" # the hostname is used in conjonction with other services and must be unique see https://github.com/ITISFoundation/osparc-simcore/pull/5931
828828
environment:
829829
WEBSERVER_LOGLEVEL: ${WB_GC_LOGLEVEL}
830830

services/web/server/src/simcore_service_webserver/notifications/_rabbitmq_consumers_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async def subscribe_to_rabbitmq(
3737
)
3838
for p in exchange_to_parser_config
3939
),
40-
reraise=False,
40+
reraise=True,
4141
)
4242
return {
4343
exchange_name: queue_name

0 commit comments

Comments
 (0)