kubesphere / kubekey

Install Kubernetes/K3s only, both Kubernetes/K3s and KubeSphere, and related cloud-native add-ons, it supports all-in-one, multi-node, and HA 🔥 ⎈ 🐳
https://kubesphere.io
Apache License 2.0
2.29k stars 540 forks source link

初始化环境时,同步时间无效 #1537

Closed shuqingzai closed 1 year ago

shuqingzai commented 1 year ago

What is version of KubeKey has the issue?

version.BuildInfo{Version:"2.2.1", GitCommit:"c056977c", GitTreeState:"", GoVersion:"go1.17.11"}

What is your os environment?

ubuntu22.04Arm64 server 最小化安装

uname -a
Linux k8s01 5.15.0-48-generic #54-Ubuntu SMP Fri Aug 26 13:31:33 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

KubeKey config file

apiVersion: kubekey.kubesphere.io/v1alpha2
kind: Cluster
metadata:
  name: sample
spec:
  hosts:
  - {name: k8s01, address: 10.211.55.11, internalAddress: 10.211.55.11, user: shuqingzai, password: "sqz123"}
  - {name: k8s02, address: 10.211.55.12, internalAddress: 10.211.55.12, user: shuqingzai, password: "sqz123"}
  - {name: k8s03, address: 10.211.55.13, internalAddress: 10.211.55.13, user: shuqingzai, password: "sqz123"}
  roleGroups:
    etcd:
    - k8s01
    control-plane:
    - k8s01
    worker:
    - k8s02
    - k8s03
  controlPlaneEndpoint:
    ## Internal loadbalancer for apiservers
    # internalLoadbalancer: haproxy

    domain: lb.kubesphere.local
    address: ""
    port: 6443
  system:
    ntpServers: #  The ntp servers of chrony.
      - time1.cloud.tencent.com
      - ntp.aliyun.com
      - k8s01 # Set the node name in `hosts` as ntp server if no public ntp servers access.
    timezone: "Asia/Shanghai"
    rpms: # Specify additional packages to be installed. The ISO file which is contained in the artifact is required.
      - nfs-utils
    debs: # Specify additional packages to be installed. The ISO file which is contained in the artifact is required.
      - nfs-common
  kubernetes:
    version: v1.24.1
    clusterName: cluster.local
    autoRenewCerts: true
    containerManager: containerd
  etcd:
    type: kubekey
  network:
    plugin: calico
    kubePodsCIDR: 10.233.64.0/18
    kubeServiceCIDR: 10.233.0.0/18
    ## multus support. https://github.com/k8snetworkplumbingwg/multus-cni
    multusCNI:
      enabled: false
  registry:
    privateRegistry: ""
    namespaceOverride: ""
    registryMirrors: []
    insecureRegistries: []
  addons:
  - name: nfs-client
    namespace: kube-system
    sources:
      chart:
        name: nfs-client-provisioner
        repo: https://charts.kubesphere.io/main
        valuesFile: /mycluster/nfs/custom-nfs-client-values.yaml  # or https://raw.githubusercontent.com/kubesphere/helm-charts/master/src/main/nfs-client-provisioner/values.yaml
        # values also supports parameter lists
        values:
         - storageClass.defaultClass=true
         - nfs.server=10.211.55.11
         - nfs.path=/mnt/kubesphere

---
apiVersion: installer.kubesphere.io/v1alpha1
kind: ClusterConfiguration
metadata:
  name: ks-installer
  namespace: kubesphere-system
  labels:
    version: v3.3.0
spec:
  persistence:
    storageClass: ""
  authentication:
    jwtSecret: ""
  zone: ""
  local_registry: ""
  namespace_override: ""
  # dev_tag: ""
  etcd:
    monitoring: false
    endpointIps: localhost
    port: 2379
    tlsEnable: true
  common:
    core:
      console:
        enableMultiLogin: true
        port: 30880
        type: NodePort
    # apiserver:
    #  resources: {}
    # controllerManager:
    #  resources: {}
    redis:
      enabled: false
      volumeSize: 2Gi
    openldap:
      enabled: false
      volumeSize: 2Gi
    minio:
      volumeSize: 20Gi
    monitoring:
      # type: external
      endpoint: http://prometheus-operated.kubesphere-monitoring-system.svc:9090
      GPUMonitoring:
        enabled: false
    gpu:
      kinds:
      - resourceName: "nvidia.com/gpu"
        resourceType: "GPU"
        default: true
    es:
      # master:
      #   volumeSize: 4Gi
      #   replicas: 1
      #   resources: {}
      # data:
      #   volumeSize: 20Gi
      #   replicas: 1
      #   resources: {}
      logMaxAge: 7
      elkPrefix: logstash
      basicAuth:
        enabled: false
        username: ""
        password: ""
      externalElasticsearchHost: ""
      externalElasticsearchPort: ""
  alerting:
    enabled: false
    # thanosruler:
    #   replicas: 1
    #   resources: {}
  auditing:
    enabled: false
    # operator:
    #   resources: {}
    # webhook:
    #   resources: {}
  devops:
    enabled: false
    # resources: {}
    jenkinsMemoryLim: 2Gi
    jenkinsMemoryReq: 1500Mi
    jenkinsVolumeSize: 8Gi
    jenkinsJavaOpts_Xms: 1200m
    jenkinsJavaOpts_Xmx: 1600m
    jenkinsJavaOpts_MaxRAM: 2g
  events:
    enabled: false
    # operator:
    #   resources: {}
    # exporter:
    #   resources: {}
    # ruler:
    #   enabled: true
    #   replicas: 2
    #   resources: {}
  logging:
    enabled: false
    logsidecar:
      enabled: true
      replicas: 2
      # resources: {}
  metrics_server:
    enabled: false
  monitoring:
    storageClass: ""
    node_exporter:
      port: 9100
      # resources: {}
    # kube_rbac_proxy:
    #   resources: {}
    # kube_state_metrics:
    #   resources: {}
    # prometheus:
    #   replicas: 1
    #   volumeSize: 20Gi
    #   resources: {}
    #   operator:
    #     resources: {}
    # alertmanager:
    #   replicas: 1
    #   resources: {}
    # notification_manager:
    #   resources: {}
    #   operator:
    #     resources: {}
    #   proxy:
    #     resources: {}
    gpu:
      nvidia_dcgm_exporter:
        enabled: false
        # resources: {}
  multicluster:
    clusterRole: none
  network:
    networkpolicy:
      enabled: false
    ippool:
      type: none
    topology:
      type: none
  openpitrix:
    store:
      enabled: false
  servicemesh:
    enabled: false
    istio:
      components:
        ingressGateways:
        - name: istio-ingressgateway
          enabled: false
        cni:
          enabled: false
  edgeruntime:
    enabled: false
    kubeedge:
      enabled: false
      cloudCore:
        cloudHub:
          advertiseAddress:
            - ""
        service:
          cloudhubNodePort: "30000"
          cloudhubQuicNodePort: "30001"
          cloudhubHttpsNodePort: "30002"
          cloudstreamNodePort: "30003"
          tunnelNodePort: "30004"
        # resources: {}
        # hostNetWork: false
      iptables-manager:
        enabled: true
        mode: "external"
        # resources: {}
      # edgeService:
      #   resources: {}
  terminal:
    timeout: 600

A clear and concise description of what happend.

  1. 使用 ./kk init os -f kk-config.yaml 初始化环境时,chronyd 配置无效,报出警告 dpkg-statoverride: warning: --update given but /var/log/chrony does not exist
  2. 再次使用 ./kk init os -f kk-config.yaml 检测环境时 ok
  3. 但是执行 ./kk create cluster -f kk-config.yaml 时报错

Relevant log output

initOs错误

./kk init os -f kk-config.yaml
 _   __      _          _   __
| | / /     | |        | | / /
| |/ / _   _| |__   ___| |/ /  ___ _   _
|    \| | | | '_ \ / _ \    \ / _ \ | | |
| |\  \ |_| | |_) |  __/ |\  \  __/ |_| |
\_| \_/\__,_|_.__/ \___\_| \_/\___|\__, |
                                    __/ |
                                   |___/

10:16:03 UTC [GreetingsModule] Greetings
10:16:03 UTC message: [k8s03]
Greetings, KubeKey!
10:16:03 UTC message: [k8s01]
Greetings, KubeKey!
10:16:04 UTC message: [k8s02]
Greetings, KubeKey!
10:16:04 UTC success: [k8s03]
10:16:04 UTC success: [k8s01]
10:16:04 UTC success: [k8s02]
10:16:04 UTC [RepositoryOnlineModule] Get OS release
10:16:04 UTC success: [k8s01]
10:16:04 UTC success: [k8s02]
10:16:04 UTC success: [k8s03]
10:16:04 UTC [RepositoryOnlineModule] New repository client
10:16:04 UTC success: [k8s03]
10:16:04 UTC success: [k8s01]
10:16:04 UTC success: [k8s02]
10:16:04 UTC [RepositoryOnlineModule] Install packages
10:16:12 UTC stdout: [k8s02]
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  iptables libip6tc2 libipset13
  libnetfilter-conntrack3 libnfnetlink0
  libnftnl11 libnl-3-200 libnl-genl-3-200
Suggested packages:
  dnsutils nftables firewalld heartbeat
  keepalived ldirectord
The following packages will be REMOVED:
  systemd-timesyncd
The following NEW packages will be installed:
  chrony conntrack ebtables ipset iptables
  ipvsadm libip6tc2 libipset13
  libnetfilter-conntrack3 libnfnetlink0
  libnftnl11 libnl-3-200 libnl-genl-3-200 socat
0 upgraded, 14 newly installed, 1 to remove and 28 not upgraded.
Need to get 1556 kB of archives.
After this operation, 5629 kB of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 chrony arm64 4.2-2ubuntu2 [290 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libip6tc2 arm64 1.8.7-1ubuntu5 [20.1 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libnfnetlink0 arm64 1.0.1-3build3 [14.2 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libnetfilter-conntrack3 arm64 1.0.9-1 [44.5 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libnftnl11 arm64 1.2.1-1build1 [64.5 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 iptables arm64 1.8.7-1ubuntu5 [451 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 conntrack arm64 1:1.4.6-2build2 [32.4 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 ebtables arm64 2.0.11-4build2 [85.4 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libipset13 arm64 7.15-1build1 [63.3 kB]
Get:10 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libnl-3-200 arm64 3.5.0-0.1 [58.1 kB]
Get:11 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libnl-genl-3-200 arm64 3.5.0-0.1 [12.1 kB]
Get:12 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 ipset arm64 7.15-1build1 [32.7 kB]
Get:13 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 ipvsadm arm64 1:1.31-1build2 [41.0 kB]
Get:14 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 socat arm64 1.7.4.1-3ubuntu4 [348 kB]
Fetched 1556 kB in 4s (386 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 68042 files and directories currently installed.)
Removing systemd-timesyncd (249.11-0ubuntu3.4) ...
Selecting previously unselected package chrony.
(Reading database ... 68028 files and directories currently installed.)
Preparing to unpack .../00-chrony_4.2-2ubuntu2_arm64.deb ...
Unpacking chrony (4.2-2ubuntu2) ..............]
Selecting previously unselected package libip6tc2:arm64.
Preparing to unpack .../01-libip6tc2_1.8.7-1ubuntu5_arm64.deb ...
Unpacking libip6tc2:arm64 (1.8.7-1ubuntu5) ...]
Selecting previously unselected package libnfnetlink0:arm64.
Preparing to unpack .../02-libnfnetlink0_1.0.1-3build3_arm64.deb ...
Unpacking libnfnetlink0:arm64 (1.0.1-3build3) ...
Selecting previously unselected package libnetfilter-conntrack3:arm64.
Preparing to unpack .../03-libnetfilter-conntrack3_1.0.9-1_arm64.deb ...
Unpacking libnetfilter-conntrack3:arm64 (1.0.9-1) ...
Selecting previously unselected package libnftnl11:arm64.
Preparing to unpack .../04-libnftnl11_1.2.1-1build1_arm64.deb ...
Unpacking libnftnl11:arm64 (1.2.1-1build1) ...]
Selecting previously unselected package iptables.
Preparing to unpack .../05-iptables_1.8.7-1ubuntu5_arm64.deb ...
Unpacking iptables (1.8.7-1ubuntu5) ..........]
Selecting previously unselected package conntrack.
Preparing to unpack .../06-conntrack_1%3a1.4.6-2build2_arm64.deb ...
Unpacking conntrack (1:1.4.6-2build2) ........]
Selecting previously unselected package ebtables.
Preparing to unpack .../07-ebtables_2.0.11-4build2_arm64.deb ...
Unpacking ebtables (2.0.11-4build2) ..........]
Selecting previously unselected package libipset13:arm64.
Preparing to unpack .../08-libipset13_7.15-1build1_arm64.deb ...
Unpacking libipset13:arm64 (7.15-1build1) ....]
Selecting previously unselected package libnl-3-200:arm64.
Preparing to unpack .../09-libnl-3-200_3.5.0-0.1_arm64.deb ...
Unpacking libnl-3-200:arm64 (3.5.0-0.1) ......]
Selecting previously unselected package libnl-genl-3-200:arm64.
Preparing to unpack .../10-libnl-genl-3-200_3.5.0-0.1_arm64.deb ...
Unpacking libnl-genl-3-200:arm64 (3.5.0-0.1) ...
Selecting previously unselected package ipset.]
Preparing to unpack .../11-ipset_7.15-1build1_arm64.deb ...
Unpacking ipset (7.15-1build1) ...............]
Selecting previously unselected package ipvsadm.
Preparing to unpack .../12-ipvsadm_1%3a1.31-1build2_arm64.deb ...
Unpacking ipvsadm (1:1.31-1build2) ...........]
Selecting previously unselected package socat.]
Preparing to unpack .../13-socat_1.7.4.1-3ubuntu4_arm64.deb ...
Unpacking socat (1.7.4.1-3ubuntu4) ...........]
Setting up libip6tc2:arm64 (1.8.7-1ubuntu5) ...
Setting up chrony (4.2-2ubuntu2) .............]
debconf: unable to initialize frontend: Dialog]
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline

Creating config file /etc/chrony/chrony.conf with new version
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline

Creating config file /etc/chrony/chrony.keys with new version
dpkg-statoverride: warning: --update given but /var/log/chrony does not exist
Created symlink /etc/systemd/system/chronyd.service → /lib/systemd/system/chrony.service.
Created symlink /etc/systemd/system/multi-user.target.wants/chrony.service → /lib/systemd/system/chrony.service.
Setting up libnftnl11:arm64 (1.2.1-1build1) ...
Setting up ebtables (2.0.11-4build2) .........]
update-alternatives: using /usr/sbin/ebtables-legacy to provide /usr/sbin/ebtables (ebtables) in auto mode
Setting up socat (1.7.4.1-3ubuntu4) ..........]
Setting up libipset13:arm64 (7.15-1build1) ...]
Setting up libnfnetlink0:arm64 (1.0.1-3build3) ...
Setting up libnl-3-200:arm64 (3.5.0-0.1) .....]
Setting up ipset (7.15-1build1) ...####.......]
Setting up libnetfilter-conntrack3:arm64 (1.0.9-1) ...
Setting up libnl-genl-3-200:arm64 (3.5.0-0.1) ...
Setting up ipvsadm (1:1.31-1build2) ...###....]
Setting up iptables (1.8.7-1ubuntu5) ...###...]
update-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in auto mode
update-alternatives: using /usr/sbin/ip6tables-legacy to provide /usr/sbin/ip6tables (ip6tables) in auto mode
update-alternatives: using /usr/sbin/iptables-nft to provide /usr/sbin/iptables (iptables) in auto mode
update-alternatives: using /usr/sbin/ip6tables-nft to provide /usr/sbin/ip6tables (ip6tables) in auto mode
update-alternatives: using /usr/sbin/arptables-nft to provide /usr/sbin/arptables (arptables) in auto mode
update-alternatives: using /usr/sbin/ebtables-nft to provide /usr/sbin/ebtables (ebtables) in auto mode
Setting up conntrack (1:1.4.6-2build2) ...##..]
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Processing triggers for dbus (1.12.20-2ubuntu4) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline
Scanning processes...
Scanning linux images...

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor
 (qemu) binaries on this host.
10:16:13 UTC stdout: [k8s01]
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  iptables libip6tc2 libipset13
  libnetfilter-conntrack3 libnfnetlink0
  libnftnl11 libnl-3-200 libnl-genl-3-200
Suggested packages:
  dnsutils nftables firewalld heartbeat
  keepalived ldirectord
The following packages will be REMOVED:
  systemd-timesyncd
The following NEW packages will be installed:
  chrony conntrack ebtables ipset iptables
  ipvsadm libip6tc2 libipset13
  libnetfilter-conntrack3 libnfnetlink0
  libnftnl11 libnl-3-200 libnl-genl-3-200 socat
0 upgraded, 14 newly installed, 1 to remove and 28 not upgraded.
Need to get 1556 kB of archives.
After this operation, 5629 kB of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 chrony arm64 4.2-2ubuntu2 [290 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libip6tc2 arm64 1.8.7-1ubuntu5 [20.1 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libnfnetlink0 arm64 1.0.1-3build3 [14.2 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libnetfilter-conntrack3 arm64 1.0.9-1 [44.5 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libnftnl11 arm64 1.2.1-1build1 [64.5 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 iptables arm64 1.8.7-1ubuntu5 [451 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 conntrack arm64 1:1.4.6-2build2 [32.4 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 ebtables arm64 2.0.11-4build2 [85.4 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libipset13 arm64 7.15-1build1 [63.3 kB]
Get:10 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libnl-3-200 arm64 3.5.0-0.1 [58.1 kB]
Get:11 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libnl-genl-3-200 arm64 3.5.0-0.1 [12.1 kB]
Get:12 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 ipset arm64 7.15-1build1 [32.7 kB]
Get:13 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 ipvsadm arm64 1:1.31-1build2 [41.0 kB]
Get:14 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 socat arm64 1.7.4.1-3ubuntu4 [348 kB]
Fetched 1556 kB in 5s (324 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 68042 files and directories currently installed.)
Removing systemd-timesyncd (249.11-0ubuntu3.4) ...
Selecting previously unselected package chrony.
(Reading database ... 68028 files and directories currently installed.)
Preparing to unpack .../00-chrony_4.2-2ubuntu2_arm64.deb ...
Unpacking chrony (4.2-2ubuntu2) ..............]
Selecting previously unselected package libip6tc2:arm64.
Preparing to unpack .../01-libip6tc2_1.8.7-1ubuntu5_arm64.deb ...
Unpacking libip6tc2:arm64 (1.8.7-1ubuntu5) ...]
Selecting previously unselected package libnfnetlink0:arm64.
Preparing to unpack .../02-libnfnetlink0_1.0.1-3build3_arm64.deb ...
Unpacking libnfnetlink0:arm64 (1.0.1-3build3) ...
Selecting previously unselected package libnetfilter-conntrack3:arm64.
Preparing to unpack .../03-libnetfilter-conntrack3_1.0.9-1_arm64.deb ...
Unpacking libnetfilter-conntrack3:arm64 (1.0.9-1) ...
Selecting previously unselected package libnftnl11:arm64.
Preparing to unpack .../04-libnftnl11_1.2.1-1build1_arm64.deb ...
Unpacking libnftnl11:arm64 (1.2.1-1build1) ...]
Selecting previously unselected package iptables.
Preparing to unpack .../05-iptables_1.8.7-1ubuntu5_arm64.deb ...
Unpacking iptables (1.8.7-1ubuntu5) ..........]
Selecting previously unselected package conntrack.
Preparing to unpack .../06-conntrack_1%3a1.4.6-2build2_arm64.deb ...
Unpacking conntrack (1:1.4.6-2build2) ........]
Selecting previously unselected package ebtables.
Preparing to unpack .../07-ebtables_2.0.11-4build2_arm64.deb ...
Unpacking ebtables (2.0.11-4build2) ..........]
Selecting previously unselected package libipset13:arm64.
Preparing to unpack .../08-libipset13_7.15-1build1_arm64.deb ...
Unpacking libipset13:arm64 (7.15-1build1) ....]
Selecting previously unselected package libnl-3-200:arm64.
Preparing to unpack .../09-libnl-3-200_3.5.0-0.1_arm64.deb ...
Unpacking libnl-3-200:arm64 (3.5.0-0.1) ......]
Selecting previously unselected package libnl-genl-3-200:arm64.
Preparing to unpack .../10-libnl-genl-3-200_3.5.0-0.1_arm64.deb ...
Unpacking libnl-genl-3-200:arm64 (3.5.0-0.1) ...
Selecting previously unselected package ipset.]
Preparing to unpack .../11-ipset_7.15-1build1_arm64.deb ...
Unpacking ipset (7.15-1build1) ...............]
Selecting previously unselected package ipvsadm.
Preparing to unpack .../12-ipvsadm_1%3a1.31-1build2_arm64.deb ...
Unpacking ipvsadm (1:1.31-1build2) ...........]
Selecting previously unselected package socat.]
Preparing to unpack .../13-socat_1.7.4.1-3ubuntu4_arm64.deb ...
Unpacking socat (1.7.4.1-3ubuntu4) ...........]
Setting up libip6tc2:arm64 (1.8.7-1ubuntu5) ...
Setting up chrony (4.2-2ubuntu2) .............]
debconf: unable to initialize frontend: Dialog]
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline

Creating config file /etc/chrony/chrony.conf with new version
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline

Creating config file /etc/chrony/chrony.keys with new version
dpkg-statoverride: warning: --update given but /var/log/chrony does not exist
Created symlink /etc/systemd/system/chronyd.service → /lib/systemd/system/chrony.service.
Created symlink /etc/systemd/system/multi-user.target.wants/chrony.service → /lib/systemd/system/chrony.service.
Setting up libnftnl11:arm64 (1.2.1-1build1) ...
Setting up ebtables (2.0.11-4build2) .........]
update-alternatives: using /usr/sbin/ebtables-legacy to provide /usr/sbin/ebtables (ebtables) in auto mode
Setting up socat (1.7.4.1-3ubuntu4) ..........]
Setting up libipset13:arm64 (7.15-1build1) ...]
Setting up libnfnetlink0:arm64 (1.0.1-3build3) ...
Setting up libnl-3-200:arm64 (3.5.0-0.1) .....]
Setting up ipset (7.15-1build1) ...####.......]
Setting up libnetfilter-conntrack3:arm64 (1.0.9-1) ...
Setting up libnl-genl-3-200:arm64 (3.5.0-0.1) ...
Setting up ipvsadm (1:1.31-1build2) ...###....]
Setting up iptables (1.8.7-1ubuntu5) ...###...]
update-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in auto mode
update-alternatives: using /usr/sbin/ip6tables-legacy to provide /usr/sbin/ip6tables (ip6tables) in auto mode
update-alternatives: using /usr/sbin/iptables-nft to provide /usr/sbin/iptables (iptables) in auto mode
update-alternatives: using /usr/sbin/ip6tables-nft to provide /usr/sbin/ip6tables (ip6tables) in auto mode
update-alternatives: using /usr/sbin/arptables-nft to provide /usr/sbin/arptables (arptables) in auto mode
update-alternatives: using /usr/sbin/ebtables-nft to provide /usr/sbin/ebtables (ebtables) in auto mode
Setting up conntrack (1:1.4.6-2build2) ...##..]
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Processing triggers for dbus (1.12.20-2ubuntu4) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline
Scanning processes...
Scanning linux images...

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor
 (qemu) binaries on this host.

createCluster错误

./kk create cluster -f kk-config.yaml

 _   __      _          _   __
| | / /     | |        | | / /
| |/ / _   _| |__   ___| |/ /  ___ _   _
|    \| | | | '_ \ / _ \    \ / _ \ | | |
| |\  \ |_| | |_) |  __/ |\  \  __/ |_| |
\_| \_/\__,_|_.__/ \___\_| \_/\___|\__, |
                                    __/ |
                                   |___/

19:09:58 CST [GreetingsModule] Greetings
19:09:58 CST message: [k8s03]
Greetings, KubeKey!
19:09:58 CST message: [k8s01]
Greetings, KubeKey!
19:09:59 CST message: [k8s02]
Greetings, KubeKey!
19:09:59 CST success: [k8s03]
19:09:59 CST success: [k8s01]
19:09:59 CST success: [k8s02]
19:09:59 CST [NodePreCheckModule] A pre-check on nodes
19:09:59 CST success: [k8s01]
19:09:59 CST success: [k8s03]
19:09:59 CST success: [k8s02]
19:09:59 CST [ConfirmModule] Display confirmation form
+-------+------+------+---------+----------+-------+-------+---------+-----------+--------+--------+------------+------------+-------------+------------------+--------------+
| name  | sudo | curl | openssl | ebtables | socat | ipset | ipvsadm | conntrack | chrony | docker | containerd | nfs client | ceph client | glusterfs client | time         |
+-------+------+------+---------+----------+-------+-------+---------+-----------+--------+--------+------------+------------+-------------+------------------+--------------+
| k8s01 | y    | y    | y       | y        | y     | y     | y       | y         | y      |        |            |            |             |                  | CST 19:09:59 |
| k8s02 | y    | y    | y       | y        | y     | y     | y       | y         | y      |        |            |            |             |                  | CST 19:09:59 |
| k8s03 | y    | y    | y       | y        | y     | y     | y       | y         | y      |        |            |            |             |                  | CST 19:09:59 |
+-------+------+------+---------+----------+-------+-------+---------+-----------+--------+--------+------------+------------+-------------+------------------+--------------+

This is a simple check of your environment.
Before installation, ensure that your machines meet all requirements specified at
https://github.com/kubesphere/kubekey#requirements-and-recommendations

Continue this installation? [yes/no]: yes
19:10:00 CST success: [LocalHost]
19:10:00 CST [NodeBinariesModule] Download installation binaries
19:10:00 CST message: [localhost]
downloading amd64 kubeadm v1.24.1 ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 42.3M  100 42.3M    0     0  1013k      0  0:00:42  0:00:42 --:--:-- 1021k
19:10:43 CST message: [localhost]
downloading amd64 kubelet v1.24.1 ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  110M  100  110M    0     0   986k      0  0:01:55  0:01:55 --:--:-- 1029k
19:12:39 CST message: [localhost]
downloading amd64 kubectl v1.24.1 ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 43.5M  100 43.5M    0     0  1010k      0  0:00:44  0:00:44 --:--:-- 1018k
19:13:23 CST message: [localhost]
downloading amd64 helm v3.6.3 ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 43.0M  100 43.0M    0     0  1007k      0  0:00:43  0:00:43 --:--:-- 1027k
19:14:07 CST message: [localhost]
downloading amd64 kubecni v0.9.1 ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 37.9M  100 37.9M    0     0  1016k      0  0:00:38  0:00:38 --:--:-- 1036k
19:14:45 CST message: [localhost]
downloading amd64 crictl v1.24.0 ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13.8M  100 13.8M    0     0  1005k      0  0:00:14  0:00:14 --:--:-- 1023k
19:14:59 CST message: [localhost]
downloading amd64 etcd v3.4.13 ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 16.5M  100 16.5M    0     0  1005k      0  0:00:16  0:00:16 --:--:-- 1030k
19:15:16 CST message: [localhost]
downloading amd64 containerd 1.6.4 ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 42.3M  100 42.3M    0     0   974k      0  0:00:44  0:00:44 --:--:-- 1026k
19:16:01 CST message: [localhost]
downloading amd64 runc v1.1.1 ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 9194k  100 9194k    0     0   992k      0  0:00:09  0:00:09 --:--:-- 1027k
19:16:10 CST success: [LocalHost]
19:16:10 CST [ConfigureOSModule] Prepare to init OS
19:16:11 CST success: [k8s02]
19:16:11 CST success: [k8s03]
19:16:11 CST success: [k8s01]
19:16:11 CST [ConfigureOSModule] Generate init os script
19:16:11 CST success: [k8s01]
19:16:11 CST success: [k8s02]
19:16:11 CST success: [k8s03]
19:16:11 CST [ConfigureOSModule] Exec init os script
19:16:11 CST stdout: [k8s03]
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-arptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_local_reserved_ports = 30000-32767
vm.max_map_count = 262144
vm.swappiness = 1
fs.inotify.max_user_instances = 524288
kernel.pid_max = 65535
19:16:11 CST stdout: [k8s01]
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-arptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_local_reserved_ports = 30000-32767
vm.max_map_count = 262144
vm.swappiness = 1
fs.inotify.max_user_instances = 524288
kernel.pid_max = 65535
19:16:11 CST stdout: [k8s02]
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-arptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_local_reserved_ports = 30000-32767
vm.max_map_count = 262144
vm.swappiness = 1
fs.inotify.max_user_instances = 524288
kernel.pid_max = 65535
19:16:11 CST success: [k8s03]
19:16:11 CST success: [k8s01]
19:16:11 CST success: [k8s02]
19:16:11 CST [ConfigureOSModule] configure the ntp server for each node
19:16:11 CST message: [k8s01]
set ntpserver: time1.cloud.tencent.com failed, please check file /etc/chrony.conf: Failed to exec command: sudo -E /bin/bash -c "grep -q '^server time1.cloud.tencent.com iburst' /etc/chrony.conf||sed '1a server time1.cloud.tencent.com iburst' -i /etc/chrony.conf"
grep: /etc/chrony.conf: No such file or directory
sed: can't read /etc/chrony.conf: No such file or directory: Process exited with status 2
19:16:11 CST retry: [k8s01]
19:16:11 CST message: [k8s02]
set ntpserver: time1.cloud.tencent.com failed, please check file /etc/chrony.conf: Failed to exec command: sudo -E /bin/bash -c "grep -q '^server time1.cloud.tencent.com iburst' /etc/chrony.conf||sed '1a server time1.cloud.tencent.com iburst' -i /etc/chrony.conf"
grep: /etc/chrony.conf: No such file or directory
sed: can't read /etc/chrony.conf: No such file or directory: Process exited with status 2
19:16:11 CST retry: [k8s02]
19:16:11 CST message: [k8s03]
set ntpserver: time1.cloud.tencent.com failed, please check file /etc/chrony.conf: Failed to exec command: sudo -E /bin/bash -c "grep -q '^server time1.cloud.tencent.com iburst' /etc/chrony.conf||sed '1a server time1.cloud.tencent.com iburst' -i /etc/chrony.conf"
grep: /etc/chrony.conf: No such file or directory
sed: can't read /etc/chrony.conf: No such file or directory: Process exited with status 2
19:16:11 CST retry: [k8s03]
19:16:16 CST message: [k8s01]
set ntpserver: time1.cloud.tencent.com failed, please check file /etc/chrony.conf: Failed to exec command: sudo -E /bin/bash -c "grep -q '^server time1.cloud.tencent.com iburst' /etc/chrony.conf||sed '1a server time1.cloud.tencent.com iburst' -i /etc/chrony.conf"
grep: /etc/chrony.conf: No such file or directory
sed: can't read /etc/chrony.conf: No such file or directory: Process exited with status 2
19:16:16 CST retry: [k8s01]
19:16:16 CST message: [k8s02]
set ntpserver: time1.cloud.tencent.com failed, please check file /etc/chrony.conf: Failed to exec command: sudo -E /bin/bash -c "grep -q '^server time1.cloud.tencent.com iburst' /etc/chrony.conf||sed '1a server time1.cloud.tencent.com iburst' -i /etc/chrony.conf"
grep: /etc/chrony.conf: No such file or directory
sed: can't read /etc/chrony.conf: No such file or directory: Process exited with status 2
19:16:16 CST retry: [k8s02]
19:16:16 CST message: [k8s03]
set ntpserver: time1.cloud.tencent.com failed, please check file /etc/chrony.conf: Failed to exec command: sudo -E /bin/bash -c "grep -q '^server time1.cloud.tencent.com iburst' /etc/chrony.conf||sed '1a server time1.cloud.tencent.com iburst' -i /etc/chrony.conf"
grep: /etc/chrony.conf: No such file or directory
sed: can't read /etc/chrony.conf: No such file or directory: Process exited with status 2
19:16:16 CST retry: [k8s03]
19:16:21 CST message: [k8s01]
set ntpserver: time1.cloud.tencent.com failed, please check file /etc/chrony.conf: Failed to exec command: sudo -E /bin/bash -c "grep -q '^server time1.cloud.tencent.com iburst' /etc/chrony.conf||sed '1a server time1.cloud.tencent.com iburst' -i /etc/chrony.conf"
grep: /etc/chrony.conf: No such file or directory
sed: can't read /etc/chrony.conf: No such file or directory: Process exited with status 2
19:16:21 CST message: [k8s02]
set ntpserver: time1.cloud.tencent.com failed, please check file /etc/chrony.conf: Failed to exec command: sudo -E /bin/bash -c "grep -q '^server time1.cloud.tencent.com iburst' /etc/chrony.conf||sed '1a server time1.cloud.tencent.com iburst' -i /etc/chrony.conf"
grep: /etc/chrony.conf: No such file or directory
sed: can't read /etc/chrony.conf: No such file or directory: Process exited with status 2
19:16:21 CST message: [k8s03]
set ntpserver: time1.cloud.tencent.com failed, please check file /etc/chrony.conf: Failed to exec command: sudo -E /bin/bash -c "grep -q '^server time1.cloud.tencent.com iburst' /etc/chrony.conf||sed '1a server time1.cloud.tencent.com iburst' -i /etc/chrony.conf"
grep: /etc/chrony.conf: No such file or directory
sed: can't read /etc/chrony.conf: No such file or directory: Process exited with status 2
19:16:21 CST failed: [k8s01]
19:16:21 CST failed: [k8s02]
19:16:21 CST failed: [k8s03]
error: Pipeline[CreateClusterPipeline] execute failed: Module[ConfigureOSModule] exec failed:
failed: [k8s01] [ConfigureNtpServer] exec failed after 3 retires: set ntpserver: time1.cloud.tencent.com failed, please check file /etc/chrony.conf: Failed to exec command: sudo -E /bin/bash -c "grep -q '^server time1.cloud.tencent.com iburst' /etc/chrony.conf||sed '1a server time1.cloud.tencent.com iburst' -i /etc/chrony.conf"
grep: /etc/chrony.conf: No such file or directory
sed: can't read /etc/chrony.conf: No such file or directory: Process exited with status 2
failed: [k8s02] [ConfigureNtpServer] exec failed after 3 retires: set ntpserver: time1.cloud.tencent.com failed, please check file /etc/chrony.conf: Failed to exec command: sudo -E /bin/bash -c "grep -q '^server time1.cloud.tencent.com iburst' /etc/chrony.conf||sed '1a server time1.cloud.tencent.com iburst' -i /etc/chrony.conf"
grep: /etc/chrony.conf: No such file or directory
sed: can't read /etc/chrony.conf: No such file or directory: Process exited with status 2
failed: [k8s03] [ConfigureNtpServer] exec failed after 3 retires: set ntpserver: time1.cloud.tencent.com failed, please check file /etc/chrony.conf: Failed to exec command: sudo -E /bin/bash -c "grep -q '^server time1.cloud.tencent.com iburst' /etc/chrony.conf||sed '1a server time1.cloud.tencent.com iburst' -i /etc/chrony.conf"
grep: /etc/chrony.conf: No such file or directory
sed: can't read /etc/chrony.conf: No such file or directory: Process exited with status 2

Additional information

image image
shuqingzai commented 1 year ago

1414

shuqingzai commented 1 year ago

close this see #1414