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

[Umbrella] MockScheduler improvements

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.4.0
    • None

    Description

      With the MockScheduler object, it's possible to test Yunikorn as a whole without having an actual Kubernetes cluster.

      Currently, MockScheduler has some limitations. For example:

      • adding node only updates the core, not the shim
      • recovery is skipped (ignored because of APIProvider.IsTestingMode())
      • predicates are not called (ignored because of APIProvider.IsTestingMode())
      • cannot simulate shared informer calls like AddPod(), UpdatePod(), etc.

      However, it's possible to update the logic in such a way that we can simulate the entire lifecycle of an application (ie. all relevant code paths):

      • New *v1.Pod object -> shim -> SI object -> core -> allocation
      • allocation -> SI object -> shim -> bind pod
      • Running state: updated *v1.Pod -> shim -> process pod object in the cache
      • Completed/Failed state: updated *v1.Pod -> shim > process pod object in the cache -> SI object -> core -> update application state
      • *v1.Node object -> shim -> update cache -> SI object -> core -> node&cluster update

      This can also gives us a possibility to check the performance of Yunikorn and collect CPU&heap samples. This will not be a replacement of a real performance test, but with a proper test case, we can quickly do a rough assessment of performance/memory usage related changes.

      Attachments

        There are no Sub-Tasks for this issue.

        Activity

          People

            pbacsko Peter Bacsko
            pbacsko Peter Bacsko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: