mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
Adding docs for OCPBUGS-45262
This commit is contained in:
committed by
openshift-cherrypick-robot
parent
bf336884ca
commit
e0341036ce
83
modules/powering-off-bare-metal-hosts-web-console.adoc
Normal file
83
modules/powering-off-bare-metal-hosts-web-console.adoc
Normal file
@@ -0,0 +1,83 @@
|
||||
// Module included in the following assemblies:
|
||||
//
|
||||
// scalability_and_performance/managing-bare-metal-hosts.adoc
|
||||
|
||||
:_mod-docs-content-type: PROCEDURE
|
||||
[id="powering-off-bare-metal-hosts-web-console_{context}"]
|
||||
= Powering off bare-metal hosts
|
||||
|
||||
You can power off bare-metal cluster hosts in the web console or by applying a patch in the cluster by using the OpenShift CLI (`oc`).
|
||||
Before you power off a host, you should mark the node as unschedulable and drain all pods and workloads from the node.
|
||||
|
||||
.Prerequisites
|
||||
* You have installed a {op-system} compute machine on bare-metal infrastructure for use in the cluster.
|
||||
* You have logged in as a user with `cluster-admin` privileges.
|
||||
* You have configured the host to be managed and have added BMC credentials for the cluster host.
|
||||
You can add BMC credentials by applying a `Secret` custom resource (CR) in the cluster or by logging in to the web console and configuring the bare-metal host to be managed.
|
||||
|
||||
.Procedure
|
||||
. In the web console, mark the node that you want to power off as unschedulable. Perform the following steps:
|
||||
|
||||
.. Navigate to *Nodes* and select the node that you want to power off. Expand the *Actions* menu and select *Mark as unschedulable*.
|
||||
|
||||
.. Manually delete or relocate running pods on the node by adjusting the pod deployments or scaling down workloads on the node to zero.
|
||||
Wait for the drain process to complete.
|
||||
|
||||
.. Navigate to *Compute* -> *Bare Metal Hosts*.
|
||||
|
||||
.. Expand the *Options menu* for the bare-metal host that you want to power off, and select *Power Off*.
|
||||
Select *Immediate power off*.
|
||||
|
||||
. Alternatively, you can patch the `BareMetalHost` resource for the host that you want to power off by using `oc`.
|
||||
|
||||
.. Get the name of the managed bare-metal host.
|
||||
Run the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc get baremetalhosts -n openshift-machine-api -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.provisioning.state}{"\n"}{end}'
|
||||
----
|
||||
+
|
||||
.Example output
|
||||
[source,terminal]
|
||||
----
|
||||
master-0.example.com managed
|
||||
master-1.example.com managed
|
||||
master-2.example.com managed
|
||||
worker-0.example.com managed
|
||||
worker-1.example.com managed
|
||||
worker-2.example.com managed
|
||||
----
|
||||
|
||||
.. Mark the node as unschedulable:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc adm cordon <bare_metal_host> <1>
|
||||
----
|
||||
<1> `<bare_metal_host>` is the host that you want to shut down, for example, `worker-2.example.com`.
|
||||
|
||||
.. Drain all pods on the node:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc adm drain <bare_metal_host> --force=true
|
||||
----
|
||||
+
|
||||
Pods that are backed by replication controllers are rescheduled to other available nodes in the cluster.
|
||||
|
||||
.. Safely power off the bare-metal host.
|
||||
Run the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc patch <bare_metal_host> --type json -p '[{"op": "replace", "path": "/spec/online", "value": false}]'
|
||||
----
|
||||
|
||||
.. After you power on the host, make the node schedulable for workloads.
|
||||
Run the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc adm uncordon <bare_metal_host>
|
||||
----
|
||||
@@ -42,4 +42,4 @@ When you use a `BareMetalHost` object to create a machine in the cluster and lab
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc annotate machineset <machineset> -n openshift-machine-api 'baremetalhost.metal3.io/detached-'
|
||||
----
|
||||
----
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="managing-bare-metal-hosts"]
|
||||
= Managing bare metal hosts
|
||||
= Managing bare-metal hosts
|
||||
include::_attributes/common-attributes.adoc[]
|
||||
:context: managing-bare-metal-hosts
|
||||
|
||||
toc::[]
|
||||
|
||||
When you install {product-title} on a bare metal cluster, you can provision and manage bare metal nodes using `machine` and `machineset` custom resources (CRs) for bare metal hosts that exist in the cluster.
|
||||
When you install {product-title} on a bare-metal cluster, you can provision and manage bare-metal nodes by using `machine` and `machineset` custom resources (CRs) for bare-metal hosts that exist in the cluster.
|
||||
|
||||
include::modules/about-bare-metal-hosts-and-nodes.adoc[leveloffset=+1]
|
||||
include::modules/maintaining-bare-metal-hosts.adoc[leveloffset=+1]
|
||||
@@ -26,3 +26,5 @@ include::modules/removing-bare-metal-hosts-from-provisioner.adoc[leveloffset=+2]
|
||||
|
||||
* xref:../installing/installing_bare_metal/ipi/ipi-install-expanding-the-cluster.adoc#ipi-install-expanding-the-cluster[Expanding the cluster]
|
||||
* xref:../machine_management/deploying-machine-health-checks.adoc#machine-health-checks-bare-metal_deploying-machine-health-checks[MachineHealthChecks on bare metal]
|
||||
|
||||
include::modules/powering-off-bare-metal-hosts-web-console.adoc[leveloffset=+2]
|
||||
|
||||
Reference in New Issue
Block a user