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

Valid policy action RestartTask is prevented #386

Closed
hzxuzhonghu opened this issue Jul 24, 2019 · 0 comments · Fixed by #387
Closed

Valid policy action RestartTask is prevented #386

hzxuzhonghu opened this issue Jul 24, 2019 · 0 comments · Fixed by #387
Labels
area/webhooks kind/bug Categorizes issue or PR as related to a bug.

Comments

@hzxuzhonghu
Copy link
Collaborator

Is this a BUG REPORT or FEATURE REQUEST?:

/kind bug

What happened:

kubectl apply -f - <<EOF
apiVersion: batch.volcano.sh/v1alpha1
kind: Job
metadata:
  name: test-job2
spec:
  minAvailable: 3
  schedulerName: volcano
  policies:
    - event: PodEvicted
      action: RestartTask
  plugins:
    ssh: []
    env: []
    svc: []
  maxRetry: 5
  queue: q2
  tasks:
    - replicas: 6
      name: "default-nginx"
      template:
        metadata:
          name: web
        spec:
          containers:
            - image: nginx
              imagePullPolicy: IfNotPresent
              name: nginx
          restartPolicy: OnFailure
EOF
Error from server: error when creating "STDIN": admission webhook "validatejob.volcano.sh" denied the request: 1 error occurred:
	* spec.policies: Invalid value: "RestartTask": invalid policy action

 valid events are [TaskCompleted * PodFailed PodEvicted Unknown], valid actions are [RestartJob TerminateJob CompleteJob ResumeJob AbortJob];

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Volcano Version:
  • 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:
@hzxuzhonghu hzxuzhonghu added kind/bug Categorizes issue or PR as related to a bug. area/webhooks labels Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/webhooks kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant