-
Notifications
You must be signed in to change notification settings - Fork 27
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
♻️/✨use placement constraints instead of generic resources ⚠️ #5255
♻️/✨use placement constraints instead of generic resources ⚠️ #5255
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #5255 +/- ##
========================================
- Coverage 87.1% 87.1% -0.1%
========================================
Files 1256 1303 +47
Lines 52221 53356 +1135
Branches 1156 1169 +13
========================================
+ Hits 45529 46501 +972
- Misses 6443 6606 +163
Partials 249 249
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…-resoruces-via-placing-constraints
…-resoruces-via-placing-constraints
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what you did works but with this the whole generic resources gets blocked in case we re-use it at a latter time. Please check my proposal so that both might be used together without changing the code again. Also if suddenly we need one generic resource such as SSE or whatever this code will prevent it, while the proposal I did would not.
services/director-v2/src/simcore_service_director_v2/core/dynamic_services_settings/sidecar.py
Outdated
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/core/dynamic_services_settings/sidecar.py
Outdated
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/core/dynamic_services_settings/sidecar.py
Outdated
Show resolved
Hide resolved
...-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/docker_service_specs/settings.py
Outdated
Show resolved
Hide resolved
...-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/docker_service_specs/settings.py
Outdated
Show resolved
Hide resolved
...-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/docker_service_specs/settings.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are your ENV changes "safe" according to definition in the update env instruction?
Based on the answer, we should follow the steps described
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am very happy you enabled this @GitHK and unblocked the docker engine version upgrade with this.
But I regret that instead of getting rid of generic resources at the source (removing them where they are specified), we are introducing code that "circumvents" this by a replacement. Anyone who does not have the arcane knowledge of sparc y1-y6 will not understand why there is a weird replacement functionality introduced here I guess. If I was adding this code, I would post disclaimer-comments everywhere explaining that this logic is intentionally a "hack" somehow (if I understood it correctly), enabling a fast path beyond the generic-constraints and the associated bug in docker.
that being said I am happy that ops are now enabled to upgrade the docker engine version number :--)
...r-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/docker_service_specs/sidecar.py
Outdated
Show resolved
Hide resolved
I'd say yes, I've also replied in the associated PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks a lot for the changes! it looks very clean. thanks!
services/director-v2/src/simcore_service_director_v2/core/dynamic_services_settings/sidecar.py
Outdated
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/core/dynamic_services_settings/sidecar.py
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/core/dynamic_services_settings/sidecar.py
Show resolved
Hide resolved
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
What do these changes do?
Enables the update of the docker engine.
The
director
anddirector-v2
can be instructed to no longer add generic resources, butuse placement constraints to start services on specific nodes.
NOTE: this is possible because we never take into account the quantity of a certain resource that needs to be consumed on the host machine, it's randomly set to a big number and we only use 1 unit of it.
The
director
anddirector-v2
have two new env vars which have possible substitutions for generic resources with constraints. If one of these items is found it will be replaced.The env vars map the resource kind, ususally
VRAM
andAIRAM
with a placement constraint.Related issue/s
TypeError: issubclass() arg 1 must be a class
while building BaseCustomSettings classes #5253How to test
Dev Checklist
DevOps Checklist