Skip to content

Commit be08083

Browse files
committed
Correcting issues with the procedure when expanding the bm cluster
1 parent 5b7f161 commit be08083

File tree

2 files changed

+43
-41
lines changed

2 files changed

+43
-41
lines changed

installing/installing_bare_metal_ipi/ipi-install-expanding-the-cluster.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ include::modules/ipi-install-replacing-a-bare-metal-control-plane-node.adoc[leve
3131
3232
* xref:../../backup_and_restore/control_plane_backup_and_restore/backing-up-etcd.adoc#backing-up-etcd-data_backup-etcd[Backing up etcd]
3333
34-
* xref:../../post_installation_configuration/bare-metal-configuration.adoc#post-install-bare-metal-configuration[Bare metal configuration]
34+
* xref:../../post_installation_configuration/bare-metal-configuration.adoc#post-install-bare-metal-configuration[Bare metal configuration]
35+
36+
* xref:../installing_bare_metal_ipi/ipi-install-installation-workflow.adoc#bmc-addressing_ipi-install-installation-workflow[BMC addressing]
3537
3638
include::modules/ipi-install-preparing-to-deploy-with-virtual-media-on-the-baremetal-network.adoc[leveloffset=+1]
3739

modules/ipi-install-replacing-a-bare-metal-control-plane-node.adoc

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,13 @@ baremetal 4.10.12 True False False 3d15h
4646
+
4747
[source,terminal]
4848
----
49-
$ oc delete bmh -n openshift-machine-api vmaster-0
50-
$ oc delete machine -n openshift-machine-api kni1-master-0
49+
$ oc delete bmh -n openshift-machine-api <host_name>
50+
$ oc delete machine -n openshift-machine-api <machine_name>
5151
----
52+
+
53+
Replace `<host_name>` with the name of the host and `<machine_name>` with the name of the machine. The machine name appears under the `CONSUMER` field.
5254
+
53-
After you remove the `BareMetalHost` and `Machine` objects, then the `Machine` controller automatically deletes the `Node` object.
55+
After you remove the `BareMetalHost` and `Machine` objects, then the machine controller automatically deletes the `Node` object.
5456

5557
. Create the new `BareMetalHost` object and the secret to store the BMC credentials:
5658
+
@@ -60,30 +62,35 @@ $ cat <<EOF | oc apply -f -
6062
apiVersion: v1
6163
kind: Secret
6264
metadata:
63-
name: kni1-master-0-bmc-secret
65+
name: control-plane-<num>-bmc-secret <1>
6466
namespace: openshift-machine-api
6567
data:
66-
password: <username>
67-
username: <password>
68+
password: <base64_of_uid> <2>
69+
username: <base64_of_pwd> <3>
6870
type: Opaque
6971
---
7072
apiVersion: metal3.io/v1alpha1
7173
kind: BareMetalHost
7274
metadata:
73-
name: kni1-master-0
75+
name: control-plane-<num> <1>
7476
namespace: openshift-machine-api
7577
spec:
7678
automatedCleaningMode: disabled
7779
bmc:
78-
address: redfish-virtualmedia+http://192.168.124.113:8000/redfish/v1/Systems/f87eaf82-b32d-4291-ace6-b28677964e78
79-
credentialsName: kni1-master-0-bmc-secret
80-
bootMACAddress: aa:aa:aa:aa:ab:03
80+
address: <protocol>://<bmc_ip> <4>
81+
credentialsName: control-plane-<num>-bmc-secret <1>
82+
bootMACAddress: <NIC1_mac_address> <5>
8183
bootMode: UEFI
8284
externallyProvisioned: false
8385
hardwareProfile: unknown
8486
online: true
8587
EOF
8688
----
89+
<1> Replace `<num>` for the control plane number of the bare metal node in the `name` fields and the `credentialsName` field.
90+
<2> Replace `<base64_of_uid>` with the `base64` string of the user name.
91+
<3> Replace `<base64_of_pwd>` with the `base64` string of the password.
92+
<4> Replace `<protocol>` with the BMC protocol, such as `redfish`, `redfish-virtualmedia`, `idrac-virtualmedia`, or others. Replace `<bmc_ip>` with the IP address of the bare metal node's baseboard management controller. For additional BMC configuration options, see "BMC addressing" in the _Additional resources_ section.
93+
<5> Replace `<NIC1_mac_address>` with the MAC address of the bare metal node's first NIC.
8794
+
8895
After the inspection is complete, the `BareMetalHost` object is created and available to be provisioned.
8996

@@ -97,12 +104,12 @@ $ oc get bmh -n openshift-machine-api
97104
.Example output
98105
[source,terminal]
99106
----
100-
NAME STATE CONSUMER ONLINE ERROR AGE
101-
kni1-master-0 available ocp-hkw9p-master-0 true 1h10m
102-
kni1-master-1 externally provisioned ocp-hkw9p-master-1 true 4h53m
103-
kni1-master-2 externally provisioned ocp-hkw9p-master-2 true 4h53m
104-
kni1-worker-0 provisioned ocp-hkw9p-worker-0-ktmmx true 4h53m
105-
kni1-worker-1 provisioned ocp-hkw9p-worker-0-l2zmb true 4h53m
107+
NAME STATE CONSUMER ONLINE ERROR AGE
108+
control-plane-1.example.com available control-plane-1 true 1h10m
109+
control-plane-2.example.com externally provisioned control-plane-2 true 4h53m
110+
control-plane-3.example.com externally provisioned control-plane-3 true 4h53m
111+
compute-1.example.com provisioned compute-1-ktmmx true 4h53m
112+
compute-1.example.com provisioned compute-2-l2zmb true 4h53m
106113
----
107114
+
108115
There are no `MachineSet` objects for control plane nodes, so you must create a `Machine` object instead. You can copy the `providerSpec` from another control plane `Machine` object.
@@ -116,12 +123,12 @@ apiVersion: machine.openshift.io/v1beta1
116123
kind: Machine
117124
metadata:
118125
annotations:
119-
metal3.io/BareMetalHost: openshift-machine-api/kni1-master-0
126+
metal3.io/BareMetalHost: openshift-machine-api/control-plane-<num> <1>
120127
labels:
121-
machine.openshift.io/cluster-api-cluster: kni1
128+
machine.openshift.io/cluster-api-cluster: control-plane-<num> <1>
122129
machine.openshift.io/cluster-api-machine-role: master
123130
machine.openshift.io/cluster-api-machine-type: master
124-
name: kni1-master-0
131+
name: control-plane-<num> <1>
125132
namespace: openshift-machine-api
126133
spec:
127134
metadata: {}
@@ -141,15 +148,7 @@ spec:
141148
name: master-user-data-managed
142149
EOF
143150
----
144-
+
145-
. To define and create the `BareMetalHost`, `Secret`, and `Machine` objects in a single step, create a YAML file (`example.yaml`) with their definitions and run the following command:
146-
+
147-
[source,terminal]
148-
----
149-
$ oc create -f example.yaml
150-
----
151-
+
152-
The provisioning process uses the baremetal-operator to install RHCOS and prepare the host to be added to the cluster.
151+
<1> Replace `<num>` for the control plane number of the bare metal node in the `name`, `labels` and `annotations` fields.
153152
+
154153
. To view the `BareMetalHost` objects, run the following command:
155154
+
@@ -161,12 +160,12 @@ $ oc get bmh -A
161160
.Example output
162161
[source,terminal]
163162
----
164-
NAME STATE CONSUMER ONLINE ERROR AGE
165-
kni1-master-0 provisioned ocp-hkw9p-master-0 true 2h53m
166-
kni1-master-1 externally provisioned ocp-hkw9p-master-1 true 5h53m
167-
kni1-master-2 externally provisioned ocp-hkw9p-master-2 true 5h53m
168-
kni1-worker-0 provisioned ocp-hkw9p-worker-0-ktmmx true 5h53m
169-
kni1-worker-1 provisioned ocp-hkw9p-worker-0-l2zmb true 5h53m
163+
NAME STATE CONSUMER ONLINE ERROR AGE
164+
control-plane-1.example.com provisioned control-plane-1 true 2h53m
165+
control-plane-2.example.com externally provisioned control-plane-2 true 5h53m
166+
control-plane-3.example.com externally provisioned control-plane-3 true 5h53m
167+
compute-1.example.com provisioned compute-1-ktmmx true 5h53m
168+
compute-2.example.com provisioned compute-2-l2zmb true 5h53m
170169
----
171170
+
172171
. After the RHCOS installation, verify that the `BareMetalHost` is added to the cluster:
@@ -179,14 +178,15 @@ $ oc get nodes
179178
.Example output
180179
[source,terminal]
181180
----
182-
NAME STATUS ROLES AGE VERSION
183-
kni1-master-0 available master 4m2s v1.18.2
184-
kni1-master-1 available master 141m v1.18.2
185-
kni1-master-2 available master 141m v1.18.2
186-
kni1-worker-0 available worker 87m v1.18.2
181+
NAME STATUS ROLES AGE VERSION
182+
control-plane-1.example.com available master 4m2s v1.18.2
183+
control-plane-2.example.com available master 141m v1.18.2
184+
control-plane-3.example.com available master 141m v1.18.2
185+
compute-1.example.com available worker 87m v1.18.2
186+
compute-2.example.com available worker 87m v1.18.2
187187
----
188188
+
189189
[NOTE]
190190
====
191-
After replacement of the new control plane node, the etcd pod running in the new node is in `crashloopback` status. See "Replacing an unhealthy etcd member" for more information.
191+
After replacement of the new control plane node, the etcd pod running in the new node is in `crashloopback` status. See "Replacing an unhealthy etcd member" in the _Additional resources_ section for more information.
192192
====

0 commit comments

Comments
 (0)