Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
80041603
Unverified
Commit
80041603
authored
6 years ago
by
Preetha Appan
Browse files
Options
Download
Email Patches
Plain Diff
REview feedback
parent
5f27e001
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nomad/structs/structs.go
+4
-14
nomad/structs/structs.go
with
4 additions
and
14 deletions
+4
-14
nomad/structs/structs.go
+
4
-
14
View file @
80041603
...
...
@@ -644,9 +644,8 @@ type ApplyPlanResultsRequest struct {
// the evaluation itself being updated.
EvalID
string
// NodePreemptions is a map from node id to a set of allocations from other
// lower priority jobs that are preempted. Preempted allocations are marked
// as stopped.
// NodePreemptions is a slice of allocations from other lower priority jobs
// that are preempted. Preempted allocations are marked as evicted.
NodePreemptions
[]
*
Allocation
// PreemptionEvals is a slice of follow up evals for jobs whose allocations
...
...
@@ -1899,9 +1898,7 @@ func (r *Resources) Subtract(delta *Resources) error {
for
_
,
n
:=
range
delta
.
Networks
{
// Find the matching interface by IP or CIDR
idx
:=
r
.
NetIndex
(
n
)
if
idx
==
-
1
{
r
.
Networks
=
append
(
r
.
Networks
,
n
.
Copy
())
}
else
{
if
idx
!=
-
1
{
r
.
Networks
[
idx
]
.
MBits
-=
delta
.
Networks
[
idx
]
.
MBits
}
}
...
...
@@ -8232,14 +8229,6 @@ func (p *Plan) IsNoOp() bool {
len
(
p
.
DeploymentUpdates
)
==
0
}
// PreemptedAllocs is used to store information about a set of allocations
// for the same job that get preempted as part of placing allocations for the
// job in the plan.
// Preempted allocs represents a map from jobid to allocations
// to be preempted
type
PreemptedAllocs
map
[
*
NamespacedID
][]
*
Allocation
// PlanResult is the result of a plan submitted to the leader.
type
PlanResult
struct
{
// NodeUpdate contains all the updates that were committed.
...
...
@@ -8295,6 +8284,7 @@ func (p *PlanResult) FullCommit(plan *Plan) (bool, int, int) {
type
PlanAnnotations
struct
{
// DesiredTGUpdates is the set of desired updates per task group.
DesiredTGUpdates
map
[
string
]
*
DesiredUpdates
// PreemptedAllocs is the set of allocations to be preempted to make the placement successful.
PreemptedAllocs
[]
*
AllocListStub
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help