1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/rosa-node-drain-grace-period.adoc
2025-09-04 17:57:02 +00:00

87 lines
2.9 KiB
Plaintext

// Module included in the following assemblies:
//
// * rosa_cluster_admin/rosa_nodes/rosa-managing-worker-nodes.adoc
//this module applies to ROSA HCP only
:_mod-docs-content-type: PROCEDURE
[id="rosa-node-drain-grace-period_{context}"]
= Configuring node drain grace periods
You can configure the node drain grace period for machine pools in your cluster. The node drain grace period for a machine pool is how long the cluster respects the Pod Disruption Budget protected workloads when upgrading or replacing the machine pool. After this grace period, all remaining workloads are forcibly evicted. The value range for the node drain grace period is from `0` to `1 week`. With the default value `0`, or empty value, the machine pool drains without any time limitation until complete.
.Prerequisites
* You installed and configured the latest {rosa-cli-first} on your workstation.
* You created a {product-title} cluster.
* You have an existing machine pool.
.Procedure
. List all of the machine pools in the cluster by running the following command:
+
[source,terminal]
----
$ rosa list machinepools --cluster=<cluster_name>
----
+
.Example output
[source,terminal]
----
ID AUTOSCALING REPLICAS INSTANCE TYPE LABELS TAINTS AVAILABILITY ZONE SUBNET VERSION AUTOREPAIR
db-nodes-mp No 2/2 m5.xlarge us-east-2a subnet-08d4d81def67847b6 4.14.34 Yes
workers No 2/2 m5.xlarge us-east-2a subnet-08d4d81def67847b6 4.14.34 Yes
----
. Check the node drain grace period for a machine pool by running the following command:
+
[source,terminal]
----
$ rosa describe machinepool --cluster <cluster_name> --machinepool=<machinepool_name>
----
+
.Example output
[source,terminal]
----
ID: workers
Cluster ID: 2a90jdl0i4p9r9k9956v5ocv40se1kqs
...
Node drain grace period: // <1>
...
----
+
<1> If this value is empty, the machine pool drains without any time limitation until complete.
. Optional: Update the node drain grace period for a machine pool by running the following command:
+
[source,terminal]
----
$ rosa edit machinepool --node-drain-grace-period="<node_drain_grace_period_value>" --cluster=<cluster_name> <machinepool_name>
----
+
[NOTE]
====
Changing the node drain grace period during a machine pool upgrade applies to future upgrades, not in-progress upgrades.
====
.Verification
. Check the node drain grace period for a machine pool by running the following command:
+
[source,terminal]
----
$ rosa describe machinepool --cluster <cluster_name> <machinepool_name>
----
+
.Example output
[source,terminal]
----
ID: workers
Cluster ID: 2a90jdl0i4p9r9k9956v5ocv40se1kqs
...
Node drain grace period: 30 minutes
...
----
. Verify the correct `Node drain grace period` for your machine pool in the output.