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

Enable extended resource definitions for scheduling purposes. #477

Closed
wants to merge 3 commits into from
Closed

Conversation

feri
Copy link

@feri feri commented Jul 26, 2018

Description

  • FunctionResources was extended with a new field called Others. This field stores extended resource definitions. Others is a map of strings, where the keys and values are pure strings.
  • A new unmarshaler was added for the FunctionResources struct. When the function manifest YAML is parsed this unmarshaler will validate and sanitize resource definitions. CPU and Memory requests are passed as they are, while other definitions are tested against a regexp.
  • The valid format of an extended resource for now is "vendor.domain/[gpu,fpga]", where vendor and domain can be any string. It's important to have a . [dot] between the two. After / [slash] the only valid resource names are gpu or fpga. This part should be documented in the appropriate place.
  • Tests have also been added for the new unmarshaler.

Motivation and Context

The motivation behind the patch is to enable deployment of functions that require extended resources such as GPUs or FPGAs. This will hopefully contribute for the fix of issue 639 in faas.

  • I have raised an issue to propose this change (required)

How Has This Been Tested?

The changes were tested in a Kubernetes (v1.11.0) cluster including 4 nodes. One of the nodes is running the Intel Device Plugin and exposes the integrated Intel GPU of that computer.
During the tests I was checking if scheduling is handled properly, ie. loads (functions) requesting "intel.com/gpu" are properly directed to the node mentioned before, or they were skipped if the node "ran out" of the specified resource, or was taken away from the cluster.
Docker swarm tests could not be carried out yet.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have added tests to cover my changes.
  • All new and existing tests passed.

… such as

GPUs or FPGAs.

  -FunctionResources was extended with a new field called Others. This field stores
   extended resource definitions. Others is a map of strings, where the keys and
   values are pure strings.
  -A new unmarshaler was added for the FunctionResources struct. When the function
   manifest YAML is parsed this unmarshaler will validate and sanitize resource
   definitions. CPU and Memory requests are passed as they are, while other
   definitions are tested against a regexp.
  -The valid format of an extended resource for now is "vendor.domain/[gpu,fpga]",
   where vendor and domain can be any string. It's important to have a . [dot]
   between the two. After / [slash] the only valid resource names are gpu or fpga.
   This part should be documented in the appropriate place.
  -Tests also added for the new unmarshaler.

Signed-off-by: Ferenc Szekely <ferenc.szekely@intel.com>
@feri feri closed this Aug 1, 2018
@feri feri reopened this Aug 1, 2018
@derek
Copy link

derek bot commented Aug 1, 2018

Thank you for your contribution. I've just checked and your commit doesn't appear to be signed-off.
That's something we need before your Pull Request can be merged. Please see our contributing guide.

1 similar comment
@derek
Copy link

derek bot commented Aug 1, 2018

Thank you for your contribution. I've just checked and your commit doesn't appear to be signed-off.
That's something we need before your Pull Request can be merged. Please see our contributing guide.

@derek derek bot added the no-dco label Aug 1, 2018
@feri feri closed this Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant