From 0953d913ed2aa31998534a4d9931ca7f812b4dc3 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Thu, 6 Dec 2018 15:09:26 -0800 Subject: [PATCH] Deprecate IOPS IOPS have been modelled as a resource since Nomad 0.1 but has never actually been detected and there is no plan in the short term to add detection. This is because IOPS is a bit simplistic of a unit to define the performance requirements from the underlying storage system. In its current state it adds unnecessary confusion and can be removed without impacting any users. This PR leaves IOPS defined at the jobspec parsing level and in the api/ resources since these are the two public uses of the field. These should be considered deprecated and only exist to allow users to stop using them during the Nomad 0.9.x release. In the future, there should be no expectation that the field will exist. --- api/compose_test.go | 2 -- api/jobs_test.go | 1 - api/resources.go | 15 +++++------ api/tasks_test.go | 1 - api/util_test.go | 1 - client/client.go | 3 --- command/agent/agent.go | 1 - command/agent/config-test-fixtures/basic.hcl | 1 - command/agent/config.go | 5 ---- command/agent/config_parse.go | 1 - command/agent/config_parse_test.go | 1 - command/agent/config_test.go | 2 -- command/agent/job_endpoint.go | 1 - command/alloc_status.go | 6 ++--- command/node_status.go | 15 ++++------- drivers/shared/executor/executor.go | 7 ++--- drivers/shared/executor/executor_linux.go | 9 ------- .../shared/executor/executor_linux_test.go | 1 - drivers/shared/executor/executor_test.go | 4 +-- jobspec/parse.go | 2 +- jobspec/parse_test.go | 4 +-- jobspec/test-fixtures/basic.hcl | 1 - jobspec/test-fixtures/basic_wrong_key.hcl | 1 - nomad/mock/mock.go | 1 - nomad/structs/diff_test.go | 24 ----------------- nomad/structs/funcs_test.go | 18 ------------- nomad/structs/structs.go | 13 ---------- nomad/structs/structs_test.go | 8 ------ plugins/drivers/proto/driver.proto | 1 - plugins/drivers/utils.go | 2 -- scheduler/annotate_test.go | 6 ----- scheduler/preemption_test.go | 21 --------------- scheduler/system_sched_test.go | 4 +-- scheduler/util.go | 2 -- website/source/api/agent.html.md | 1 - website/source/api/allocations.html.md | 4 --- website/source/api/jobs.html.md | 2 -- website/source/api/json-jobs.html.md | 2 -- website/source/api/nodes.html.md | 6 ----- website/source/api/quotas.html.md | 4 --- .../docs/commands/alloc/status.html.md.erb | 16 ++++++------ .../docs/commands/job/history.html.md.erb | 1 - .../docs/commands/job/inspect.html.md.erb | 1 - .../source/docs/commands/job/plan.html.md.erb | 1 - .../docs/commands/node/status.html.md.erb | 16 ++++++------ .../docs/commands/quota/inspect.html.md.erb | 2 -- .../source/docs/commands/status.html.md.erb | 8 +++--- .../docs/job-specification/resources.html.md | 3 --- website/source/docs/telemetry/index.html.md | 26 ------------------- .../check-restart.html.md | 6 ++--- .../reschedule.html.md | 6 ++--- .../restart.html.md | 4 +-- .../operating-a-job/inspecting-state.html.md | 4 +-- .../resource-utilization.html.md | 4 +-- .../source/intro/getting-started/jobs.html.md | 4 +-- 55 files changed, 53 insertions(+), 253 deletions(-) diff --git a/api/compose_test.go b/api/compose_test.go index 0dc3b08ea..b2618aff3 100644 --- a/api/compose_test.go +++ b/api/compose_test.go @@ -18,7 +18,6 @@ func TestCompose(t *testing.T) { CPU: helper.IntToPtr(1250), MemoryMB: helper.IntToPtr(1024), DiskMB: helper.IntToPtr(2048), - IOPS: helper.IntToPtr(500), Networks: []*NetworkResource{ { CIDR: "0.0.0.0/0", @@ -109,7 +108,6 @@ func TestCompose(t *testing.T) { CPU: helper.IntToPtr(1250), MemoryMB: helper.IntToPtr(1024), DiskMB: helper.IntToPtr(2048), - IOPS: helper.IntToPtr(500), Networks: []*NetworkResource{ { CIDR: "0.0.0.0/0", diff --git a/api/jobs_test.go b/api/jobs_test.go index 1d14185cf..857b1a850 100644 --- a/api/jobs_test.go +++ b/api/jobs_test.go @@ -412,7 +412,6 @@ func TestJobs_Canonicalize(t *testing.T) { Resources: &Resources{ CPU: helper.IntToPtr(500), MemoryMB: helper.IntToPtr(256), - IOPS: helper.IntToPtr(0), Networks: []*NetworkResource{ { MBits: helper.IntToPtr(10), diff --git a/api/resources.go b/api/resources.go index e21387769..47a9cee77 100644 --- a/api/resources.go +++ b/api/resources.go @@ -8,9 +8,14 @@ type Resources struct { CPU *int MemoryMB *int `mapstructure:"memory"` DiskMB *int `mapstructure:"disk"` - IOPS *int Networks []*NetworkResource Devices []*RequestedDevice + + // COMPAT(0.10) + // XXX Deprecated. Please do not use. The field will be removed in Nomad + // 0.10 and is only being kept to allow any references to be removed before + // then. + IOPS *int } // Canonicalize will supply missing values in the cases @@ -23,9 +28,6 @@ func (r *Resources) Canonicalize() { if r.MemoryMB == nil { r.MemoryMB = defaultResources.MemoryMB } - if r.IOPS == nil { - r.IOPS = defaultResources.IOPS - } for _, n := range r.Networks { n.Canonicalize() } @@ -42,7 +44,6 @@ func DefaultResources() *Resources { return &Resources{ CPU: helper.IntToPtr(100), MemoryMB: helper.IntToPtr(300), - IOPS: helper.IntToPtr(0), } } @@ -55,7 +56,6 @@ func MinResources() *Resources { return &Resources{ CPU: helper.IntToPtr(20), MemoryMB: helper.IntToPtr(10), - IOPS: helper.IntToPtr(0), } } @@ -73,9 +73,6 @@ func (r *Resources) Merge(other *Resources) { if other.DiskMB != nil { r.DiskMB = other.DiskMB } - if other.IOPS != nil { - r.IOPS = other.IOPS - } if len(other.Networks) != 0 { r.Networks = other.Networks } diff --git a/api/tasks_test.go b/api/tasks_test.go index 449f5650a..1d0205be2 100644 --- a/api/tasks_test.go +++ b/api/tasks_test.go @@ -266,7 +266,6 @@ func TestTask_Require(t *testing.T) { CPU: helper.IntToPtr(1250), MemoryMB: helper.IntToPtr(128), DiskMB: helper.IntToPtr(2048), - IOPS: helper.IntToPtr(500), Networks: []*NetworkResource{ { CIDR: "0.0.0.0/0", diff --git a/api/util_test.go b/api/util_test.go index c6f99018e..1589484ca 100644 --- a/api/util_test.go +++ b/api/util_test.go @@ -29,7 +29,6 @@ func testJob() *Job { Require(&Resources{ CPU: helper.IntToPtr(100), MemoryMB: helper.IntToPtr(256), - IOPS: helper.IntToPtr(10), }). SetLogConfig(&LogConfig{ MaxFiles: helper.IntToPtr(1), diff --git a/client/client.go b/client/client.go index ce2e87573..b162dd4c1 100644 --- a/client/client.go +++ b/client/client.go @@ -1242,9 +1242,6 @@ func resourcesAreEqual(first, second *structs.Resources) bool { if first.DiskMB != second.DiskMB { return false } - if first.IOPS != second.IOPS { - return false - } if len(first.Networks) != len(second.Networks) { return false } diff --git a/command/agent/agent.go b/command/agent/agent.go index 50261a4d2..a936282ad 100644 --- a/command/agent/agent.go +++ b/command/agent/agent.go @@ -485,7 +485,6 @@ func convertClientConfig(agentConfig *Config) (*clientconfig.Config, error) { r.CPU = agentConfig.Client.Reserved.CPU r.MemoryMB = agentConfig.Client.Reserved.MemoryMB r.DiskMB = agentConfig.Client.Reserved.DiskMB - r.IOPS = agentConfig.Client.Reserved.IOPS res := conf.Node.ReservedResources if res == nil { diff --git a/command/agent/config-test-fixtures/basic.hcl b/command/agent/config-test-fixtures/basic.hcl index 3cae860fc..8faba0641 100644 --- a/command/agent/config-test-fixtures/basic.hcl +++ b/command/agent/config-test-fixtures/basic.hcl @@ -51,7 +51,6 @@ client { cpu = 10 memory = 10 disk = 10 - iops = 10 reserved_ports = "1,100,10-12" } client_min_port = 1000 diff --git a/command/agent/config.go b/command/agent/config.go index 6716ccc03..54a7c3049 100644 --- a/command/agent/config.go +++ b/command/agent/config.go @@ -15,7 +15,6 @@ import ( "time" "github.com/hashicorp/go-sockaddr/template" - client "github.com/hashicorp/nomad/client/config" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad" @@ -573,7 +572,6 @@ type Resources struct { CPU int `mapstructure:"cpu"` MemoryMB int `mapstructure:"memory"` DiskMB int `mapstructure:"disk"` - IOPS int `mapstructure:"iops"` ReservedPorts string `mapstructure:"reserved_ports"` } @@ -1394,9 +1392,6 @@ func (r *Resources) Merge(b *Resources) *Resources { if b.DiskMB != 0 { result.DiskMB = b.DiskMB } - if b.IOPS != 0 { - result.IOPS = b.IOPS - } if b.ReservedPorts != "" { result.ReservedPorts = b.ReservedPorts } diff --git a/command/agent/config_parse.go b/command/agent/config_parse.go index 5f5cdcbb7..641a10c2c 100644 --- a/command/agent/config_parse.go +++ b/command/agent/config_parse.go @@ -493,7 +493,6 @@ func parseReserved(result **Resources, list *ast.ObjectList) error { "cpu", "memory", "disk", - "iops", "reserved_ports", } if err := helper.CheckHCLKeys(listVal, valid); err != nil { diff --git a/command/agent/config_parse_test.go b/command/agent/config_parse_test.go index 1a02f73d0..649339d62 100644 --- a/command/agent/config_parse_test.go +++ b/command/agent/config_parse_test.go @@ -76,7 +76,6 @@ func TestConfig_Parse(t *testing.T) { CPU: 10, MemoryMB: 10, DiskMB: 10, - IOPS: 10, ReservedPorts: "1,100,10-12", }, GCInterval: 6 * time.Second, diff --git a/command/agent/config_test.go b/command/agent/config_test.go index dae2353ba..4c0d97f6e 100644 --- a/command/agent/config_test.go +++ b/command/agent/config_test.go @@ -96,7 +96,6 @@ func TestConfig_Merge(t *testing.T) { CPU: 10, MemoryMB: 10, DiskMB: 10, - IOPS: 10, ReservedPorts: "1,10-30,55", }, }, @@ -254,7 +253,6 @@ func TestConfig_Merge(t *testing.T) { CPU: 15, MemoryMB: 15, DiskMB: 15, - IOPS: 15, ReservedPorts: "2,10-30,55", }, GCInterval: 6 * time.Second, diff --git a/command/agent/job_endpoint.go b/command/agent/job_endpoint.go index 8bbec61b5..c34204cc2 100644 --- a/command/agent/job_endpoint.go +++ b/command/agent/job_endpoint.go @@ -853,7 +853,6 @@ func ApiResourcesToStructs(in *api.Resources) *structs.Resources { out := &structs.Resources{ CPU: *in.CPU, MemoryMB: *in.MemoryMB, - IOPS: *in.IOPS, } if l := len(in.Networks); l != 0 { diff --git a/command/alloc_status.go b/command/alloc_status.go index 5a1d50956..bc51b6bbb 100644 --- a/command/alloc_status.go +++ b/command/alloc_status.go @@ -9,7 +9,6 @@ import ( "time" humanize "github.com/dustin/go-humanize" - "github.com/hashicorp/nomad/api" "github.com/hashicorp/nomad/api/contexts" "github.com/hashicorp/nomad/client/allocrunner/taskrunner/restarts" @@ -490,7 +489,7 @@ func (c *AllocStatusCommand) outputTaskResources(alloc *api.Allocation, task str } var resourcesOutput []string - resourcesOutput = append(resourcesOutput, "CPU|Memory|Disk|IOPS|Addresses") + resourcesOutput = append(resourcesOutput, "CPU|Memory|Disk|Addresses") firstAddr := "" if len(addr) > 0 { firstAddr = addr[0] @@ -512,11 +511,10 @@ func (c *AllocStatusCommand) outputTaskResources(alloc *api.Allocation, task str deviceStats = ru.ResourceUsage.DeviceStats } } - resourcesOutput = append(resourcesOutput, fmt.Sprintf("%v MHz|%v|%v|%v|%v", + resourcesOutput = append(resourcesOutput, fmt.Sprintf("%v MHz|%v|%v|%v", cpuUsage, memUsage, humanize.IBytes(uint64(*alloc.Resources.DiskMB*bytesPerMegabyte)), - *resource.IOPS, firstAddr)) for i := 1; i < len(addr); i++ { resourcesOutput = append(resourcesOutput, fmt.Sprintf("||||%v", addr[i])) diff --git a/command/node_status.go b/command/node_status.go index f722feda1..085cdfbda 100644 --- a/command/node_status.go +++ b/command/node_status.go @@ -9,11 +9,10 @@ import ( "time" humanize "github.com/dustin/go-humanize" - "github.com/posener/complete" - "github.com/hashicorp/nomad/api" "github.com/hashicorp/nomad/api/contexts" "github.com/hashicorp/nomad/helper" + "github.com/posener/complete" ) const ( @@ -611,25 +610,22 @@ func getAllocatedResources(client *api.Client, runningAllocs []*api.Allocation, total := computeNodeTotalResources(node) // Get Resources - var cpu, mem, disk, iops int + var cpu, mem, disk int for _, alloc := range runningAllocs { cpu += *alloc.Resources.CPU mem += *alloc.Resources.MemoryMB disk += *alloc.Resources.DiskMB - iops += *alloc.Resources.IOPS } resources := make([]string, 2) - resources[0] = "CPU|Memory|Disk|IOPS" - resources[1] = fmt.Sprintf("%d/%d MHz|%s/%s|%s/%s|%d/%d", + resources[0] = "CPU|Memory|Disk" + resources[1] = fmt.Sprintf("%d/%d MHz|%s/%s|%s/%s", cpu, *total.CPU, humanize.IBytes(uint64(mem*bytesPerMegabyte)), humanize.IBytes(uint64(*total.MemoryMB*bytesPerMegabyte)), humanize.IBytes(uint64(disk*bytesPerMegabyte)), - humanize.IBytes(uint64(*total.DiskMB*bytesPerMegabyte)), - iops, - *total.IOPS) + humanize.IBytes(uint64(*total.DiskMB*bytesPerMegabyte))) return resources } @@ -647,7 +643,6 @@ func computeNodeTotalResources(node *api.Node) api.Resources { total.CPU = helper.IntToPtr(*r.CPU - *res.CPU) total.MemoryMB = helper.IntToPtr(*r.MemoryMB - *res.MemoryMB) total.DiskMB = helper.IntToPtr(*r.DiskMB - *res.DiskMB) - total.IOPS = helper.IntToPtr(*r.IOPS - *res.IOPS) return total } diff --git a/drivers/shared/executor/executor.go b/drivers/shared/executor/executor.go index 7239fd577..85cd4cac4 100644 --- a/drivers/shared/executor/executor.go +++ b/drivers/shared/executor/executor.go @@ -14,16 +14,14 @@ import ( "time" "github.com/armon/circbuf" + "github.com/hashicorp/consul-template/signals" hclog "github.com/hashicorp/go-hclog" multierror "github.com/hashicorp/go-multierror" - "github.com/hashicorp/nomad/client/allocdir" "github.com/hashicorp/nomad/client/lib/fifo" "github.com/hashicorp/nomad/client/stats" - shelpers "github.com/hashicorp/nomad/helper/stats" - - "github.com/hashicorp/consul-template/signals" cstructs "github.com/hashicorp/nomad/client/structs" + shelpers "github.com/hashicorp/nomad/helper/stats" ) const ( @@ -83,7 +81,6 @@ type Resources struct { CPU int MemoryMB int DiskMB int - IOPS int } // ExecCommand holds the user command, args, and other isolation related diff --git a/drivers/shared/executor/executor_linux.go b/drivers/shared/executor/executor_linux.go index 989cea353..684e088de 100644 --- a/drivers/shared/executor/executor_linux.go +++ b/drivers/shared/executor/executor_linux.go @@ -26,7 +26,6 @@ import ( "github.com/opencontainers/runc/libcontainer/cgroups" cgroupFs "github.com/opencontainers/runc/libcontainer/cgroups/fs" lconfigs "github.com/opencontainers/runc/libcontainer/configs" - "github.com/syndtr/gocapability/capability" ) @@ -555,14 +554,6 @@ func configureCgroups(cfg *lconfigs.Config, command *ExecCommand) error { // Set the relative CPU shares for this cgroup. cfg.Cgroups.Resources.CpuShares = uint64(command.Resources.CPU) - if command.Resources.IOPS != 0 { - // Validate it is in an acceptable range. - if command.Resources.IOPS < 10 || command.Resources.IOPS > 1000 { - return fmt.Errorf("resources.IOPS must be between 10 and 1000: %d", command.Resources.IOPS) - } - - cfg.Cgroups.Resources.BlkioWeight = uint16(command.Resources.IOPS) - } return nil } diff --git a/drivers/shared/executor/executor_linux_test.go b/drivers/shared/executor/executor_linux_test.go index de7bf54f4..90daa0fd0 100644 --- a/drivers/shared/executor/executor_linux_test.go +++ b/drivers/shared/executor/executor_linux_test.go @@ -67,7 +67,6 @@ func testExecutorCommandWithChroot(t *testing.T) (*ExecCommand, *allocdir.AllocD Resources: &Resources{ CPU: task.Resources.CPU, MemoryMB: task.Resources.MemoryMB, - IOPS: task.Resources.IOPS, DiskMB: task.Resources.DiskMB, }, } diff --git a/drivers/shared/executor/executor_test.go b/drivers/shared/executor/executor_test.go index 05ab48938..9ef5d4fb5 100644 --- a/drivers/shared/executor/executor_test.go +++ b/drivers/shared/executor/executor_test.go @@ -11,14 +11,13 @@ import ( "testing" "time" - tu "github.com/hashicorp/nomad/testutil" - hclog "github.com/hashicorp/go-hclog" "github.com/hashicorp/nomad/client/allocdir" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/client/taskenv" "github.com/hashicorp/nomad/helper/testlog" "github.com/hashicorp/nomad/nomad/mock" + tu "github.com/hashicorp/nomad/testutil" "github.com/stretchr/testify/require" ) @@ -54,7 +53,6 @@ func testExecutorCommand(t *testing.T) (*ExecCommand, *allocdir.AllocDir) { Resources: &Resources{ CPU: task.Resources.CPU, MemoryMB: task.Resources.MemoryMB, - IOPS: task.Resources.IOPS, DiskMB: task.Resources.DiskMB, }, } diff --git a/jobspec/parse.go b/jobspec/parse.go index 71f4faa42..c88df2d87 100644 --- a/jobspec/parse.go +++ b/jobspec/parse.go @@ -1411,7 +1411,7 @@ func parseResources(result *api.Resources, list *ast.ObjectList) error { // Check for invalid keys valid := []string{ "cpu", - "iops", + "iops", // COMPAT(0.10): Remove after one release to allow it to be removed from jobspecs "disk", "memory", "network", diff --git a/jobspec/parse_test.go b/jobspec/parse_test.go index cf202338d..babd9738a 100644 --- a/jobspec/parse_test.go +++ b/jobspec/parse_test.go @@ -7,12 +7,11 @@ import ( "testing" "time" + capi "github.com/hashicorp/consul/api" "github.com/hashicorp/nomad/api" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/structs" "github.com/kr/pretty" - - capi "github.com/hashicorp/consul/api" ) func TestParse(t *testing.T) { @@ -317,7 +316,6 @@ func TestParse(t *testing.T) { Resources: &api.Resources{ CPU: helper.IntToPtr(500), MemoryMB: helper.IntToPtr(128), - IOPS: helper.IntToPtr(30), }, Constraints: []*api.Constraint{ { diff --git a/jobspec/test-fixtures/basic.hcl b/jobspec/test-fixtures/basic.hcl index c42e7fcbc..553986bb8 100644 --- a/jobspec/test-fixtures/basic.hcl +++ b/jobspec/test-fixtures/basic.hcl @@ -270,7 +270,6 @@ job "binstore-storagelocker" { resources { cpu = 500 memory = 128 - iops = 30 } constraint { diff --git a/jobspec/test-fixtures/basic_wrong_key.hcl b/jobspec/test-fixtures/basic_wrong_key.hcl index 3a36c80ab..df555e031 100644 --- a/jobspec/test-fixtures/basic_wrong_key.hcl +++ b/jobspec/test-fixtures/basic_wrong_key.hcl @@ -115,7 +115,6 @@ job "binstore-storagelocker" { resources { cpu = 500 memory = 128 - iops = 30 } constraint { diff --git a/nomad/mock/mock.go b/nomad/mock/mock.go index 017efb584..d3ccda145 100644 --- a/nomad/mock/mock.go +++ b/nomad/mock/mock.go @@ -28,7 +28,6 @@ func Node() *structs.Node { CPU: 4000, MemoryMB: 8192, DiskMB: 100 * 1024, - IOPS: 150, }, Reserved: &structs.Resources{ CPU: 100, diff --git a/nomad/structs/diff_test.go b/nomad/structs/diff_test.go index 9dc41f10b..4b18f4a1e 100644 --- a/nomad/structs/diff_test.go +++ b/nomad/structs/diff_test.go @@ -3178,7 +3178,6 @@ func TestTaskDiff(t *testing.T) { CPU: 100, MemoryMB: 100, DiskMB: 100, - IOPS: 100, }, }, New: &Task{ @@ -3186,7 +3185,6 @@ func TestTaskDiff(t *testing.T) { CPU: 200, MemoryMB: 200, DiskMB: 200, - IOPS: 200, }, }, Expected: &TaskDiff{ @@ -3208,12 +3206,6 @@ func TestTaskDiff(t *testing.T) { Old: "100", New: "200", }, - { - Type: DiffTypeEdited, - Name: "IOPS", - Old: "100", - New: "200", - }, { Type: DiffTypeEdited, Name: "MemoryMB", @@ -3233,7 +3225,6 @@ func TestTaskDiff(t *testing.T) { CPU: 100, MemoryMB: 100, DiskMB: 100, - IOPS: 100, }, }, New: &Task{ @@ -3241,7 +3232,6 @@ func TestTaskDiff(t *testing.T) { CPU: 200, MemoryMB: 100, DiskMB: 200, - IOPS: 100, }, }, Expected: &TaskDiff{ @@ -3263,12 +3253,6 @@ func TestTaskDiff(t *testing.T) { Old: "100", New: "200", }, - { - Type: DiffTypeNone, - Name: "IOPS", - Old: "100", - New: "100", - }, { Type: DiffTypeNone, Name: "MemoryMB", @@ -3534,7 +3518,6 @@ func TestTaskDiff(t *testing.T) { CPU: 100, MemoryMB: 100, DiskMB: 100, - IOPS: 100, Devices: []*RequestedDevice{ { Name: "foo", @@ -3556,7 +3539,6 @@ func TestTaskDiff(t *testing.T) { CPU: 100, MemoryMB: 100, DiskMB: 100, - IOPS: 100, Devices: []*RequestedDevice{ { Name: "foo", @@ -3592,12 +3574,6 @@ func TestTaskDiff(t *testing.T) { Old: "100", New: "100", }, - { - Type: DiffTypeNone, - Name: "IOPS", - Old: "100", - New: "100", - }, { Type: DiffTypeNone, Name: "MemoryMB", diff --git a/nomad/structs/funcs_test.go b/nomad/structs/funcs_test.go index 1408c49f0..d29c8e178 100644 --- a/nomad/structs/funcs_test.go +++ b/nomad/structs/funcs_test.go @@ -143,7 +143,6 @@ func TestAllocsFit_Old(t *testing.T) { CPU: 2000, MemoryMB: 2048, DiskMB: 10000, - IOPS: 100, Networks: []*NetworkResource{ { Device: "eth0", @@ -156,7 +155,6 @@ func TestAllocsFit_Old(t *testing.T) { CPU: 1000, MemoryMB: 1024, DiskMB: 5000, - IOPS: 50, Networks: []*NetworkResource{ { Device: "eth0", @@ -173,7 +171,6 @@ func TestAllocsFit_Old(t *testing.T) { CPU: 1000, MemoryMB: 1024, DiskMB: 5000, - IOPS: 50, Networks: []*NetworkResource{ { Device: "eth0", @@ -213,20 +210,6 @@ func TestAllocsFit_TerminalAlloc_Old(t *testing.T) { CPU: 2000, MemoryMB: 2048, DiskMB: 10000, - IOPS: 100, - Networks: []*NetworkResource{ - { - Device: "eth0", - CIDR: "10.0.0.0/8", - MBits: 100, - }, - }, - }, - Reserved: &Resources{ - CPU: 1000, - MemoryMB: 1024, - DiskMB: 5000, - IOPS: 50, Networks: []*NetworkResource{ { Device: "eth0", @@ -243,7 +226,6 @@ func TestAllocsFit_TerminalAlloc_Old(t *testing.T) { CPU: 1000, MemoryMB: 1024, DiskMB: 5000, - IOPS: 50, Networks: []*NetworkResource{ { Device: "eth0", diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index 09daf9895..922ae84ad 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -1698,7 +1698,6 @@ type Resources struct { CPU int MemoryMB int DiskMB int - IOPS int Networks Networks Devices []*RequestedDevice } @@ -1715,7 +1714,6 @@ func DefaultResources() *Resources { return &Resources{ CPU: 100, MemoryMB: 300, - IOPS: 0, } } @@ -1728,7 +1726,6 @@ func MinResources() *Resources { return &Resources{ CPU: 20, MemoryMB: 10, - IOPS: 0, } } @@ -1768,9 +1765,6 @@ func (r *Resources) Merge(other *Resources) { if other.DiskMB != 0 { r.DiskMB = other.DiskMB } - if other.IOPS != 0 { - r.IOPS = other.IOPS - } if len(other.Networks) != 0 { r.Networks = other.Networks } @@ -1806,9 +1800,6 @@ func (r *Resources) MeetsMinResources() error { if r.MemoryMB < minResources.MemoryMB { mErr.Errors = append(mErr.Errors, fmt.Errorf("minimum MemoryMB value is %d; got %d", minResources.MemoryMB, r.MemoryMB)) } - if r.IOPS < minResources.IOPS { - mErr.Errors = append(mErr.Errors, fmt.Errorf("minimum IOPS value is %d; got %d", minResources.IOPS, r.IOPS)) - } for i, n := range r.Networks { if err := n.MeetsMinResources(); err != nil { mErr.Errors = append(mErr.Errors, fmt.Errorf("network resource at index %d failed: %v", i, err)) @@ -1865,9 +1856,6 @@ func (r *Resources) Superset(other *Resources) (bool, string) { if r.DiskMB < other.DiskMB { return false, "disk" } - if r.IOPS < other.IOPS { - return false, "iops" - } return true, "" } @@ -1880,7 +1868,6 @@ func (r *Resources) Add(delta *Resources) error { r.CPU += delta.CPU r.MemoryMB += delta.MemoryMB r.DiskMB += delta.DiskMB - r.IOPS += delta.IOPS for _, n := range delta.Networks { // Find the matching interface by IP or CIDR diff --git a/nomad/structs/structs_test.go b/nomad/structs/structs_test.go index ea5258b42..2669f9399 100644 --- a/nomad/structs/structs_test.go +++ b/nomad/structs/structs_test.go @@ -800,7 +800,6 @@ func TestTask_Validate(t *testing.T) { Resources: &Resources{ CPU: 100, MemoryMB: 100, - IOPS: 10, }, LogConfig: DefaultLogConfig(), } @@ -874,7 +873,6 @@ func TestTask_Validate_Services(t *testing.T) { Resources: &Resources{ CPU: 100, MemoryMB: 100, - IOPS: 10, }, Services: []*Service{s1, s2}, } @@ -1752,13 +1750,11 @@ func TestResource_Superset(t *testing.T) { CPU: 2000, MemoryMB: 2048, DiskMB: 10000, - IOPS: 100, } r2 := &Resources{ CPU: 2000, MemoryMB: 1024, DiskMB: 5000, - IOPS: 50, } if s, _ := r1.Superset(r1); !s { @@ -1780,7 +1776,6 @@ func TestResource_Add(t *testing.T) { CPU: 2000, MemoryMB: 2048, DiskMB: 10000, - IOPS: 100, Networks: []*NetworkResource{ { CIDR: "10.0.0.0/8", @@ -1793,7 +1788,6 @@ func TestResource_Add(t *testing.T) { CPU: 2000, MemoryMB: 1024, DiskMB: 5000, - IOPS: 50, Networks: []*NetworkResource{ { IP: "10.0.0.1", @@ -1812,7 +1806,6 @@ func TestResource_Add(t *testing.T) { CPU: 3000, MemoryMB: 3072, DiskMB: 15000, - IOPS: 150, Networks: []*NetworkResource{ { CIDR: "10.0.0.0/8", @@ -3973,7 +3966,6 @@ func TestNode_Copy(t *testing.T) { CPU: 4000, MemoryMB: 8192, DiskMB: 100 * 1024, - IOPS: 150, Networks: []*NetworkResource{ { Device: "eth0", diff --git a/plugins/drivers/proto/driver.proto b/plugins/drivers/proto/driver.proto index 5abc10a42..a24ebb0b9 100644 --- a/plugins/drivers/proto/driver.proto +++ b/plugins/drivers/proto/driver.proto @@ -356,7 +356,6 @@ message RawResources { int64 cpu = 1; int64 memory = 2; int64 disk = 3; - int64 iops = 4; repeated NetworkResource networks = 5; } diff --git a/plugins/drivers/utils.go b/plugins/drivers/utils.go index 090ff014a..60b9ca0b4 100644 --- a/plugins/drivers/utils.go +++ b/plugins/drivers/utils.go @@ -100,7 +100,6 @@ func resourcesFromProto(pb *proto.Resources) *Resources { r.NomadResources = &structs.Resources{ CPU: int(pb.RawResources.Cpu), MemoryMB: int(pb.RawResources.Memory), - IOPS: int(pb.RawResources.Iops), DiskMB: int(pb.RawResources.Disk), } @@ -151,7 +150,6 @@ func resourcesToProto(r *Resources) *proto.Resources { pb.RawResources = &proto.RawResources{ Cpu: int64(r.NomadResources.CPU), Memory: int64(r.NomadResources.MemoryMB), - Iops: int64(r.NomadResources.IOPS), Disk: int64(r.NomadResources.DiskMB), Networks: make([]*proto.NetworkResource, len(r.NomadResources.Networks)), } diff --git a/scheduler/annotate_test.go b/scheduler/annotate_test.go index 54e90d7c5..57c95ce6e 100644 --- a/scheduler/annotate_test.go +++ b/scheduler/annotate_test.go @@ -228,12 +228,6 @@ func TestAnnotateTask(t *testing.T) { Old: "100", New: "200", }, - { - Type: structs.DiffTypeEdited, - Name: "IOPS", - Old: "100", - New: "200", - }, { Type: structs.DiffTypeEdited, Name: "MemoryMB", diff --git a/scheduler/preemption_test.go b/scheduler/preemption_test.go index f2d83f1f4..d4938eca4 100644 --- a/scheduler/preemption_test.go +++ b/scheduler/preemption_test.go @@ -201,7 +201,6 @@ func TestPreemption(t *testing.T) { CPU: 3200, MemoryMB: 7256, DiskMB: 4 * 1024, - IOPS: 150, Networks: []*structs.NetworkResource{ { Device: "eth0", @@ -234,7 +233,6 @@ func TestPreemption(t *testing.T) { CPU: 3200, MemoryMB: 7256, DiskMB: 4 * 1024, - IOPS: 150, Networks: []*structs.NetworkResource{ { Device: "eth0", @@ -250,7 +248,6 @@ func TestPreemption(t *testing.T) { CPU: 4000, MemoryMB: 8192, DiskMB: 4 * 1024, - IOPS: 300, Networks: []*structs.NetworkResource{ { Device: "eth0", @@ -268,7 +265,6 @@ func TestPreemption(t *testing.T) { CPU: 1200, MemoryMB: 2256, DiskMB: 4 * 1024, - IOPS: 50, Networks: []*structs.NetworkResource{ { Device: "eth0", @@ -281,7 +277,6 @@ func TestPreemption(t *testing.T) { CPU: 200, MemoryMB: 256, DiskMB: 4 * 1024, - IOPS: 50, Networks: []*structs.NetworkResource{ { Device: "eth0", @@ -326,7 +321,6 @@ func TestPreemption(t *testing.T) { CPU: 1200, MemoryMB: 2256, DiskMB: 4 * 1024, - IOPS: 50, Networks: []*structs.NetworkResource{ { Device: "eth0", @@ -339,7 +333,6 @@ func TestPreemption(t *testing.T) { CPU: 200, MemoryMB: 256, DiskMB: 4 * 1024, - IOPS: 50, Networks: []*structs.NetworkResource{ { Device: "eth1", @@ -358,7 +351,6 @@ func TestPreemption(t *testing.T) { CPU: 200, MemoryMB: 256, DiskMB: 4 * 1024, - IOPS: 50, Networks: []*structs.NetworkResource{ { Device: "eth0", @@ -488,7 +480,6 @@ func TestPreemption(t *testing.T) { CPU: 2800, MemoryMB: 2256, DiskMB: 40 * 1024, - IOPS: 100, Networks: []*structs.NetworkResource{ { Device: "eth0", @@ -501,7 +492,6 @@ func TestPreemption(t *testing.T) { CPU: 200, MemoryMB: 256, DiskMB: 4 * 1024, - IOPS: 50, Networks: []*structs.NetworkResource{ { Device: "eth0", @@ -608,7 +598,6 @@ func TestPreemption(t *testing.T) { CPU: 1200, MemoryMB: 2256, DiskMB: 4 * 1024, - IOPS: 150, Networks: []*structs.NetworkResource{ { Device: "eth0", @@ -621,7 +610,6 @@ func TestPreemption(t *testing.T) { CPU: 200, MemoryMB: 256, DiskMB: 4 * 1024, - IOPS: 50, Networks: []*structs.NetworkResource{ { Device: "eth0", @@ -640,7 +628,6 @@ func TestPreemption(t *testing.T) { CPU: 200, MemoryMB: 256, DiskMB: 4 * 1024, - IOPS: 50, Networks: []*structs.NetworkResource{ { Device: "eth0", @@ -683,7 +670,6 @@ func TestPreemption(t *testing.T) { CPU: 1200, MemoryMB: 2256, DiskMB: 4 * 1024, - IOPS: 50, Networks: []*structs.NetworkResource{ { Device: "eth0", @@ -696,7 +682,6 @@ func TestPreemption(t *testing.T) { CPU: 200, MemoryMB: 256, DiskMB: 4 * 1024, - IOPS: 50, Networks: []*structs.NetworkResource{ { Device: "eth0", @@ -715,7 +700,6 @@ func TestPreemption(t *testing.T) { CPU: 200, MemoryMB: 256, DiskMB: 4 * 1024, - IOPS: 50, Networks: []*structs.NetworkResource{ { Device: "eth0", @@ -757,7 +741,6 @@ func TestPreemption(t *testing.T) { CPU: 1200, MemoryMB: 2256, DiskMB: 4 * 1024, - IOPS: 50, Networks: []*structs.NetworkResource{ { Device: "eth0", @@ -770,7 +753,6 @@ func TestPreemption(t *testing.T) { CPU: 200, MemoryMB: 256, DiskMB: 4 * 1024, - IOPS: 10, Networks: []*structs.NetworkResource{ { Device: "eth0", @@ -783,7 +765,6 @@ func TestPreemption(t *testing.T) { CPU: 200, MemoryMB: 256, DiskMB: 4 * 1024, - IOPS: 10, Networks: []*structs.NetworkResource{ { Device: "eth0", @@ -813,7 +794,6 @@ func TestPreemption(t *testing.T) { CPU: 200, MemoryMB: 256, DiskMB: 4 * 1024, - IOPS: 10, Networks: []*structs.NetworkResource{ { Device: "eth0", @@ -836,7 +816,6 @@ func TestPreemption(t *testing.T) { CPU: 1800, MemoryMB: 2256, DiskMB: 4 * 1024, - IOPS: 50, Networks: []*structs.NetworkResource{ { Device: "eth0", diff --git a/scheduler/system_sched_test.go b/scheduler/system_sched_test.go index 27d99b205..9461fd85e 100644 --- a/scheduler/system_sched_test.go +++ b/scheduler/system_sched_test.go @@ -1,13 +1,12 @@ package scheduler import ( + "fmt" "reflect" "sort" "testing" "time" - "fmt" - memdb "github.com/hashicorp/go-memdb" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/helper/uuid" @@ -1568,7 +1567,6 @@ func TestSystemSched_Preemption(t *testing.T) { CPU: 3072, MemoryMB: 5034, DiskMB: 20 * 1024, - IOPS: 150, Networks: []*structs.NetworkResource{ { Device: "eth0", diff --git a/scheduler/util.go b/scheduler/util.go index 85a93298f..c97005381 100644 --- a/scheduler/util.go +++ b/scheduler/util.go @@ -409,8 +409,6 @@ func tasksUpdated(jobA, jobB *structs.Job, taskGroup string) bool { return true } else if ar.MemoryMB != br.MemoryMB { return true - } else if ar.IOPS != br.IOPS { - return true } } return false diff --git a/website/source/api/agent.html.md b/website/source/api/agent.html.md index 5b0d17cb2..4ff04e1cb 100644 --- a/website/source/api/agent.html.md +++ b/website/source/api/agent.html.md @@ -194,7 +194,6 @@ $ curl \ "Reserved": { "CPU": 0, "DiskMB": 0, - "IOPS": 0, "MemoryMB": 0, "ParsedReservedPorts": null, "ReservedPorts": "" diff --git a/website/source/api/allocations.html.md b/website/source/api/allocations.html.md index e898d1568..46c7b9408 100644 --- a/website/source/api/allocations.html.md +++ b/website/source/api/allocations.html.md @@ -280,7 +280,6 @@ $ curl \ "CPU": 500, "MemoryMB": 10, "DiskMB": 0, - "IOPS": 0, "Networks": [ { "Device": "", @@ -336,7 +335,6 @@ $ curl \ "CPU": 500, "MemoryMB": 10, "DiskMB": 300, - "IOPS": 0, "Networks": [ { "Device": "lo0", @@ -357,7 +355,6 @@ $ curl \ "CPU": 0, "MemoryMB": 0, "DiskMB": 300, - "IOPS": 0, "Networks": null }, "TaskResources": { @@ -365,7 +362,6 @@ $ curl \ "CPU": 500, "MemoryMB": 10, "DiskMB": 0, - "IOPS": 0, "Networks": [ { "Device": "lo0", diff --git a/website/source/api/jobs.html.md b/website/source/api/jobs.html.md index ac3485d07..f699a434f 100644 --- a/website/source/api/jobs.html.md +++ b/website/source/api/jobs.html.md @@ -443,7 +443,6 @@ $ curl \ "CPU": 500, "MemoryMB": 256, "DiskMB": 0, - "IOPS": 0, "Networks": [ { "Device": "", @@ -647,7 +646,6 @@ $ curl \ "CPU": 500, "MemoryMB": 256, "DiskMB": 0, - "IOPS": 0, "Networks": [ { "Device": "", diff --git a/website/source/api/json-jobs.html.md b/website/source/api/json-jobs.html.md index dc2477762..208ae670f 100644 --- a/website/source/api/json-jobs.html.md +++ b/website/source/api/json-jobs.html.md @@ -512,8 +512,6 @@ The `Resources` object supports the following keys: - `CPU` - The CPU required in MHz. -- `IOPS` - The number of IOPS required given as a weight between 10-1000. - - `MemoryMB` - The memory required in MB. - `Networks` - A list of network objects. diff --git a/website/source/api/nodes.html.md b/website/source/api/nodes.html.md index 5dbd59e08..b0cf053e6 100644 --- a/website/source/api/nodes.html.md +++ b/website/source/api/nodes.html.md @@ -274,14 +274,12 @@ $ curl \ "Reserved": { "CPU": 0, "DiskMB": 0, - "IOPS": 0, "MemoryMB": 0, "Networks": null }, "Resources": { "CPU": 2200, "DiskMB": 25392, - "IOPS": 0, "MemoryMB": 3704, "Networks": [ { @@ -443,7 +441,6 @@ $ curl \ "Resources": { "CPU": 100, "DiskMB": 0, - "IOPS": 0, "MemoryMB": 300, "Networks": [ { @@ -541,7 +538,6 @@ $ curl \ "Resources": { "CPU": 100, "DiskMB": 300, - "IOPS": 0, "MemoryMB": 300, "Networks": [ { @@ -562,7 +558,6 @@ $ curl \ "SharedResources": { "CPU": 0, "DiskMB": 300, - "IOPS": 0, "MemoryMB": 0, "Networks": null }, @@ -571,7 +566,6 @@ $ curl \ "webapp": { "CPU": 100, "DiskMB": 0, - "IOPS": 0, "MemoryMB": 300, "Networks": [ { diff --git a/website/source/api/quotas.html.md b/website/source/api/quotas.html.md index 9c94f4e73..ee9590161 100644 --- a/website/source/api/quotas.html.md +++ b/website/source/api/quotas.html.md @@ -61,7 +61,6 @@ $ curl \ "RegionLimit": { "CPU": 2500, "DiskMB": 0, - "IOPS": 0, "MemoryMB": 2000, "Networks": null } @@ -115,7 +114,6 @@ $ curl \ "RegionLimit": { "CPU": 2500, "DiskMB": 0, - "IOPS": 0, "MemoryMB": 2000, "Networks": null } @@ -256,7 +254,6 @@ $ curl \ "CPU": 500, "MemoryMB": 256, "DiskMB": 0, - "IOPS": 0, "Networks": null }, "Hash": "NLOoV2WBU8ieJIrYXXx8NRb5C2xU61pVVWRDLEIMxlU=" @@ -308,7 +305,6 @@ $ curl \ "CPU": 500, "MemoryMB": 256, "DiskMB": 0, - "IOPS": 0, "Networks": null }, "Hash": "NLOoV2WBU8ieJIrYXXx8NRb5C2xU61pVVWRDLEIMxlU=" diff --git a/website/source/docs/commands/alloc/status.html.md.erb b/website/source/docs/commands/alloc/status.html.md.erb index b7e17d181..6432d96ba 100644 --- a/website/source/docs/commands/alloc/status.html.md.erb +++ b/website/source/docs/commands/alloc/status.html.md.erb @@ -85,8 +85,8 @@ Reschedule Attempts = 1/3 Task "redis" is "running" Task Resources -CPU Memory Disk IOPS Addresses -1/500 MHz 6.3 MiB/256 MiB 300 MiB 0 db: 127.0.0.1:27908 +CPU Memory Disk Addresses +1/500 MHz 6.3 MiB/256 MiB 300 MiB db: 127.0.0.1:27908 Task Events: Started At = 07/25/17 16:12:48 UTC @@ -102,8 +102,8 @@ Time Type Description Task "web" is "running" Task Resources -CPU Memory Disk IOPS Addresses -1/500 MHz 6.3 MiB/256 MiB 300 MiB 0 db: 127.0.0.1:30572 +CPU Memory Disk Addresses +1/500 MHz 6.3 MiB/256 MiB 300 MiB db: 127.0.0.1:30572 Task Events: Started At = 07/25/17 16:12:49 UTC @@ -144,8 +144,8 @@ Failures = 0 Task "redis" is "running" Task Resources -CPU Memory Disk IOPS Addresses -1/500 MHz 6.3 MiB/256 MiB 300 MiB 0 db: 127.0.0.1:27908 +CPU Memory Disk Addresses +1/500 MHz 6.3 MiB/256 MiB 300 MiB db: 127.0.0.1:27908 Task Events: Started At = 07/25/17 16:12:48 UTC @@ -161,8 +161,8 @@ Time Type Description Task "web" is "running" Task Resources -CPU Memory Disk IOPS Addresses -1/500 MHz 6.3 MiB/256 MiB 300 MiB 0 db: 127.0.0.1:30572 +CPU Memory Disk Addresses +1/500 MHz 6.3 MiB/256 MiB 300 MiB db: 127.0.0.1:30572 Task Events: Started At = 07/25/17 16:12:49 UTC diff --git a/website/source/docs/commands/job/history.html.md.erb b/website/source/docs/commands/job/history.html.md.erb index da5cd8a54..1ff827d21 100644 --- a/website/source/docs/commands/job/history.html.md.erb +++ b/website/source/docs/commands/job/history.html.md.erb @@ -54,7 +54,6 @@ Diff = +/- Resources { CPU: "500" DiskMB: "0" - IOPS: "0" +/- MemoryMB: "256" => "512" } diff --git a/website/source/docs/commands/job/inspect.html.md.erb b/website/source/docs/commands/job/inspect.html.md.erb index 485dc2386..abe842e44 100644 --- a/website/source/docs/commands/job/inspect.html.md.erb +++ b/website/source/docs/commands/job/inspect.html.md.erb @@ -106,7 +106,6 @@ $ nomad job inspect redis "CPU": 500, "MemoryMB": 256, "DiskMB": 300, - "IOPS": 0, "Networks": [ { "Public": false, diff --git a/website/source/docs/commands/job/plan.html.md.erb b/website/source/docs/commands/job/plan.html.md.erb index ce6c0caf9..6b157dc47 100644 --- a/website/source/docs/commands/job/plan.html.md.erb +++ b/website/source/docs/commands/job/plan.html.md.erb @@ -160,7 +160,6 @@ $ nomad job plan -verbose example.nomad + Resources { + CPU: "500" + DiskMB: "300" - + IOPS: "0" + MemoryMB: "256" + Network { + MBits: "10" diff --git a/website/source/docs/commands/node/status.html.md.erb b/website/source/docs/commands/node/status.html.md.erb index cd6d1e2c8..888cd72ed 100644 --- a/website/source/docs/commands/node/status.html.md.erb +++ b/website/source/docs/commands/node/status.html.md.erb @@ -114,8 +114,8 @@ Time Subsystem Message 2018-03-29T17:23:42Z Cluster Node registered Allocated Resources -CPU Memory Disk IOPS -500/2600 MHz 256 MiB/2.0 GiB 300 MiB/32 GiB 0/0 +CPU Memory Disk +500/2600 MHz 256 MiB/2.0 GiB 300 MiB/32 GiB Allocation Resource Utilization CPU Memory @@ -157,8 +157,8 @@ Time Subsystem Message 2018-03-29T17:23:42Z Cluster Node registered Allocated Resources -CPU Memory Disk IOPS -2500/2600 MHz 1.3 GiB/2.0 GiB 1.5 GiB/32 GiB 0/0 +CPU Memory Disk +2500/2600 MHz 1.3 GiB/2.0 GiB 1.5 GiB/32 GiB Allocation Resource Utilization CPU Memory @@ -222,8 +222,8 @@ Time Subsystem Message 2018-03-29T17:23:42Z Cluster Node registered Allocated Resources -CPU Memory Disk IOPS -2500/2600 MHz 1.3 GiB/2.0 GiB 1.5 GiB/32 GiB 0/0 +CPU Memory Disk +2500/2600 MHz 1.3 GiB/2.0 GiB 1.5 GiB/32 GiB Allocation Resource Utilization CPU Memory @@ -303,8 +303,8 @@ Time Subsystem Message Details 2018-03-29T17:23:42Z Cluster Node registered Allocated Resources -CPU Memory Disk IOPS -2500/2600 MHz 1.3 GiB/2.0 GiB 1.5 GiB/32 GiB 0/0 +CPU Memory Disk +2500/2600 MHz 1.3 GiB/2.0 GiB 1.5 GiB/32 GiB Allocation Resource Utilization CPU Memory diff --git a/website/source/docs/commands/quota/inspect.html.md.erb b/website/source/docs/commands/quota/inspect.html.md.erb index 5ed911e38..5487c5136 100644 --- a/website/source/docs/commands/quota/inspect.html.md.erb +++ b/website/source/docs/commands/quota/inspect.html.md.erb @@ -46,7 +46,6 @@ $ nomad quota inspect default-quota "RegionLimit": { "CPU": 2500, "DiskMB": 0, - "IOPS": 0, "MemoryMB": 2000, "Networks": null } @@ -68,7 +67,6 @@ $ nomad quota inspect default-quota "RegionLimit": { "CPU": 500, "DiskMB": 0, - "IOPS": 0, "MemoryMB": 256, "Networks": null } diff --git a/website/source/docs/commands/status.html.md.erb b/website/source/docs/commands/status.html.md.erb index 001ae0a3d..7ff6601ff 100644 --- a/website/source/docs/commands/status.html.md.erb +++ b/website/source/docs/commands/status.html.md.erb @@ -81,8 +81,8 @@ Deployment Health = healthy Task "redis" is "running" Task Resources -CPU Memory Disk IOPS Addresses -4/500 MHz 6.3 MiB/256 MiB 300 MiB 0 db: 127.0.0.1:21752 +CPU Memory Disk Addresses +4/500 MHz 6.3 MiB/256 MiB 300 MiB db: 127.0.0.1:21752 Task Events: Started At = 08/28/17 23:01:39 UTC @@ -126,8 +126,8 @@ Drivers = docker,exec,java,qemu,raw_exec,rkt Uptime = 4h17m24s Allocated Resources -CPU Memory Disk IOPS -500/8709 MHz 256 MiB/2.0 GiB 300 MiB/24 GiB 0/0 +CPU Memory Disk +500/8709 MHz 256 MiB/2.0 GiB 300 MiB/24 GiB Allocation Resource Utilization CPU Memory diff --git a/website/source/docs/job-specification/resources.html.md b/website/source/docs/job-specification/resources.html.md index cbc03bfee..f4733737b 100644 --- a/website/source/docs/job-specification/resources.html.md +++ b/website/source/docs/job-specification/resources.html.md @@ -46,9 +46,6 @@ job "docs" { - `cpu` `(int: 100)` - Specifies the CPU required to run this task in MHz. -- `iops` `(int: 0)` - Specifies the number of IOPS required given as a weight - between 0-1000. - - `memory` `(int: 300)` - Specifies the memory required in MB - `network` ([Network][]: ) - Specifies the network diff --git a/website/source/docs/telemetry/index.html.md b/website/source/docs/telemetry/index.html.md index 35fe122cb..e51f21e10 100644 --- a/website/source/docs/telemetry/index.html.md +++ b/website/source/docs/telemetry/index.html.md @@ -316,20 +316,6 @@ Starting in version 0.7, Nomad will emit tagged metrics, in the below format: Gauge node_id, datacenter - - `nomad.client.allocated.iops` - Total amount of IOPS the scheduler has allocated to tasks - IOPS - Gauge - node_id, datacenter - - - `nomad.client.unallocated.iops` - Total amount of IOPS free for the scheduler to allocate to tasks - IOPS - Gauge - node_id, datacenter - `nomad.client.allocated.network` Total amount of bandwidth the scheduler has allocated to tasks on the @@ -541,18 +527,6 @@ detailed above) but any new metrics will only be available in the new format. Megabytes Gauge - - `nomad.client.allocated.iops.` - Total amount of IOPS the scheduler has allocated to tasks - IOPS - Gauge - - - `nomad.client.unallocated.iops.` - Total amount of IOPS free for the scheduler to allocate to tasks - IOPS - Gauge - `nomad.client.allocated.network..` Total amount of bandwidth the scheduler has allocated to tasks on the diff --git a/website/source/guides/operating-a-job/failure-handling-strategies/check-restart.html.md b/website/source/guides/operating-a-job/failure-handling-strategies/check-restart.html.md index b236e21b4..207426b49 100644 --- a/website/source/guides/operating-a-job/failure-handling-strategies/check-restart.html.md +++ b/website/source/guides/operating-a-job/failure-handling-strategies/check-restart.html.md @@ -53,8 +53,8 @@ Modified = 39s ago Task "test" is "dead" Task Resources -CPU Memory Disk IOPS Addresses -100 MHz 300 MiB 300 MiB 0 p1: 127.0.0.1:28422 +CPU Memory Disk Addresses +100 MHz 300 MiB 300 MiB p1: 127.0.0.1:28422 Task Events: Started At = 2018-04-12T22:50:32Z @@ -76,4 +76,4 @@ Time Type Description 2018-04-12T17:49:53-05:00 Started Task started by client ``` -[check restart]: /docs/job-specification/check_restart.html "Nomad check restart Stanza" \ No newline at end of file +[check restart]: /docs/job-specification/check_restart.html "Nomad check restart Stanza" diff --git a/website/source/guides/operating-a-job/failure-handling-strategies/reschedule.html.md b/website/source/guides/operating-a-job/failure-handling-strategies/reschedule.html.md index d26389de5..4f926ef7e 100644 --- a/website/source/guides/operating-a-job/failure-handling-strategies/reschedule.html.md +++ b/website/source/guides/operating-a-job/failure-handling-strategies/reschedule.html.md @@ -70,8 +70,8 @@ Reschedule Eligibility = 25s from now Task "demo" is "dead" Task Resources -CPU Memory Disk IOPS Addresses -100 MHz 300 MiB 300 MiB 0 p1: 127.0.0.1:27646 +CPU Memory Disk Addresses +100 MHz 300 MiB 300 MiB p1: 127.0.0.1:27646 Task Events: Started At = 2018-04-12T20:44:25Z @@ -89,4 +89,4 @@ Time Type Description ``` -[reschedule]: /docs/job-specification/reschedule.html "Nomad reschedule Stanza" \ No newline at end of file +[reschedule]: /docs/job-specification/reschedule.html "Nomad reschedule Stanza" diff --git a/website/source/guides/operating-a-job/failure-handling-strategies/restart.html.md b/website/source/guides/operating-a-job/failure-handling-strategies/restart.html.md index 4d6fb202f..f8ca558d8 100644 --- a/website/source/guides/operating-a-job/failure-handling-strategies/restart.html.md +++ b/website/source/guides/operating-a-job/failure-handling-strategies/restart.html.md @@ -68,8 +68,8 @@ Modified = 22s ago Task "demo" is "dead" Task Resources -CPU Memory Disk IOPS Addresses -100 MHz 300 MiB 300 MiB 0 +CPU Memory Disk Addresses +100 MHz 300 MiB 300 MiB Task Events: Started At = 2018-04-12T22:29:08Z diff --git a/website/source/guides/operating-a-job/inspecting-state.html.md b/website/source/guides/operating-a-job/inspecting-state.html.md index 9ea83616c..f53b3b605 100644 --- a/website/source/guides/operating-a-job/inspecting-state.html.md +++ b/website/source/guides/operating-a-job/inspecting-state.html.md @@ -150,8 +150,8 @@ Client Status = running Task "server" is "running" Task Resources -CPU Memory Disk IOPS Addresses -0/100 MHz 728 KiB/10 MiB 300 MiB 0 http: 10.1.1.196:5678 +CPU Memory Disk Addresses +0/100 MHz 728 KiB/10 MiB 300 MiB http: 10.1.1.196:5678 Recent Events: Time Type Description diff --git a/website/source/guides/operating-a-job/resource-utilization.html.md b/website/source/guides/operating-a-job/resource-utilization.html.md index f01491de6..18012ccbb 100644 --- a/website/source/guides/operating-a-job/resource-utilization.html.md +++ b/website/source/guides/operating-a-job/resource-utilization.html.md @@ -45,8 +45,8 @@ Client Status = running Task "server" is "running" Task Resources -CPU Memory Disk IOPS Addresses -75/100 MHz 784 KiB/10 MiB 300 MiB 0 http: 10.1.1.196:5678 +CPU Memory Disk Addresses +75/100 MHz 784 KiB/10 MiB 300 MiB http: 10.1.1.196:5678 Memory Stats Cache Max Usage RSS Swap diff --git a/website/source/intro/getting-started/jobs.html.md b/website/source/intro/getting-started/jobs.html.md index ef50f0a61..c35dbf953 100644 --- a/website/source/intro/getting-started/jobs.html.md +++ b/website/source/intro/getting-started/jobs.html.md @@ -108,8 +108,8 @@ Deployment Health = healthy Task "redis" is "running" Task Resources -CPU Memory Disk IOPS Addresses -8/500 MHz 6.3 MiB/256 MiB 300 MiB 0 db: 127.0.0.1:22672 +CPU Memory Disk Addresses +8/500 MHz 6.3 MiB/256 MiB 300 MiB db: 127.0.0.1:22672 Task Events: Started At = 10/31/17 22:58:49 UTC