TASK [Gathering Facts] ***
[DEPRECATION WARNING]: Distribution Ubuntu 16.04 on host node3 should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release
will default to using the discovered platform python for this host. See https://docs.ansible.com/ansible/2.10/reference_appendices/interpreter_discovery.html for more information. This feature will be
removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
ok: [node3]
[DEPRECATION WARNING]: Distribution Ubuntu 16.04 on host node4 should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release
will default to using the discovered platform python for this host. See https://docs.ansible.com/ansible/2.10/reference_appendices/interpreter_discovery.html for more information. This feature will be
removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
ok: [node4]
[DEPRECATION WARNING]: Distribution Ubuntu 16.04 on host node2 should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release
will default to using the discovered platform python for this host. See https://docs.ansible.com/ansible/2.10/reference_appendices/interpreter_discovery.html for more information. This feature will be
removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
ok: [node2]
[DEPRECATION WARNING]: Distribution Ubuntu 16.04 on host node1 should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release
will default to using the discovered platform python for this host. See https://docs.ansible.com/ansible/2.10/reference_appendices/interpreter_discovery.html for more information. This feature will be
removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
ok: [node1]
缺陷描述
清晰而简明的描述缺陷是什么。
环境 (请填写以下信息): ubuntu16.04.12
执行下面括号中的命令,提交返回结果
OS (
printf "$(uname -srm)\n$(cat /etc/os-release)\n"
): Linux 4.15.0-45-generic x86_64 NAME="Ubuntu" VERSION="16.04.6 LTS (Xenial Xerus)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 16.04.6 LTS" VERSION_ID="16.04" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" VERSION_CODENAME=xenial UBUNTU_CODENAME=xenialAnsible版本 (
ansible --version
): ansible 2.10.17 config file = /etc/ansible/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.9/dist-packages/ansible executable location = /usr/local/bin/ansible python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]Python版本 (
python --version
): ha中3.9.2 k8s节点3.5.2Kubeadm-ha版本(commit) (
git rev-parse --short HEAD
): 1869e79如何复现
PLAY [all] ***
TASK [设置代理服务器环境变量] *** ok: [node1] ok: [node3] ok: [node2] ok: [node4]
PLAY [all] ***
TASK [Gathering Facts] *** [DEPRECATION WARNING]: Distribution Ubuntu 16.04 on host node3 should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release will default to using the discovered platform python for this host. See https://docs.ansible.com/ansible/2.10/reference_appendices/interpreter_discovery.html for more information. This feature will be removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ok: [node3] [DEPRECATION WARNING]: Distribution Ubuntu 16.04 on host node4 should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release will default to using the discovered platform python for this host. See https://docs.ansible.com/ansible/2.10/reference_appendices/interpreter_discovery.html for more information. This feature will be removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ok: [node4] [DEPRECATION WARNING]: Distribution Ubuntu 16.04 on host node2 should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release will default to using the discovered platform python for this host. See https://docs.ansible.com/ansible/2.10/reference_appendices/interpreter_discovery.html for more information. This feature will be removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ok: [node2] [DEPRECATION WARNING]: Distribution Ubuntu 16.04 on host node1 should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release will default to using the discovered platform python for this host. See https://docs.ansible.com/ansible/2.10/reference_appendices/interpreter_discovery.html for more information. This feature will be removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ok: [node1]
TASK [prepare/variables : 设置变量] ** ok: [node1] => { "msg": "Check roles/prepare/variables/defaults/main.yml" } ok: [node2] => { "msg": "Check roles/prepare/variables/defaults/main.yml" } ok: [node3] => { "msg": "Check roles/prepare/variables/defaults/main.yml" } ok: [node4] => { "msg": "Check roles/prepare/variables/defaults/main.yml" } included: /etc/ansible/roles/prepare/base/tasks/verify_variables.yml for node1, node2, node3, node4
TASK [prepare/base : 校验 NodeName 是否合法] *** ok: [node1] => { "changed": false, "msg": "All assertions passed" } ok: [node2] => { "changed": false, "msg": "All assertions passed" } ok: [node3] => { "changed": false, "msg": "All assertions passed" } ok: [node4] => { "changed": false, "msg": "All assertions passed" }
TASK [prepare/base : 校验 etcd 节点数量] *** ok: [node1] => { "changed": false, "msg": "All assertions passed" }
TASK [prepare/base : 校验 master 节点数量] ***** ok: [node1] => { "changed": false, "msg": "All assertions passed" }
TASK [prepare/base : 校验 worker 节点数量] ***** ok: [node1] => { "changed": false, "msg": "All assertions passed" }
TASK [prepare/base : 校验 new-etcd 节点组数量] ** ok: [node1] => { "changed": false, "msg": "All assertions passed" } ok: [node2] => { "changed": false, "msg": "All assertions passed" } ok: [node3] => { "changed": false, "msg": "All assertions passed" } ok: [node4] => { "changed": false, "msg": "All assertions passed" }
TASK [prepare/base : 校验 etcd 节点数量] *** ok: [node1] => { "changed": false, "msg": "All assertions passed" }
TASK [prepare/base : 校验 lb 模式类型] ***** ok: [node1] => { "changed": false, "msg": "All assertions passed" }
TASK [prepare/base : 校验 lb 模式端口设置] *** ok: [node1] => { "changed": false, "msg": "All assertions passed" } ok: [node2] => { "changed": false, "msg": "All assertions passed" } ok: [node3] => { "changed": false, "msg": "All assertions passed" }
TASK [prepare/base : 校验 kube-proxy 模式类型] ***** ok: [node1] => { "changed": false, "msg": "All assertions passed" }
TASK [prepare/base : 校验容器运行时类型] ** ok: [node1] => { "changed": false, "msg": "All assertions passed" } included: /etc/ansible/roles/prepare/base/tasks/verify_node.yml for node1, node2, node3, node4
TASK [prepare/base : 校验节点操作系统] *** ok: [node1] => { "changed": false, "msg": "All assertions passed" } ok: [node2] => { "changed": false, "msg": "All assertions passed" } ok: [node3] => { "changed": false, "msg": "All assertions passed" } ok: [node4] => { "changed": false, "msg": "All assertions passed" }
TASK [prepare/base : 校验节点 systemd 类型操作系统] **** ok: [node1] => { "changed": false, "msg": "All assertions passed" } ok: [node2] => { "changed": false, "msg": "All assertions passed" } ok: [node3] => { "changed": false, "msg": "All assertions passed" } ok: [node4] => { "changed": false, "msg": "All assertions passed" }
TASK [prepare/base : 校验节点系统内核] *** ok: [node1] => { "changed": false, "msg": "All assertions passed" } ok: [node2] => { "changed": false, "msg": "All assertions passed" } ok: [node3] => { "changed": false, "msg": "All assertions passed" } ok: [node4] => { "changed": false, "msg": "All assertions passed" }
TASK [prepare/base : 校验节点系统架构] *** ok: [node1] => { "changed": false, "msg": "All assertions passed" } ok: [node2] => { "changed": false, "msg": "All assertions passed" } ok: [node3] => { "changed": false, "msg": "All assertions passed" } ok: [node4] => { "changed": false, "msg": "All assertions passed" }
TASK [prepare/base : 校验节点系统版本] *** ok: [node1] => { "changed": false, "msg": "All assertions passed" } ok: [node2] => { "changed": false, "msg": "All assertions passed" } ok: [node3] => { "changed": false, "msg": "All assertions passed" } ok: [node4] => { "changed": false, "msg": "All assertions passed" }
TASK [prepare/base : 校验 master 节点内存] ***** ok: [node1] => { "changed": false, "msg": "All assertions passed" } ok: [node2] => { "changed": false, "msg": "All assertions passed" } ok: [node3] => { "changed": false, "msg": "All assertions passed" }
TASK [prepare/base : 校验 worker 节点内存] ***** ok: [node1] => { "changed": false, "msg": "All assertions passed" } ok: [node2] => { "changed": false, "msg": "All assertions passed" } ok: [node3] => { "changed": false, "msg": "All assertions passed" } ok: [node4] => { "changed": false, "msg": "All assertions passed" }
TASK [prepare/base : 校验 master 节点CPU核数] ** ok: [node1] => { "changed": false, "msg": "All assertions passed" } ok: [node2] => { "changed": false, "msg": "All assertions passed" } ok: [node3] => { "changed": false, "msg": "All assertions passed" }
TASK [prepare/base : 校验 worker 节点CPU核数] ** ok: [node1] => { "changed": false, "msg": "All assertions passed" } ok: [node2] => { "changed": false, "msg": "All assertions passed" } ok: [node3] => { "changed": false, "msg": "All assertions passed" } ok: [node4] => { "changed": false, "msg": "All assertions passed" } included: /etc/ansible/roles/prepare/base/tasks/common.yml for node1, node2, node3, node4
TASK [prepare/base : 统一时区为 Asia/Shanghai] **** ok: [node2] ok: [node1] ok: [node4] ok: [node3]
TASK [prepare/base : 禁用系统 swap] ** changed: [node1] changed: [node3] changed: [node4] changed: [node2]
TASK [prepare/base : 删除 fstab swap 相关配置] ***** changed: [node3] changed: [node4] changed: [node1] changed: [node2]
TASK [prepare/base : 加载内核模块] ***** changed: [node1] => (item=sunrpc) changed: [node2] => (item=sunrpc) changed: [node4] => (item=sunrpc) changed: [node3] => (item=sunrpc) changed: [node4] => (item=ip_vs) changed: [node1] => (item=ip_vs) changed: [node3] => (item=ip_vs) changed: [node2] => (item=ip_vs) changed: [node4] => (item=ip_vs_rr) changed: [node1] => (item=ip_vs_rr) changed: [node2] => (item=ip_vs_rr) changed: [node3] => (item=ip_vs_rr) changed: [node4] => (item=ip_vs_sh) changed: [node1] => (item=ip_vs_sh) changed: [node2] => (item=ip_vs_sh) changed: [node3] => (item=ip_vs_sh) changed: [node4] => (item=ip_vs_wrr) changed: [node1] => (item=ip_vs_wrr) changed: [node2] => (item=ip_vs_wrr) changed: [node3] => (item=ip_vs_wrr) changed: [node4] => (item=br_netfilter) changed: [node1] => (item=br_netfilter) changed: [node2] => (item=br_netfilter) changed: [node3] => (item=br_netfilter)
TASK [prepare/base : 加载 nf_conntrack_ipv4] *** changed: [node1] changed: [node2] changed: [node3] changed: [node4]
TASK [prepare/base : 设置 systemd-modules-load 配置] ***** changed: [node1] changed: [node2] changed: [node3] changed: [node4]
TASK [prepare/base : 启动/重启 systemd-modules-load] ***** changed: [node4] changed: [node2] changed: [node3] changed: [node1]
TASK [prepare/base : 设置系统参数] ***** changed: [node1] changed: [node2] changed: [node4] changed: [node3]
TASK [prepare/base : 生效系统参数] ***** changed: [node1] changed: [node2] changed: [node3] changed: [node4]
TASK [prepare/base : 优化 nfs clinet 配置] *** changed: [node1] changed: [node3] changed: [node4] changed: [node2]
TASK [prepare/base : 生效 nfs clinet 配置] *** changed: [node1] changed: [node2] changed: [node4] changed: [node3]
TASK [prepare/base : 添加集群节点 hostname 信息到 hosts 文件中] ** changed: [node2] changed: [node3] changed: [node1] changed: [node4]
TASK [prepare/base : 确认 hosts 文件中 localhost ipv4 配置正确] *** changed: [node1] changed: [node3] changed: [node2] changed: [node4]
TASK [prepare/base : 确认 hosts 文件中 localhost ipv6 配置正确] *** changed: [node1] changed: [node3] changed: [node2] changed: [node4]
TASK [prepare/base : 创建 systemd 配置目录] **** changed: [node4] changed: [node2] changed: [node3] changed: [node1]
TASK [prepare/base : 设置系统 ulimits] *** changed: [node1] changed: [node2] changed: [node4] changed: [node3] included: /etc/ansible/roles/prepare/base/tasks/debian.yml for node1, node2, node3, node4
TASK [prepare/base : 判断 ufw 是否安装] **** changed: [node1] changed: [node2] changed: [node3] changed: [node4]
TASK [prepare/base : 禁用防火墙] ** changed: [node1] changed: [node2] changed: [node4] changed: [node3]
TASK [prepare/base : 安装 ubuntu 基础软件] ***** [WARNING]: Updating cache and auto-installing missing dependency: python-apt changed: [node1] changed: [node2] changed: [node4] changed: [node3]
TASK [prepare/base : 重新启动 cron 避免因修改时区而导致的作业错乱问题] **** changed: [node1] changed: [node2] changed: [node3] changed: [node4]
TASK [prepare/container-engine : 判断 Docker 是否早已安装] *** changed: [node2] changed: [node1] changed: [node3] changed: [node4]
TASK [prepare/container-engine : 判断 containerd 是否早已安装] *** changed: [node2] changed: [node3] changed: [node1] changed: [node4] included: /etc/ansible/roles/prepare/container-engine/tasks/containerd/main.yml for node1, node2, node3, node4 included: /etc/ansible/roles/prepare/container-engine/tasks/containerd/debian.yml for node1, node2, node3, node4
TASK [prepare/container-engine : 生成 Docker GPG 公钥] *** changed: [node1] changed: [node2] changed: [node3] changed: [node4]
TASK [prepare/container-engine : 添加 Docker GPG 公钥] *** changed: [node2] changed: [node4] changed: [node1] changed: [node3]
TASK [prepare/container-engine : 添加 Docker apt 仓库] *** fatal: [node1]: FAILED! => {"changed": false, "msg": "Failed to update apt cache: unknown reason"} fatal: [node3]: FAILED! => {"changed": false, "msg": "Failed to update apt cache: unknown reason"} fatal: [node2]: FAILED! => {"changed": false, "msg": "Failed to update apt cache: unknown reason"} fatal: [node4]: FAILED! => {"changed": false, "msg": "Failed to update apt cache: unknown reason"}
NO MORE HOSTS LEFT ***
PLAY RECAP *** node1 : ok=52 changed=23 unreachable=0 failed=1 skipped=17 rescued=0 ignored=0 node2 : ok=45 changed=23 unreachable=0 failed=1 skipped=13 rescued=0 ignored=0 node3 : ok=45 changed=23 unreachable=0 failed=1 skipped=13 rescued=0 ignored=0 node4 : ok=42 changed=23 unreachable=0 failed=1 skipped=16 rescued=0 ignored=0
安装ubuntu基础软件与添加docker GPG公钥有较长等待