Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

job name supports underline #203

Closed
Yancey1989 opened this issue Jul 7, 2017 · 1 comment
Closed

job name supports underline #203

Yancey1989 opened this issue Jul 7, 2017 · 1 comment

Comments

@Yancey1989
Copy link
Collaborator

Yancey1989 commented Jul 7, 2017

Error message:

$ paddlecloud submit -jobname fit_a_line -cpu 1 -gpu 1 -parallelism 1 -entry "python train.py" fit_a_line/
uploading: fit_a_line/train.py...
error submiting job: (422)
Reason: Unprocessable Entity
HTTP response headers: HTTPHeaderDict({'Date': 'Thu, 06 Jul 2017 07:52:39 GMT', 'Content-Length': '1729', 'Content-Type': 'application/json'})
HTTP response body: {
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "ReplicaSet.extensions \"fit_a_line-pserver\" is invalid: [metadata.name: Invalid value: \"fit_a_line-pserver\": a DNS-1123 subdomain must consist of lowe\
r 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]\
*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'), spec.template.spec.containers[0].name: Invalid value: \"fit_a_line\": a DNS-1123 label must consist of lower case alp\
hanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name',  or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-\
z0-9])?')]",
  "reason": "Invalid",
  "details": {
    "name": "fit_a_line-pserver",
    "group": "extensions",
    "kind": "ReplicaSet",
    "causes": [
      {
        "reason": "FieldValueInvalid",
        "message": "Invalid value: \"fit_a_line-pserver\": a DNS-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]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')",
        "field": "metadata.name"
      },
      {
        "reason": "FieldValueInvalid",
        "message": "Invalid value: \"fit_a_line\": a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanume\
ric character (e.g. 'my-name',  or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')",
        "field": "spec.template.spec.containers[0].name"
      }
    ]
  },
  "code": 422
}

Kubernetes does allow to use underline as the metadata.name, maybe paddlecloud would do some escaping to solve this problem.

@Yancey1989
Copy link
Collaborator Author

Escaping the job name may cause some other problems, such as the same job name... so we can check the job name with paddlecloud client side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant