This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 302
fleetd: introduce Replaces option in unit files #1572
Merged
dongsupark
merged 4 commits into
coreos:master
from
endocode:dongsu/fleetd-replaces-unit
May 30, 2016
Merged
fleetd: introduce Replaces option in unit files #1572
dongsupark
merged 4 commits into
coreos:master
from
endocode:dongsu/fleetd-replaces-unit
May 30, 2016
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dongsupark
force-pushed
the
dongsu/fleetd-replaces-unit
branch
2 times, most recently
from
May 3, 2016 14:29
6ba5104
to
0c52441
Compare
Added more unit tests. Note that I'm self-reviewing this PR more carefully than other minor PRs, as the original issue is marked as milestone 0.13. As it touches fleetd, we should be a little more careful. As I don't have an access to add github labels, I'm writing it as comments. |
dongsupark
force-pushed
the
dongsu/fleetd-replaces-unit
branch
from
May 6, 2016 09:11
0c52441
to
94b0d53
Compare
Updated documents and functional tests. |
Introduce a new option 'Replaces' in X-Fleet the section, to get an existing unit rescheduled to another machine. This option basically works like an existing option 'Conflicts', except that circular replaces in 2 units are not allowed. Also Conflicts cannot be used together with Replaces, global cannot be used together with Replaces. Fixes: coreos#1394
Introduce necessary unit tests for testing a new unit option, Replaces. Not only simple replaces, but also various combinations with Conflicts or Global should be tested.
Add a short description about a new option Replaces.
dongsupark
force-pushed
the
dongsu/fleetd-replaces-unit
branch
2 times, most recently
from
May 30, 2016 13:10
6e7a035
to
b58c637
Compare
TestScheduleReplace starts 1 unit, followed by starting another unit that replaces the 1st unit. Then it verifies that the 2 units are started on different machines. Also check that circular replaces result in 1 launched unit.
Thanks! |
dongsupark
pushed a commit
to dongsupark/fleet
that referenced
this pull request
Nov 1, 2016
While the 'Replaces' option has been supported since coreos#1572, the engine didn't actually unschedule units to be replaced. It was a bug. So let's implement GetReplacedUnit() to expose the replaced unit from AgentState to the engine reconciler. And make the engine reconciler unschedule the replaced unit, and schedule the current unit. The engine scheduler's decision structure needs to also track if the unit needs to be rescheduled, to be used by the scheduling path.
dongsupark
pushed a commit
to dongsupark/fleet
that referenced
this pull request
Nov 3, 2016
While the 'Replaces' option has been supported since coreos#1572, the engine didn't actually unschedule units to be replaced. It was a bug. So let's implement GetReplacedUnit() to expose the replaced unit from AgentState to the engine reconciler. And make the engine reconciler unschedule the replaced unit, and schedule the current unit. The engine scheduler's decision structure needs to have a helper for the rescheduling case, by simply scheduling the replaced unit to a free machine.
dongsupark
pushed a commit
to dongsupark/fleet
that referenced
this pull request
Nov 3, 2016
While the 'Replaces' option has been supported since coreos#1572, the engine didn't actually unschedule units to be replaced. It was a bug. So let's implement GetReplacedUnit() to expose the replaced unit from AgentState to the engine reconciler. And make the engine reconciler unschedule the replaced unit, and schedule the current unit. The engine scheduler's decision structure needs to have a helper for the rescheduling case, by simply scheduling the replaced unit to a free machine.
dongsupark
pushed a commit
to endocode/fleet
that referenced
this pull request
Nov 4, 2016
While the 'Replaces' option has been supported since coreos#1572, the engine didn't actually unschedule units to be replaced. It was a bug. So let's implement GetReplacedUnit() to expose the replaced unit from AgentState to the engine reconciler. And make the engine reconciler unschedule the replaced unit, and schedule the current unit. The engine scheduler's decision structure needs to have a helper for the rescheduling case, by simply scheduling the replaced unit to a free machine.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduce a new option
'Replaces'
in X-Fleet the section, to get an existing unit rescheduled to another machine. This option basically works like an existing option'Conflicts'
, except that circular replaces in 2 units are not allowed. AlsoConflicts
cannot be used together withReplaces
,Global
cannot be used together withReplaces
.Fixes: #1394
/cc @onlyjob @kayrus @tixxdz