From c0782fcf50aa87adafff8c8ff102c7f5da73a5bc Mon Sep 17 00:00:00 2001
From: hc-github-team-nomad-core
<82989552+hc-github-team-nomad-core@users.noreply.github.com>
Date: Wed, 14 Jun 2023 13:52:22 -0500
Subject: [PATCH] backport of commit 101e7313427387ffb6aa29efef320868ba69dca5
(#17530)
This pull request was automerged via backport-assistant
---
command/namespace_apply.go | 4 +++-
command/namespace_delete.go | 4 ++++
website/content/docs/commands/namespace/apply.mdx | 4 +++-
website/content/docs/commands/namespace/delete.mdx | 4 ++++
website/content/docs/operations/metrics-reference.mdx | 2 +-
5 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/command/namespace_apply.go b/command/namespace_apply.go
index 9093ea6e36df..18f54c7da784 100644
--- a/command/namespace_apply.go
+++ b/command/namespace_apply.go
@@ -31,7 +31,9 @@ Usage: nomad namespace apply [options]
Instead of a file, you may instead pass the namespace name to create
or update as the only argument.
- If ACLs are enabled, this command requires a management ACL token.
+ If ACLs are enabled, this command requires a management ACL token. In
+ federated clusters, the namespace will be created in the authoritative region
+ and will be replicated to all federated regions.
General Options:
diff --git a/command/namespace_delete.go b/command/namespace_delete.go
index 7f4e0f97eb31..f3c314ad3a7c 100644
--- a/command/namespace_delete.go
+++ b/command/namespace_delete.go
@@ -19,6 +19,10 @@ Usage: nomad namespace delete [options]
If ACLs are enabled, this command requires a management ACL token.
+ You cannot delete a namespace that has non-terminal jobs. In federated
+ clusters, you cannot delete a namespace that has non-terminal jobs in any of
+ the federated regions.
+
General Options:
` + generalOptionsUsage(usageOptsDefault|usageOptsNoNamespace)
diff --git a/website/content/docs/commands/namespace/apply.mdx b/website/content/docs/commands/namespace/apply.mdx
index d9f4a854af3b..347fa969cda7 100644
--- a/website/content/docs/commands/namespace/apply.mdx
+++ b/website/content/docs/commands/namespace/apply.mdx
@@ -25,7 +25,9 @@ expected.
Instead of a file, you may instead pass the namespace name to create
or update as the only argument.
-If ACLs are enabled, this command requires a management ACL token.
+If ACLs are enabled, this command requires a management ACL token. In federated
+clusters, the namespace will be created in the authoritative region and will be
+replicated to all federated regions.
## General Options
diff --git a/website/content/docs/commands/namespace/delete.mdx b/website/content/docs/commands/namespace/delete.mdx
index 14b6cb71969d..5e2edef27266 100644
--- a/website/content/docs/commands/namespace/delete.mdx
+++ b/website/content/docs/commands/namespace/delete.mdx
@@ -22,6 +22,10 @@ The `namespace delete` command requires the name of the namespace to be deleted.
If ACLs are enabled, this command requires a management ACL token.
+You cannot delete a namespace that has non-terminal jobs. In federated clusters,
+you cannot delete a namespace that has non-terminal jobs in any of the federated
+regions.
+
## General Options
@include 'general_options_no_namespace.mdx'
diff --git a/website/content/docs/operations/metrics-reference.mdx b/website/content/docs/operations/metrics-reference.mdx
index 66cb6974cc79..fb8a66a1c4c3 100644
--- a/website/content/docs/operations/metrics-reference.mdx
+++ b/website/content/docs/operations/metrics-reference.mdx
@@ -154,7 +154,7 @@ Nomad will emit [tagged metrics][tagged-metrics], in the below format:
| --------------------------------------- | ----------------------------------------------------------------------------------- | ---------- | ----- | ------------------------------------------------------------------------------------- |
| `nomad.client.allocated.cpu` | Total amount of CPU shares the scheduler has allocated to tasks | Mhz | Gauge | datacenter, host, node_class, node_id, node_scheduling_eligibility, node_status |
| `nomad.client.allocated.memory` | Total amount of memory the scheduler has allocated to tasks | Megabytes | Gauge | datacenter, host, node_class, node_id, node_scheduling_eligibility, node_status |
-| `nomad.client.allocated_disk` | Total amount of disk space the scheduler has allocated to tasks | Megabytes | Gauge | datacenter, host, node_class, node_id, node_scheduling_eligibility, node_status |
+| `nomad.client.allocated.disk` | Total amount of disk space the scheduler has allocated to tasks | Megabytes | Gauge | datacenter, host, node_class, node_id, node_scheduling_eligibility, node_status |
| `nomad.client.allocations.blocked` | Number of allocations waiting for previous versions to exit | Integer | Gauge | datacenter, host, node_class, node_id, node_scheduling_eligibility, node_status |
| `nomad.client.allocations.migrating` | Number of allocations migrating data from previous versions (see [`sticky`][sticky])| Integer | Gauge | datacenter, host, node_class, node_id, node_scheduling_eligibility, node_status |
| `nomad.client.allocations.pending` | Number of allocations pending (received by the client but not yet running) | Integer | Gauge | datacenter, host, node_class, node_id, node_scheduling_eligibility, node_status |