website: add mbits and network deprecation notice

This commit is contained in:
Nick Ethier 2020-08-25 15:42:45 -04:00 committed by Seth Hoenig
parent 26913da7c0
commit c4ddb0a43a
2 changed files with 12 additions and 2 deletions

View File

@ -6344,6 +6344,11 @@ func (tg *TaskGroup) Warnings(j *Job) error {
}
}
// Check for mbits network field
if len(tg.Networks) > 0 && tg.Networks[0].MBits > 0 {
mErr.Errors = append(mErr.Errors, fmt.Errorf("mbits has been deprecated as of Nomad 0.12.0. Please remove mbits from the network block"))
}
for _, t := range tg.Tasks {
if err := t.Warnings(); err != nil {
err = multierror.Prefix(err, fmt.Sprintf("Task %q:", t.Name))
@ -7017,6 +7022,10 @@ func (t *Task) Warnings() error {
mErr.Errors = append(mErr.Errors, fmt.Errorf("IOPS has been deprecated as of Nomad 0.9.0. Please remove IOPS from resource stanza."))
}
if t.Resources != nil && len(t.Resources.Networks) != 0 {
mErr.Errors = append(mErr.Errors, fmt.Errorf("task network resources have been deprecated as of Nomad 0.12.0. Please configure networking via group network block."))
}
for idx, tmpl := range t.Templates {
if err := tmpl.Warnings(); err != nil {
err = multierror.Prefix(err, fmt.Sprintf("Template[%d]", idx))

View File

@ -162,8 +162,9 @@ v0.12.9. To work around the bug, use a relative path.
### `mbits` and Task Network Resource deprecation
Starting in Nomad 0.12.0 the `mbits` field of the network resource block has
been deprecated. This is in part because we felt that `mbits` didn't
accurately account network bandwidth as a resource.
been deprecated and is no longer considered when making scheduling decisions.
This is in part because we felt that `mbits` didn't accurately account network
bandwidth as a resource.
Additionally the use of the `network` block inside of a task's `resource` block is
also deprecated. Users are advised to move their `network` block to the `group`