volcano icon indicating copy to clipboard operation
volcano copied to clipboard

can not update a pending vcjob

Open daizry opened this issue 2 years ago • 7 comments

What happened: According to pull1137, updating priorityClassName is supported for a pending job. However, volcano denied the update request with Error like this:
for: "vcjob.yaml": admission webhook "validatejob.volcano.sh" denied the request: job updates may not change filelds other than minAvailable, tasks[*].replicas under spec First off, this error message doesn't mention priorityClassName at all, so this error message is outdated. Further more, I've tried to change fields like minAvaliable and even apply the same yaml file again, but still got the same Error. That probably means that job update function does not work well. What you expected to happen: volcano accepts the updates and changes the configuraton of the pending job How to reproduce it (as minimally and precisely as possible):

  1. kubectl apply -f vcjob.yaml -n xxxxapply a simple vcjob and keep it remains "Pending" state
  2. edit the priorityClassName filed in the yaml file
  3. apply the edited file again

Anything else we need to know?:

Environment:

  • Volcano Version: 1.5.1
  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

daizry avatar May 16 '22 09:05 daizry

/cc @merryzhou

Thor-wl avatar May 16 '22 09:05 Thor-wl

Because vcjob.spec.task[*].maxRetry has't considered in job update verification, so apply the source yaml file when you do not specify maxRetry, the problem will occur.

Note: Workaround before my code merged: replace kubectl apply -f file.yaml with kubectl edit vcjob xxx

zbbkeepgoing avatar May 26 '22 13:05 zbbkeepgoing

Thx, after adding vcjob.spec.task[*].maxRetry into yaml file, kubectl apply -f worked.
Also, kubectl edit vcjob xxx worked without vcjob.spec.task[*].maxRetry.
Whereas, updating priorityClassName field still caused the same error

daizry avatar May 27 '22 02:05 daizry

Thx, after adding vcjob.spec.task[*].maxRetry into yaml file, kubectl apply -f worked. Also, kubectl edit vcjob xxx worked without vcjob.spec.task[*].maxRetry. Whereas, updating priorityClassName field still caused the same error

Yes, as expected. So kubectl edit vcjob xxx cannot remove maxRetry in task

zbbkeepgoing avatar May 27 '22 02:05 zbbkeepgoing

Well, but how can I update priorityClassName? Should I wait until this PR is approved?

daizry avatar May 27 '22 07:05 daizry

Well, but how can I update priorityClassName? Should I wait until this PR is approved?

Use kubectl edit vcjob only update priorityClassName or add task[*].maxRetry in file.yaml and kubectl apply -f file.yaml

zbbkeepgoing avatar May 27 '22 11:05 zbbkeepgoing

Hello 👋 Looks like there was no activity on this issue for last 90 days. Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗 If there will be no activity for 60 days, this issue will be closed (we can always reopen an issue if we need!).

stale[bot] avatar Sep 08 '22 22:09 stale[bot]