-
Notifications
You must be signed in to change notification settings - Fork 299
Update machine metadata through etcd #555
Description
Being able to update metadata would allow for much more powerful scheduling in lieu of resource based scheduling. Perhaps this is already possible and just needs proper documentation, but I was unable to find anything.
From what I understand etcd is used to store the fleet registry and presumably the metadata. So perhaps one can manually tweak the etcd entries? I was unable to find where they were stored as all I see are update related files in etcd. And the etcd reference in cloudinit only lists basic machine info and no fleet information.
I would imagine restarting the fleet service with different metadata environment variable would do the trick, but would be rather brute force and would interrupt things. I'll try that next and see if state of services and such remains. EDIT: Seems to do the trick. Various status checks and list-units/list-machines do not show it while restarting obviously, but running services are not interrupted and show up again once up. Given my workaround was creating fake services (which unfortunately have to be on fleet and mapped to specific machine) to make up for lack of updating metadata...this approach of restarting seems better.
My usecase:
I am attempting to simulate resource based scheduling in a manner specific to my services. I have a few services of varying resource requirements and I can calculate how many I can fit (leaving margin for error). My thinking then was to add metadata indicating the types of services that could still fit on the machine (via a script on each node). The services would be define to look for their related metadata tag. Once the machine was too full for certain services the metadata could be removed.
This allows for hosting multiple of the same service on one machine (perhaps of varying sizes) instead of primitive...conflicts checks and what not.
Looking forward to your thoughts.