Skip to content

ClusterDrainPolicy

Source code in docs_src/capo_sagemaker/types/cluster_drain_policy.py
class ClusterDrainPolicy(TypedDict, closed=True):
    drain_timeout_in_seconds: NotRequired[
        "capo_sagemaker.types.drain_timeout_in_seconds_value.DrainTimeoutInSecondsValue"
    ]
    """<p>The maximum time, in seconds, to wait for the pods on an instance to drain. Valid values are from 0 to 5400 (90 minutes). The default is 3600 (1 hour).</p>"""
    on_drain_timeout: NotRequired[
        "capo_sagemaker.types.cluster_on_drain_timeout.ClusterOnDrainTimeout"
    ]
    """<p>The action to take if the pods on an instance don't drain within <code>DrainTimeoutInSeconds</code>. The default is <code>Skip</code>.</p> <ul> <li> <p> <code>Skip</code>: Doesn't patch the instance. The instance is uncordoned and remains on the previous AMI version. This can leave the instance group partially patched. You can then use UpdateClusterSoftware with the desired ImageReleaseVersion to manually update the remaining instances.</p> </li> <li> <p> <code>Force</code>: Deletes the remaining pods without respecting Pod Disruption Budgets, and then patches the instance.</p> </li> </ul>"""

drain_timeout_in_seconds instance-attribute

drain_timeout_in_seconds: NotRequired[DrainTimeoutInSecondsValue]

The maximum time, in seconds, to wait for the pods on an instance to drain. Valid values are from 0 to 5400 (90 minutes). The default is 3600 (1 hour).

on_drain_timeout instance-attribute

on_drain_timeout: NotRequired[ClusterOnDrainTimeout]

The action to take if the pods on an instance don't drain within DrainTimeoutInSeconds. The default is Skip.

  • Skip: Doesn't patch the instance. The instance is uncordoned and remains on the previous AMI version. This can leave the instance group partially patched. You can then use UpdateClusterSoftware with the desired ImageReleaseVersion to manually update the remaining instances.

  • Force: Deletes the remaining pods without respecting Pod Disruption Budgets, and then patches the instance.