Commit 177a21b1 authored by Michael Schurter's avatar Michael Schurter
Browse files

nomad/state: remove dead upgrade path code

It is uncalled so there hsould be no runtime changes.
parent 380d6756
Showing with 0 additions and 38 deletions
+0 -38
......@@ -3581,25 +3581,6 @@ func (s *StateStore) updateSummaryWithAlloc(index uint64, alloc *structs.Allocat
return nil
}
// addEphemeralDiskToTaskGroups adds missing EphemeralDisk objects to TaskGroups
func (s *StateStore) addEphemeralDiskToTaskGroups(job *structs.Job) {
for _, tg := range job.TaskGroups {
var diskMB int
for _, task := range tg.Tasks {
if task.Resources != nil {
diskMB += task.Resources.DiskMB
task.Resources.DiskMB = 0
}
}
if tg.EphemeralDisk != nil {
continue
}
tg.EphemeralDisk = &structs.EphemeralDisk{
SizeMB: diskMB,
}
}
}
// UpsertACLPolicies is used to create or update a set of ACL policies
func (s *StateStore) UpsertACLPolicies(index uint64, policies []*structs.ACLPolicy) error {
txn := s.db.Txn(true)
......@@ -4196,22 +4177,3 @@ func (r *StateRestore) SchedulerConfigRestore(schedConfig *structs.SchedulerConf
}
return nil
}
// addEphemeralDiskToTaskGroups adds missing EphemeralDisk objects to TaskGroups
func (r *StateRestore) addEphemeralDiskToTaskGroups(job *structs.Job) {
for _, tg := range job.TaskGroups {
if tg.EphemeralDisk != nil {
continue
}
var sizeMB int
for _, task := range tg.Tasks {
if task.Resources != nil {
sizeMB += task.Resources.DiskMB
task.Resources.DiskMB = 0
}
}
tg.EphemeralDisk = &structs.EphemeralDisk{
SizeMB: sizeMB,
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment