OSDOCS#17761: node replacement procedure updates#106129
Conversation
|
@skopacz1: This pull request references OSDOCS-17761 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@skopacz1: No Jira issue is referenced in the title of this pull request. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
🤖 Fri Apr 03 17:12:27 - Prow CI generated the docs preview: |
|
/retest |
| + | ||
| [NOTE] | ||
| ==== | ||
| The name of the new node might be different than the name of the node you are replacing. |
There was a problem hiding this comment.
🤖 [error] RedHat.TermsErrors: Use 'different from' rather than 'different than'. For more information, see RedHat.TermsErrors.
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ coreos-installer iso customize rhcos-live.86_64.iso \ |
There was a problem hiding this comment.
Need to let the user know where to download rhcos-live-iso.x86_64.iso file, https://console.redhat.com/openshift/install/metal/user-provisioned
The file name should be rhcos-live-iso.x86_64.iso
The link to download arm iso is in a different link: https://console.redhat.com/openshift/install/arm/user-provisioned
| . Create a `Machine` object for the new control plane node by creating a yaml file similar to the following: | ||
| . Create a `Machine` object for the new control plane node: | ||
|
|
||
| .. Create a YAML file similar to the following: |
There was a problem hiding this comment.
How about use a specified name like new-machine.yaml
| .. Create a YAML file similar to the following: | |
| .. Create a YAML file named new-machine.yaml similar to the following: |
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc apply -f <machine_object_yaml_file> |
There was a problem hiding this comment.
| $ oc apply -f <machine_object_yaml_file> | |
| $ oc apply -f new-machine.yaml |
| .. Define the `NEW_NODE_NAME` variable by running the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ NEW_NODE_NAME=<new_node_name> | ||
| ---- | ||
| + | ||
| Replace `<new_node_name>` with the name of the new control plane node. | ||
| + | ||
| [NOTE] | ||
| ==== | ||
| The name of the new node might be different from the name of the node you are replacing. | ||
| You can check the name of the new node by running the following command: | ||
|
|
||
| [source,terminal] | ||
| ---- | ||
| $ oc get nodes | ||
| ---- | ||
| ==== |
There was a problem hiding this comment.
These 2 names is not the same one, how about we create 2 parameters to handle this?
| ==== | |
| Define the `NEW_NODE_NAME` variable by the following steps: | |
| Get the new node name by: | |
| $ oc get nodes | |
| $ NEW_NODE_NAME=<new_node_name> | |
| ---- | |
| .. Define the `NEW_BAREMETLHOST_NAME` variable by the following steps: | |
| Get the new BareMetalHost name by: | |
| $ oc get -n openshift-machine-api bmh | |
| $ NEW_BAREMETLHOST_NAME=<new_baremetalhost_name> | |
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ BMH_UID=$(oc get -n openshift-machine-api bmh $NEW_NODE_NAME -ojson | jq -r .metadata.uid) |
There was a problem hiding this comment.
| $ BMH_UID=$(oc get -n openshift-machine-api bmh $NEW_BAREMETLHOST_NAME -ojson | jq -r .metadata.uid) |
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc patch -n openshift-machine-api bmh $NEW_NODE_NAME --type merge --patch '{"spec":{"consumerRef":{"apiVersion":"machine.openshift.io/v1beta1","kind":"Machine","name":"'$NEW_MACHINE_NAME'","namespace":"openshift-machine-api"}}}' |
There was a problem hiding this comment.
| $ oc patch -n openshift-machine-api bmh $NEW_BAREMETLHOST_NAME --type merge --patch '{"spec":{"consumerRef":{"apiVersion":"machine.openshift.io/v1beta1","kind":"Machine","name":"'$NEW_MACHINE_NAME'","namespace":"openshift-machine-api"}}}' |
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc patch node $NEW_NODE_NAME --type merge --patch '{"spec":{"providerID":"baremetalhost:///openshift-machine-api/'$NEW_NODE_NAME'/'$BMH_UID'"}}' |
There was a problem hiding this comment.
| $ oc patch node $NEW_NODE_NAME --type merge --patch '{"spec":{"providerID":"baremetalhost:///openshift-machine-api/'$NEW_BAREMETLHOST_NAME'/'$BMH_UID'"}}' |
| examplecluster-control-plane-1 Running 3h11m openshift-control-plane-1 baremetalhost:///openshift-machine-api/openshift-control-plane-1/d9f9acbc-329c-475e-8d81-03b20280a3e1 externally provisioned | ||
| examplecluster-control-plane-2 Running 3h11m openshift-control-plane-2 baremetalhost:///openshift-machine-api/openshift-control-plane-2/3354bdac-61d8-410f-be5b-6a395b056135 externally provisioned | ||
| examplecluster-control-plane-2 Failed 3h11m openshift-control-plane-2 baremetalhost:///openshift-machine-api/openshift-control-plane-2/3354bdac-61d8-410f-be5b-6a395b056135 externally provisioned | ||
| examplecluster-compute-0 Running 165m openshift-compute-0 baremetalhost:///openshift-machine-api/openshift-compute-0/3d685b81-7410-4bb3-80ec-13a31858241f provisioned |
There was a problem hiding this comment.
How about removing these 2 workers node, in order to make the consistent in the whole doc? The node name should be consistent too in every place output.
There was a problem hiding this comment.
Okay, I removed references to the worker nodes from this doc.
Also, I checked to make sure the other node names were consistent throughout the doc, but I am not as familiar with how node names, machine names, etcd names, and so forth map to each other. Please let me know if I need to change any other names.
There was a problem hiding this comment.
I think we can keep it simple, make the node, bmh name to be: master-00/01/02 or control-plane-0/1/2
Machine name to be: examplecluster-master-00/01/02 or examplecluster-control-plane-0/1/2
Although the node name and bmh name can be the same here, but they are different, after replaced master-02 node added back again, the node name can be changed, it is not what we can control, so we need to run oc get nodes to check what the node name is after replacement steps to define $NEW_NODE_NAME to link BareMetalHost object
For another object BareMetalHost, we can both use $NEW_BAREMETALHOST_NAME or $NEW_BMH_NAME to define.
|
@skopacz1: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
The This is because your PR targets the If the update in your PR does NOT apply to version 5.0 onward, please re-target this PR to go directly into the appropriate |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
OSDOCS-17761
Version(s): 4.19+
This PR updates the existing procedure for replacing unhealthy control plane nodes
QE review:
Preview: Replacing a failed bare-metal control plane node without BMC credentials