jina-ai / jcloud

Simplify deploying and managing Jina projects on Jina Cloud
https://docs.jina.ai/concepts/jcloud/
Apache License 2.0
298 stars 13 forks source link

I use python variable name but not worked for me #60

Closed floralatin closed 2 years ago

floralatin commented 2 years ago

Flow deployment failed

Command

jc --loglevel DEBUG deploy jcloud.yaml

Flow yaml

jtype: Flow
with:
  protocol: http
executors:
- name: _423__2execut__or_12__312_23
  uses: jinahub+docker://CLIPEncoder/latest

Flow ID / Request ID

Flow ID: 1a65c3c623
Request ID: 9a757f88-da82-45e3-89fe-ab26ea091d22

.env file

N/A

jina version

- jina 3.6.9
- docarray 0.13.23
- jina-proto 0.1.12
- protobuf 3.20.1
- proto-backend python
- grpcio 1.47.0
- pyyaml 6.0
- python 3.9.13
- platform Darwin
- platform-release 21.4.0
- platform-version Darwin Kernel Version 21.4.0: Mon Feb 21 20:36:53 PST 2022;
  root:xnu-8020.101.4~2/RELEASE_ARM64_T8101
- architecture arm64
- processor arm
- uid 86450951707024
- session-id 94028412-fa94-11ec-ba50-4ea06e445990
- uptime 2022-07-03T13:54:18.302876
- ci-vendor (unset)
* JINA_AUTH_TOKEN (unset)
* JINA_DEFAULT_HOST (unset)
* JINA_DEFAULT_TIMEOUT_CTRL (unset)
* JINA_DEFAULT_WORKSPACE_BASE (unset)
* JINA_DEPLOYMENT_NAME (unset)
* JINA_DISABLE_UVLOOP (unset)
* JINA_EARLY_STOP (unset)
* JINA_FULL_CLI (unset)
* JINA_GATEWAY_IMAGE (unset)
* JINA_GRPC_RECV_BYTES (unset)
* JINA_GRPC_SEND_BYTES (unset)
* JINA_HUBBLE_REGISTRY (unset)
* JINA_HUB_CACHE_DIR (unset)
* JINA_HUB_NO_IMAGE_REBUILD (unset)
* JINA_HUB_ROOT (unset)
* JINA_LOG_CONFIG (unset)
* JINA_LOG_LEVEL (unset)
* JINA_LOG_NO_COLOR (unset)
* JINA_MP_START_METHOD (unset)
* JINA_RANDOM_PORT_MAX (unset)
* JINA_RANDOM_PORT_MIN (unset)
* JINA_DISABLE_HEALTHCHECK_LOGS (unset)
* JINA_LOCKS_ROOT (unset)
...

Logs

kaizhang@kaideAir jcloud % jc --loglevel DEBUG deploy jcloud.yaml
[07/03/22 13:37:07] DEBUG    POST /flows with flow_id jflow-1a65c3c623 & request_id       flow.py:178
                             9a757f88-da82-45e3-89fe-ab26ea091d22                                    
                    DEBUG    Asked to stream logs with params {'request_id':              flow.py:322
                             '9a757f88-da82-45e3-89fe-ab26ea091d22'}                                 
[07/03/22 13:37:08] DEBUG    Successfully connected to logstream API with params:         flow.py:342
                             {'request_id': '9a757f88-da82-45e3-89fe-ab26ea091d22'}                  
INFO     - 🌨️ JCloud - Connecting to the database..
INFO     - 🌨️ JCloud - Successfully connected to the database
INFO     - 🌨️ JCloud - Creating namespace ...
INFO     - 🌨️ JCloud - Setting up jcloud args...
INFO     - 🌨️ JCloud - Updating workspace to jworkspace-1a65c3c623 for all Executors ...
INFO     - 🌨️ JCloud - K8s yaml generated at /tmp/tmp6cn99zxl!
INFO     - 🌨️ JCloud - Patching node selector ...
INFO     - 🌨️ JCloud - Patching resources ...
INFO     - 🌨️ JCloud - Creating volume resources ...
INFO     - 🌨️ JCloud - Creating volume resources for _423__2execut__or_12__312_23
INFO     - 🌨️ JCloud - Creating efs volume resources ...
INFO     - 🌨️ JCloud - Creating volume resources for gateway
INFO     - 🌨️ JCloud - Creating volume mounts ...
INFO     - 🌨️ JCloud - updating deployments in path: 
/tmp/tmp6cn99zxl/_423__2execut__or_12__312_23/-423--2execut--or-12--312-23.yml..
INFO     - 🌨️ JCloud - Patching image pull secrets ...
INFO     - 🌨️ JCloud - Creating resources from dirpath: `/tmp/tmp6cn99zxl` ..
INFO     - 🌨️ JCloud - Cleaning up endpoints ...
INFO     - 🌨️ JCloud - Ingress `wolf` doesn't exist in namespace `jnamespace-1a65c3c623`. Nothing to 
delete!
INFO     - 🌨️ JCloud - Deleting namespace `jnamespace-1a65c3c623` ...
INFO     - 🌨️ JCloud - Flow deleted successfully!
CRITICAL - 🌨️ JCloud - Deployment failed for Flow jflow-1a65c3c623: Error from server (Unprocessable 
Entity):
         {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"ConfigMap 
\"-423--2execut--or-12--312-23-configmap\" is
         invalid: metadata.name: Invalid value: \"-423--2execut--or-12--312-23-configmap\": a 
lowercase RFC 1123 subdomain must consist of lower case
         alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character 
(e.g. 'example.com', regex used for validation is
         '([-a-z0-9]*)?(\\.([-a-z0-9]*)?)*')","reason":"Invalid","details":{"name":"-423--2execut--or
-12--312-23-configmap","kind":"ConfigMap","causes
         ":[{"reason":"FieldValueInvalid","message":"Invalid value: 
\"-423--2execut--or-12--312-23-configmap\": a lowercase RFC 1123 subdomain must
         consist of lower case alphanumeric characters, '-' or '.', and must start and end with an 
alphanumeric character (e.g. 'example.com', regex
         used for validation is 
'([-a-z0-9]*)?(\\.([-a-z0-9]*)?)*')","field":"metadata.name"}]},"code":422}
         Error from server (Unprocessable Entity): 
{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Service
         \"-423--2execut--or-12--312-23\" is invalid: [metadata.name: Invalid value: 
\"-423--2execut--or-12--312-23\": a DNS-1035 label must consist
         of lower case alphanumeric characters or '-', start with an alphabetic character, and end 
with an alphanumeric character (e.g. 'my-name',  or
         'abc-123', regex used for validation is '([-a-z0-9]*)?'), metadata.labels: Invalid value: 
\"-423--2execut--or-12--312-23\": 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])?'), spec.selector: Invalid
         value: \"-423--2execut--or-12--312-23\": 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":"-423--2execut--or-12-
-312-23","kind":"Service","causes":[{"reason":"Fi
         eldValueInvalid","message":"Invalid value: \"-423--2execut--or-12--312-23\": a DNS-1035 
label must consist of lower case alphanumeric
         characters or '-', start with an alphabetic character, and end with an alphanumeric 
character (e.g. 'my-name',  or 'abc-123', regex used for
         validation is 
'([-a-z0-9]*)?')","field":"metadata.name"},{"reason":"FieldValueInvalid","message":"Invalid value:
         \"-423--2execut--or-12--312-23\": 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":"FieldV
alueInvalid","message":"Invalid value:
Unexpected status: FAILED reached at STARTING for Flow ID 1a65c3c623 with request_id 
9a757f88-da82-45e3-89fe-ab26ea091d22
[07/03/22 13:38:41] DEBUG    Cancelling the logstreaming...

Additional context

Add any other context about the problem here. https://jinaai.slack.com/archives/C03434J5BND/p1656827108057399?thread_ts=1656645801.909079&cid=C03434J5BND

zac-li commented 2 years ago

Discussed over slack; the root cause was the executor name not being valid:

{"reason":"FieldValueInvalid","message":"Invalid value:
         \"-423--2execut--or-12--312-23\": 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"}

Closing it.