-
-
Notifications
You must be signed in to change notification settings - Fork 155
Closed
Labels
Description
Hitting this issue from kr8s kr8s-org/kr8s#511, which is fixed in kr8s v0.18.0 (kr8s-org/kr8s#512)
I had installed the dask-kubernetes-operator with helm install --create-namespace -n dask-operator --generate-name dask/dask-kubernetes-operator --post-renderer ./post.sh
.
post.sh:
#!/bin/bash
sed 's/--liveness=http:\/\/0.0.0.0:8080\/healthz/--liveness=http:\/\/[::]:8080\/healthz/g'
Underlying k8s cluster is AWS EKS, IPv6 (not dual-stack).
Logs from the operator:
│ [2025-04-09 22:39:55,269] aiohttp.access [INFO ] 2600:1f14:2726:ae00::b771 [09/Apr/2025:22:39:55 +0000] "GET /healthz HTTP/1.1" 200 216 "-" "kube-probe/1.32+" │
│ [2025-04-09 22:39:58,907] kopf.objects [WARNING ] [default/my-dask-cluster] Patching failed with inconsistencies: (('remove', ('status', 'kopf'), {'dummy': '2025-04-09T22:39:58.888344+00:00'}, None),) │
│ [2025-04-09 22:39:59,010] kopf.objects [INFO ] [default/my-dask-cluster] Creating Dask cluster components. │
│ [2025-04-09 22:39:59,016] kopf.objects [ERROR ] [default/my-dask-cluster] Handler 'daskcluster_create_components/status.phase' failed with an exception. Will retry. │
│ Traceback (most recent call last): │
│ File "/usr/local/lib/python3.10/site-packages/httpx/_urlparse.py", line 409, in normalize_port │
│ port_as_int = int(port) │
│ ValueError: invalid literal for int() with base 10: 'ec95:beab::1:443' │
│ │
│ During handling of the above exception, another exception occurred: │
│ │
│ Traceback (most recent call last): │
│ File "/usr/local/lib/python3.10/site-packages/kopf/_core/actions/execution.py", line 276, in execute_handler_once │
│ result = await invoke_handler( │
│ File "/usr/local/lib/python3.10/site-packages/kopf/_core/actions/execution.py", line 371, in invoke_handler │
│ result = await invocation.invoke( │
│ File "/usr/local/lib/python3.10/site-packages/kopf/_core/actions/invocation.py", line 116, in invoke │
│ result = await fn(**kwargs) # type: ignore │
│ File "/usr/local/lib/python3.10/site-packages/dask_kubernetes/operator/controller/controller.py", line 359, in daskcluster_create_components │
│ if not await scheduler_deployment.exists(): │
│ File "/usr/local/lib/python3.10/site-packages/kr8s/_objects.py", line 293, in exists │
│ return await self.async_exists(ensure=ensure) │
│ File "/usr/local/lib/python3.10/site-packages/kr8s/_objects.py", line 299, in async_exists │
│ async with self.api.call_api( │
│ File "/usr/local/lib/python3.10/contextlib.py", line 199, in __aenter__ │
│ return await anext(self.gen) │
│ File "/usr/local/lib/python3.10/site-packages/kr8s/_api.py", line 149, in call_api │
│ await self._create_session() │
│ File "/usr/local/lib/python3.10/site-packages/kr8s/_api.py", line 105, in _create_session │
│ self._session = httpx.AsyncClient( │
│ File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1376, in __init__ │
│ super().__init__( │
│ File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 206, in __init__ │
│ self._base_url = self._enforce_trailing_slash(URL(base_url)) │
│ File "/usr/local/lib/python3.10/site-packages/httpx/_urls.py", line 117, in __init__ │
│ self._uri_reference = urlparse(url, **kwargs) │
│ File "/usr/local/lib/python3.10/site-packages/httpx/_urlparse.py", line 321, in urlparse │
│ parsed_port: int | None = normalize_port(port, scheme) │
│ File "/usr/local/lib/python3.10/site-packages/httpx/_urlparse.py", line 411, in normalize_port │
│ raise InvalidURL(f"Invalid port: {port!r}") │
│ httpx.InvalidURL: Invalid port: 'ec95:beab::1:443'
This occurs when I run:
from dask_kubernetes.operator import KubeCluster
cluster = KubeCluster(name="my-dask-cluster", image='ghcr.io/dask/dask:latest')
cluster.scale(10)