Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Rescheduling API? #1335

Open
jwaldrip opened this issue Aug 24, 2015 · 6 comments
Open

Rescheduling API? #1335

jwaldrip opened this issue Aug 24, 2015 · 6 comments

Comments

@jwaldrip
Copy link

Are there any plans to allow for a manual rescheduling of units? i.e. fleetctl mv {service-id} {machine-id}

@mischief
Copy link
Contributor

@jwaldrip no, not afaik. what is the use case? why not use constraints in the unit file?

@jwaldrip
Copy link
Author

The option here would be to have the flexibility of building my own resource based scheduler on top of what fleet has already provided. In addition, I could also preemptively move units before taking a machine down, rather than having fleet only attempt it as a recovery method. I love how low level fleet is, I just wish the API gave me more control to implement my own control plane.

@jonboulle
Copy link
Contributor

On Mon, Aug 24, 2015 at 10:48 AM, Jason Waldrip [email protected]
wrote:

fleetctl mv {service-id} {machine-id}

Well this could be implemented reasonably trivially with the equivalent of

fleetctl cat {service-id} | awk '{/MachineID=/ sub(/MachineID=.*/,
"MachineID=asdf")' > {service-id}
fleetctl destroy {service-id} && fleetctl start {service-id}

Are you looking for a way to do it through the API?

@jwaldrip
Copy link
Author

Of course. I know it can be done with some custom scripting. By being part of the API, the move command could ensure the service has started on the new before stopping the old.

@wuqixuan
Copy link
Contributor

wuqixuan commented Sep 1, 2015

Actually, if implement it, the code need first stop it, then start it, the logic is almost same as the script given by jonboulle. The same unit cannot run in both machines.
So I think the effects of the scripts and mv cmd are almost the same.

@wuqixuan
Copy link
Contributor

wuqixuan commented Sep 1, 2015

And I think mv command is similar with overwrite command #1295, but overwrite command is more general and the functionality is more than "mv" command. So if we accept overwrite, mv duplicates a little.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants