Uploaded image for project: 'Apache YuniKorn'
  1. Apache YuniKorn
  2. YUNIKORN-434

Scheduler crashes when the queueName in pod spec doesn't contain DOT

    XMLWordPrintableJSON

Details

    Description

      Yunikorn queue config in values.yaml:

       

      configuration: |
        partitions:
          -
            name: default
            queues:
              - name: root
                submitacl: '*'
                queues:
                  - name: dev
                  - name: test
      

       

      Below is the pod spec:

      cat sleep.yml
      apiVersion: v1
      kind: Pod
      metadata:
        labels:
          app: sleep
          applicationId: "application-sleep-test"
          queue: test
        name: task-test
        namespace: test
      spec:
        schedulerName: yunikorn
        containers:
          - name: sleep-inf
            image: "alpine:latest"
            command: ["sleep", "inf"]
      

      When kubectl create -f sleep.yml is done scheduler pod crashes.

      2020-10-02T13:49:59.255Z        INFO    cache/context.go:573    task added      {"appID": "application-sleep-test", "taskID": "71d10c5f-2d27-4201-9ec8-df0ef3f12a37", "taskState": "New"}
      2020-10-02T13:49:59.255Z        DEBUG   cache/context.go:198    adding pod to cache     {"podName": "task-test"}
      2020-10-02T13:49:59.870Z        DEBUG   cache/application.go:373        shim app state transition       {"app": "application-sleep-test", "source": "New", "destination": "Submitted", "event": "SubmitApplication"}
      2020-10-02T13:49:59.870Z        INFO    cache/application.go:309        handle app submission   {"app": "applicationID: application-sleep-test, queue: test, partition: default, totalNumOfTasks: 1, currentState: Submitted", "clusterID": "mycluster"}
      2020-10-02T13:49:59.870Z        DEBUG   cache/cluster_info.go:140       enqueued event  {"eventType": "*cacheevent.RMUpdateRequestEvent", "event": {"Request":{"rmID":"mycluster","newApplications":[{"applicationID":"application-sleep-test","queueName":"test","partitionName":"[mycluster]default","ugi":{"user":"default"},"tags":{"namespace":"test"}}]}}, "currentQueueSize": 0}
      2020-10-02T13:49:59.871Z        DEBUG   cache/partition_info.go:356     adding app to partition {"appID": "application-sleep-test", "queue": "test", "partitionName": "[mycluster]default"}
      2020-10-02T13:49:59.871Z        INFO    cache/partition_info.go:379     app added to partition  {"appID": "application-sleep-test", "partitionName": "[mycluster]default"}
      2020-10-02T13:49:59.871Z        DEBUG   scheduler/scheduler.go:230      enqueued event  {"eventType": "*schedulerevent.SchedulerApplicationsUpdateEvent", "event": {"AddedApplications":[{"ApplicationID":"application-sleep-test","Partition":"[mycluster]default","QueueName":"test","SubmissionTime":1601646599870976327}],"RemovedApplications":null}, "currentQueueSize": 0}
      panic: runtime error: slice bounds out of rangegoroutine 69 [running]:
      github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*partitionSchedulingContext).createSchedulingQueue(0xc0001fe7e0, 0xc000043cfc, 0x4, 0xc000593a58, 0x7, 0xc0038e42f0, 0x1, 0x1, 0x0, 0xfffffff1886e0900)
              /home/travis/gopath/pkg/mod/github.com/apache/incubator-yunikorn-core@v0.0.0-20200909001345-c2699e725c8a/pkg/scheduler/scheduling_partition.go:237 +0x8e9
      github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*partitionSchedulingContext).addSchedulingApplication(0xc0001fe7e0, 0xc0036bec60, 0x0, 0x0)
              /home/travis/gopath/pkg/mod/github.com/apache/incubator-yunikorn-core@v0.0.0-20200909001345-c2699e725c8a/pkg/scheduler/scheduling_partition.go:124 +0x670
      github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*ClusterSchedulingContext).addSchedulingApplication(0xc0004508a0, 0xc0036bec60, 0x0, 0x0)
              /home/travis/gopath/pkg/mod/github.com/apache/incubator-yunikorn-core@v0.0.0-20200909001345-c2699e725c8a/pkg/scheduler/scheduling_context.go:114 +0x105
      github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*Scheduler).addNewApplication(0xc00022a000, 0xc0000a1100, 0xc003936381, 0x9)
              /home/travis/gopath/pkg/mod/github.com/apache/incubator-yunikorn-core@v0.0.0-20200909001345-c2699e725c8a/pkg/scheduler/scheduler.go:209 +0x11b
      github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*Scheduler).processApplicationUpdateEvent(0xc00022a000, 0xc0063c22a0)
              /home/travis/gopath/pkg/mod/github.com/apache/incubator-yunikorn-core@v0.0.0-20200909001345-c2699e725c8a/pkg/scheduler/scheduler.go:447 +0x76e
      github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*Scheduler).handleSchedulerEvent(0xc00022a000)
              /home/travis/gopath/pkg/mod/github.com/apache/incubator-yunikorn-core@v0.0.0-20200909001345-c2699e725c8a/pkg/scheduler/scheduler.go:596 +0x3e5
      created by github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*Scheduler).StartService
              /home/travis/gopath/pkg/mod/github.com/apache/incubator-yunikorn-core@v0.0.0-20200909001345-c2699e725c8a/pkg/scheduler/scheduler.go:67 +0x6d

      Attachments

        Issue Links

          Activity

            People

              vbm Vishwas
              vbm Vishwas
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: