Errors during during deployment
Hello everyone. I used the KinD (Kubernetes in docker) in order to test the implementation of hypertool. I have used it before for other helm packages like grafana and prometheus in order to know that it works.
After make helm-install DOMAIN=...
the kubectl get pods
command shows:
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
hypertool-hypertool-rd6ht 0/1 CrashLoopBackOff 2 (18s ago) 2m4s
hypertool-hypertool-tgx8c 0/1 CrashLoopBackOff 2 (17s ago) 2m4s
logs from kubectl logs hypertool-hypertool-rd6ht
:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/hypertool/cli.py", line 102, in start_daemon
v1.patch_node(name=NODE_NAME, body=patch)
File "/usr/local/lib/python3.11/site-packages/kubernetes/client/api/core_v1_api.py", line 22270, in patch_node
return self.patch_node_with_http_info(name, body, **kwargs) # noqa: E501
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/kubernetes/client/api/core_v1_api.py", line 22377, in patch_node_with_http_info
return self.api_client.call_api(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 348, in call_api
return self.__call_api(resource_path, method,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 180, in __call_api
response_data = self.request(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/kubernetes/client/api_client.py", line 407, in request
return self.rest_client.PATCH(url,
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/kubernetes/client/rest.py", line 299, in PATCH
return self.request("PATCH", url,
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/kubernetes/client/rest.py", line 238, in request
raise ApiException(http_resp=r)
kubernetes.client.exceptions.ApiException: (422)
Reason: Unprocessable Entity
HTTP response headers: HTTPHeaderDict({'Audit-Id': 'fa4991a1-b309-45b4-bc4f-aefcbb5fded1', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Kubernetes-Pf-Flowschema-Uid': '99116a52-1ba1-47ad-9109-d2e4771dabca', 'X-Kubernetes-Pf-Prioritylevel-Uid': '56090995-5ada-4c4a-96e3-54655f1d429e', 'Date': 'Mon, 28 Jul 2025 13:44:10 GMT', 'Transfer-Encoding': 'chunked'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Node \"kind-worker2\" is invalid: [metadata.labels: Invalid value: \"Thessaloníki\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?'), metadata.labels: Invalid value: \"Central Macedonia\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')]","reason":"Invalid","details":{"name":"kind-worker2","kind":"Node","causes":[{"reason":"FieldValueInvalid","message":"Invalid value: \"Thessaloníki\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')","field":"metadata.labels"},{"reason":"FieldValueInvalid","message":"Invalid value: \"Central Macedonia\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')","field":"metadata.labels"},{"reason":"FieldValueInvalid","message":"Invalid value: \"Thessaloníki\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')","field":"metadata.labels"},{"reason":"FieldValueInvalid","message":"Invalid value: \"Central Macedonia\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')","field":"metadata.labels"},{"reason":"FieldValueInvalid","message":"Invalid value: \"Thessaloníki\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')","field":"metadata.labels"},{"reason":"FieldValueInvalid","message":"Invalid value: \"Central Macedonia\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')","field":"metadata.labels"},{"reason":"FieldValueInvalid","message":"Invalid value: \"Central Macedonia\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')","field":"metadata.labels"},{"reason":"FieldValueInvalid","message":"Invalid value: \"Thessaloníki\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')","field":"metadata.labels"}]},"code":422}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/hypertool", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1442, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1363, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1830, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1226, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 794, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/hypertool/cli.py", line 104, in start_daemon
raise exceptions.HyperToolUpdateError(f"Error updating node: {e}\n"
hypertool.exceptions.HyperToolUpdateError: Error updating node: (422)
Reason: Unprocessable Entity
HTTP response headers: HTTPHeaderDict({'Audit-Id': 'fa4991a1-b309-45b4-bc4f-aefcbb5fded1', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Kubernetes-Pf-Flowschema-Uid': '99116a52-1ba1-47ad-9109-d2e4771dabca', 'X-Kubernetes-Pf-Prioritylevel-Uid': '56090995-5ada-4c4a-96e3-54655f1d429e', 'Date': 'Mon, 28 Jul 2025 13:44:10 GMT', 'Transfer-Encoding': 'chunked'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Node \"kind-worker2\" is invalid:
[metadata.labels: Invalid value: \"Thessaloníki\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?'),
metadata.labels: Invalid value: \"Central Macedonia\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')]",
"reason":"Invalid","details":{"name":"kind-worker2","kind":"Node","causes":[
{"reason":"FieldValueInvalid","message":"Invalid value: \"Thessaloníki\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')","field":"metadata.labels"},
{"reason":"FieldValueInvalid","message":"Invalid value: \"Central Macedonia\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')","field":"metadata.labels"},
{"reason":"FieldValueInvalid","message":"Invalid value: \"Thessaloníki\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')","field":"metadata.labels"},
{"reason":"FieldValueInvalid","message":"Invalid value: \"Central Macedonia\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')","field":"metadata.labels"},
{"reason":"FieldValueInvalid","message":"Invalid value: \"Thessaloníki\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')","field":"metadata.labels"},
{"reason":"FieldValueInvalid","message":"Invalid value: \"Central Macedonia\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')","field":"metadata.labels"},
{"reason":"FieldValueInvalid","message":"Invalid value: \"Central Macedonia\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')","field":"metadata.labels"},
{"reason":"FieldValueInvalid","message":"Invalid value: \"Thessaloníki\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')","field":"metadata.labels"}]},"code":422}
Annotations:
hyperai.eu/node-available-interfaces: lo,eth0
hyperai.eu/node-monetary-cost-category: very low
hyperai.eu/node-energy-efficiency: very low
hyperai.eu/node-flops-per-sec: 12793362818.36
hyperai.eu/node-interface: eth0
hyperai.eu/node-network-type: ethernet
Labels:
hyperai.eu/node-geolocation-city: Thessaloníki
hyperai.eu/node-geolocation-region: Central Macedonia
hyperai.eu/node-geolocation-country: GR
I added the annotations and labels output into the exception in python scripts in order to check the if the annotation strings are not formatted correctly but I think are ok.
I checked a little better the error message and only the city and state is triggers the exception but when I run the code locally both values are just strings.