检查主机设置
创建满足 系统需求,网络需求 和 出站连接需求 的主机后,可以通过运行以下 sat-host-check
脚本来验证主机设置。
-
登录到主机。
ssh root@<IP_address>
- 对于 RHEL 主机,SSH 作为 root 用户。
ssh root@<IP_address>
- 对于 RHCOS 主机,将公用 SSH 密钥复制到点火脚本并以核心身份登录。
-
下载主机连接脚本并添加公用 SSH 密钥。
{ "ignition": { "version": "3.1.0" }, "passwd": { "users": [ { "name": "core", "sshAuthorizedKeys": [ "PUBLIC-SSH-KEY" ] } ] }, ... }
-
以
core
身份登录到主机。ssh core@<IP_address>
-
- 对于 RHEL 主机,SSH 作为 root 用户。
-
下载脚本并使其可执行。
curl https://origin.<region>.containers.cloud.ibm.com/satellite-health/sat-host-check -o sat-host-check && chmod +x sat-host-check
us-south
的示例命令。curl https://origin.us-south.containers.cloud.ibm.com/satellite-health/sat-host-check -o sat-host-check && chmod +x sat-host-check
-
运行脚本并指定您在其中创建位置的区域。
sudo ./sat-host-check --region $REGION
us-south
的示例命令。sudo ./sat-host-check --region us-south
用于在
us-south
中检查主机的示例输出。=========================== TEST PHASE: redhatOS =========================== PASS: custom Grub configuration (/boot/grub/grub.conf) not present PASS: custom Network configuration (/sbin/ifup-local) not present PASS: custom Network configuration (/sbin/ifdown-pre-local) not present PASS: custom Network configuration (/sbin/ifdown-local) not present PASS: custom NTP configuration (/etc/ntp.conf) not present === subscription-manager === STDOUT: Usage: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help] PASS: subscription-manager configured === yum info rh-python36 === ... =========================== TEST PHASE: network =========================== === ip addr === ... FAIL: wrong number of network interfaces (expected 2, found: 3: [1: lo, 2: eth0, 3: eth1]) === ip route === ... info: no checks performed on 'ip route' output === Check connectivity to google.com:80 === PASS: got response back from google.com:80 === Check connectivity to our region us-south === === Check connectivity to hosted control plane === === Check connectivity to 169.63.123.154:30000 === PASS: got response back from 169.63.123.154:30000 === Check connectivity to 169.60.123.162:30000 === PASS: got response back from 169.60.123.162:30000 === Check connectivity to 52.117.93.26:30000 === PASS: got response back from 52.117.93.26:30000 === Check connectivity to 52.117.88.42:30000 === PASS: got response back from 52.117.88.42:30000 === Check connectivity to 169.47.174.106:30000 === PASS: got response back from 169.47.174.106:30000 === Check connectivity to 169.60.92.50:30000 === PASS: got response back from 169.60.92.50:30000 === Check connectivity to 169.61.74.210:30000 === PASS: got response back from 169.61.74.210:30000 === Check connectivity to 169.62.9.250:30000 === PASS: got response back from 169.62.9.250:30000 === Check connectivity to 169.62.10.162:30000 === PASS: got response back from 169.62.10.162:30000 === Check 443 ports === === Check connectivity to 169.60.73.142:443 === PASS: got response back from 169.60.73.142:443 === Check connectivity to 169.60.101.42:443 === PASS: got response back from 169.60.101.42:443 === Check connectivity to 169.61.83.62:443 === PASS: got response back from 169.61.83.62:443 === Check connectivity to 169.61.109.34:443 === PASS: got response back from 169.61.109.34:443 === Check connectivity to 169.62.10.162:443 === FAIL: Could not create request: dial tcp 169.62.10.162:443: connect: connection refused === Check connectivity to 169.63.75.82:443 === FAIL: Could not create request: dial tcp 169.63.75.82:443: connect: connection refused === Check connectivity to 169.63.88.178:443 === PASS: got response back from 169.63.88.178:443 === Check connectivity to 169.63.88.186:443 === PASS: got response back from 169.63.88.186:443 === Check connectivity to 169.63.94.210:443 === FAIL: Could not create request: dial tcp 169.63.94.210:443: connect: connection refused === Check connectivity to 169.63.111.82:443 === FAIL: Could not create request: dial tcp 169.63.111.82:443: connect: connection refused === Check connectivity to 169.63.149.122:443 === FAIL: Could not create request: dial tcp 169.63.149.122:443: connect: connection refused === Check connectivity to 169.63.158.82:443 === FAIL: Could not create request: dial tcp 169.63.158.82:443: connect: connection refused === Check connectivity to 169.63.160.130:443 === FAIL: Could not create request: dial tcp 169.63.160.130:443: connect: connection refused === Check connectivity to link control plane === === Test Failure Summary: === redhatOS - error checking RHN configuration with `subscription-manager`: exit status 1 network - wrong number of network interfaces (expected 2, found: 3: [1: lo, 2: eth0, 3: eth1]) network - Could not create request: dial tcp 169.62.10.162:443: connect: connection refused network - Could not create request: dial tcp 169.63.75.82:443: connect: connection refused network - Could not create request: dial tcp 169.63.94.210:443: connect: connection refused network - Could not create request: dial tcp 169.63.111.82:443: connect: connection refused network - Could not create request: dial tcp 169.63.149.122:443: connect: connection refused network - Could not create request: dial tcp 169.63.158.82:443: connect: connection refused network - Could not create request: dial tcp 169.63.160.130:443: connect: connection refused cleaned up temp dir: `/tmp/sathostcheck-3139302841`
-
查看测试失败摘要。 根据故障,查看需求并更新主机。
-
如果主机检查成功,那么可以继续将主机连接到您的位置。