Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hzxuzhonghu committed May 9, 2019
1 parent f2a91f7 commit 942f198
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions installer/chart/volcano/templates/controllers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ rules:
resources: ["services", "configmaps"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: ["scheduling.incubator.k8s.io"]
resources: ["podgroups", "queues"]
verbs: ["get", "list", "watch", "create", "delete"]
resources: ["podgroups", "queues", "queues/status"]
verbs: ["get", "list", "watch", "create", "delete", "update"]
- apiGroups: ["scheduling.k8s.io"]
resources: ["priorityclasses"]
verbs: ["get", "list", "watch", "create", "delete"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,11 @@ spec:
type: object
type: object
version: v1alpha1
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
2 changes: 1 addition & 1 deletion pkg/controllers/queue/queue_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func (c *Controller) syncQueue(key string) error {
glog.V(2).Infoln("queue %s has not been seen or deleted", key)
return nil
}
podGroups := make([]string, len(c.podGroups[key]))
podGroups := make([]string, 0, len(c.podGroups[key]))
for pgKey := range c.podGroups[key] {
podGroups = append(podGroups, pgKey)
}
Expand Down
6 changes: 4 additions & 2 deletions test/e2e/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ var _ = Describe("Queue E2E Test", func() {

// Test Queue status
spec = &jobSpec{
name: "",
name: "q1-qj-2",
queue: defaultQueue1,
tasks: []taskSpec{
{
Expand All @@ -81,7 +81,9 @@ var _ = Describe("Queue E2E Test", func() {
},
},
}

job3 := createJob(context, spec)
err = waitJobStatePending(context, job3)
Expect(err).NotTo(HaveOccurred())
err = waitQueueStatus(func() (bool, error) {
queue, err := context.kbclient.SchedulingV1alpha1().Queues().Get(defaultQueue1, metav1.GetOptions{})
Expect(err).NotTo(HaveOccurred())
Expand Down

0 comments on commit 942f198

Please sign in to comment.