我想测试 DC/OS 的社区版本,但无法让它完成飞行前的 50% 以上的进度:
我按照 GUI 说明进行操作这里并以详细模式开始安装。这是最后一个非“GET preflight”输出:
Using async_delegate with callback
executing command ['/usr/bin/ssh', '-oConnectTimeout=10', '-oStrictHostKeyChecking=no', '-oUserKnownHostsFile=/dev/null', '-oBatchMode=yes', '-oPasswordAuthentication=no', '-p22', '-i', '/genconf/ssh_key', '-tt', '[email protected]', '\n#/bin/sh\n# setenforce is in this path\nPATH=$PATH:/sbin\n\ndist=$(cat /etc/*-release | sed -n \'s@^ID="\\(.*\\)"$@\\1@p\')\n\nif ([ x$dist != \'xrhel\' ] && [ x$dist != \'xcentos\' ]); then\n echo "$dist is not supported. Only RHEL and CentOS are supported" >&2\n exit 0\nfi\n\nversion=$(cat /etc/*-release | sed -n \'s@^VERSION_ID="\\(.*\\)"$@\\1@p\')\nif [ $version -lt 7 ]; then\n echo "$version is not supported. Only >= 7 version is supported" >&2\n exit 0\nfi\n\nsudo setenforce 0 && sudo sed -i \'s/^SELINUX=.*/SELINUX=disabled/g\' /etc/sysconfig/selinux\n\nsudo tee /etc/yum.repos.d/docker.repo <<-\'EOF\'\n[dockerrepo]\nname=Docker Repository\nbaseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/\nenabled=1\ngpgcheck=1\ngpgkey=https://yum.dockerproject.org/gpg\nEOF\n\nsudo yum -y update\n\nsudo mkdir -p /etc/systemd/system/docker.service.d\nsudo tee /etc/systemd/system/docker.service.d/override.conf <<- EOF\n[Service]\nExecStart=\nExecStart=/usr/bin/docker daemon --storage-driver=overlay -H fd://\nEOF\n\nsudo yum install -y docker-engine\nsudo systemctl start docker\nsudo systemctl enable docker\n\nsudo yum install -y wget\nsudo yum install -y git\nsudo yum install -y unzip\nsudo yum install -y curl\nsudo yum install -y xz\nsudo yum install -y ipset\n\nsudo getent group nogroup || sudo groupadd nogroup\n']
GET preflight
GET preflight
GET preflight
GET preflight
GET preflight
GET preflight
我还从 GUI 下载了包含以下内容的日志:
[
{
"chain_name": "preflight",
"hosts": {
"192.168.0.16:22": {
"commands": [
{
"cmd": [
"/usr/bin/ssh",
"-oConnectTimeout=10",
"-oStrictHostKeyChecking=no",
"-oUserKnownHostsFile=/dev/null",
"-oBatchMode=yes",
"-oPasswordAuthentication=no",
"-p22",
"-i",
"/genconf/ssh_key",
"-tt",
"[email protected]",
"echo",
"INSTALL",
"PREREQUISITES"
],
"date": "2016-09-06 13:27:40.570649",
"pid": 20,
"returncode": 0,
"stderr": [
"",
"Connection to 192.168.0.16 closed.",
"",
""
],
"stdout": [
"INSTALL PREREQUISITES\r",
""
]
}
],
"host_status": "running",
"tags": {
"role": "master"
}
},
"192.168.0.17:22": {
"commands": [
{
"cmd": [
"/usr/bin/ssh",
"-oConnectTimeout=10",
"-oStrictHostKeyChecking=no",
"-oUserKnownHostsFile=/dev/null",
"-oBatchMode=yes",
"-oPasswordAuthentication=no",
"-p22",
"-i",
"/genconf/ssh_key",
"-tt",
"[email protected]",
"echo",
"INSTALL",
"PREREQUISITES"
],
"date": "2016-09-06 13:27:40.553732",
"pid": 21,
"returncode": 0,
"stderr": [
"",
"Connection to 192.168.0.17 closed.",
"",
""
],
"stdout": [
"INSTALL PREREQUISITES\r",
""
]
}
],
"host_status": "running",
"tags": {
"role": "agent"
}
},
"192.168.0.18:22": {
"commands": [
{
"cmd": [
"/usr/bin/ssh",
"-oConnectTimeout=10",
"-oStrictHostKeyChecking=no",
"-oUserKnownHostsFile=/dev/null",
"-oBatchMode=yes",
"-oPasswordAuthentication=no",
"-p22",
"-i",
"/genconf/ssh_key",
"-tt",
"[email protected]",
"echo",
"INSTALL",
"PREREQUISITES"
],
"date": "2016-09-06 13:27:40.521035",
"pid": 22,
"returncode": 0,
"stderr": [
"",
"Connection to 192.168.0.18 closed.",
"",
""
],
"stdout": [
"INSTALL PREREQUISITES\r",
""
]
}
],
"host_status": "running",
"tags": {
"role": "agent"
}
}
},
"total_agents": 2,
"total_hosts": 3,
"total_masters": 1
}
]
引导机器是我的计算机,主/代理是在我的计算机上运行的 CentOS 7 KVM 机器。我还确保 SSH 密钥无需密码即可工作。我需要做什么才能使设置顺利进行?
答案1
最好始终使用高级安装程序,它不依赖于引导节点上的 SSH 密钥,因为这可能会引起此类问题。
答案2
安装程序处于挂起install prereqs
状态。此阶段可能需要很长时间,具体取决于从运行的计算机到更大的互联网的网络连接以及主机性能。
此阶段安装必备软件包(在 CentOS 上使用 yum),安装和配置 Docker,以及确保主机处于 DC/OS 的最小可安装状态。
退出之前您运行了多长时间?
另外,当安装阶段开始时,进度条计为该主机的 50%,当主机完成安装时,进度条达到 100%。由于安装程序运行并行 SSH 会话(默认值为 30,但可以使用参数在配置 yaml 中设置parallelism
),它会同时执行两个主机,并且两个主机都没有完成,因此显示完成率为 50%。