7.4. 在集群中置备新主机时诊断重复的 MAC 地址
如果集群中现有裸机节点的 MAC 地址与您试图添加到集群的裸机主机的 MAC 地址匹配,Bare Metal Operator 将主机与现有节点关联。如果主机注册、检查、清理或其他 Ironic 步骤失败,Bare Metal Operator 会持续重试安装。失败的裸机主机会显示注册错误。
您可以通过检查在 openshift-machine-api 命名空间中运行的裸机主机来诊断重复的 MAC 地址。
先决条件
- 在裸机上安装 OpenShift Container Platform 集群。
-
安装 OpenShift Container Platform CLI
oc。 -
以具有
cluster-admin权限的用户身份登录。
流程
要确定置备失败的裸机主机是否具有与现有节点相同的 MAC 地址,请执行以下操作:
获取在
openshift-machine-api命名空间中运行的裸机主机:$ oc get bmh -n openshift-machine-api输出示例
NAME STATUS PROVISIONING STATUS CONSUMER openshift-master-0 OK externally provisioned openshift-zpwpq-master-0 openshift-master-1 OK externally provisioned openshift-zpwpq-master-1 openshift-master-2 OK externally provisioned openshift-zpwpq-master-2 openshift-worker-0 OK provisioned openshift-zpwpq-worker-0-lv84n openshift-worker-1 OK provisioned openshift-zpwpq-worker-0-zd8lm openshift-worker-2 error registering要查看失败主机状态的更多详细信息,请运行以下命令将
<bare_metal_host_name>替换为主机名称:$ oc get -n openshift-machine-api bmh <bare_metal_host_name> -o yaml输出示例
... status: errorCount: 12 errorMessage: MAC address b4:96:91:1d:7c:20 conflicts with existing node openshift-worker-1 errorType: registration error ...