Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to create a new single master node cluster with 'sealer run ' #1367

Closed
hackeren opened this issue May 6, 2022 · 2 comments
Closed
Labels
kind/bug Something isn't working

Comments

@hackeren
Copy link

hackeren commented May 6, 2022

What happened:

➜ tmp sealer run ack-agility-registry.cn-shanghai.cr.aliyuncs.com/ecp_builder/ackdistro:v1.20.4-ack-2 -m 172.18.107.236 -p 123456
2022-05-06 16:50:44 [INFO] [default_image.go:66] image {ack-agility-registry.cn-shanghai.cr.aliyuncs.com ack-agility-registry.cn-shanghai.cr.aliyuncs.com/ecp_builder/ackdistro:v1.20.4-ack-2 ecp_builder/ackdistro ecp_builder/ackdistro:v1.20.4-ack-2 v1.20.4-ack-2} already exists
2022-05-06 16:50:44 [INFO] [default_image.go:51] image ack-agility-registry.cn-shanghai.cr.aliyuncs.com/ecp_builder/ackdistro:v1.20.4-ack-2 already exists
copying files to 172.18.107.236: 286/286
2022-05-06 16:52:29 [INFO] [sshcmd.go:52] [ssh][172.18.107.236] : cd /var/lib/sealer/data/my-cluster/rootfs && chmod +x scripts/* && cd scripts && bash init.sh

  • storage=/var/lib/docker
  • mkdir -p /var/lib/docker
  • command_exists docker
  • command -v docker
  • systemctl daemon-reload
  • systemctl restart docker.service
    ++ grep Cg
    ++ docker info
  • cgroupDriver=' Cgroup Driver: systemd
    Cgroup Version: 1'
  • driver=1
  • echo 'driver is 1'
    driver is 1
  • export criDriver=1
  • criDriver=1
  • Applying /usr/lib/sysctl.d/00-system.conf ...
    net.bridge.bridge-nf-call-ip6tables = 0
    net.bridge.bridge-nf-call-iptables = 0
    net.bridge.bridge-nf-call-arptables = 0
  • Applying /usr/lib/sysctl.d/10-default-yama-scope.conf ...
    kernel.yama.ptrace_scope = 0
  • Applying /usr/lib/sysctl.d/50-default.conf ...
    kernel.sysrq = 16
    kernel.core_uses_pid = 1
    kernel.kptr_restrict = 1
    net.ipv4.conf.default.rp_filter = 1
    net.ipv4.conf.all.rp_filter = 1
    net.ipv4.conf.default.accept_source_route = 0
    net.ipv4.conf.all.accept_source_route = 0
    net.ipv4.conf.default.promote_secondaries = 1
    net.ipv4.conf.all.promote_secondaries = 1
    fs.protected_hardlinks = 1
    fs.protected_symlinks = 1
  • Applying /usr/lib/sysctl.d/60-libvirtd.conf ...
    fs.aio-max-nr = 1048576
  • Applying /etc/sysctl.d/99-sysctl.conf ...
    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
  • Applying /etc/sysctl.d/k8s.conf ...
    net.bridge.bridge-nf-call-ip6tables = 1
    net.bridge.bridge-nf-call-iptables = 1
    net.ipv4.conf.all.rp_filter = 0
  • Applying /etc/sysctl.conf ...
    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
    net.ipv4.ip_forward = 1
    2022-05-06 16:52:34 [EROR] [masters.go:319] exec remote cmd failed, kubeadm init phase upload-certs --upload-certs -v 0 [ssh][172.18.107.236]run command failed [kubeadm init phase upload-certs --upload-certs -v 0]
    2022-05-06 16:54:14 [WARN] [filesystem.go:70] failed to unmount dir /var/lib/sealer/data/my-cluster/mount,err: retry action timeout: device or resource busy
    Error: get certifacate key failed [I0507 00:52:01.328407 82613 version.go:254] remote version is much newer: v1.24.0; falling back to: stable-1.20
    error execution phase upload-certs: failed to load admin kubeconfig: open /etc/kubernetes/admin.conf: no such file or directory
    To see the stack trace of this error execute with --v=5 or higher
    ]
    Usage:
    sealer run [flags]

Examples:

create default cluster:
sealer run registry.cn-qingdao.aliyuncs.com/sealer-io/kubernetes:v1.19.8

create cluster by cloud provider, just set the number of masters or nodes,and default provider is ALI_CLOUD:
sealer run registry.cn-qingdao.aliyuncs.com/sealer-io/kubernetes:v1.19.8 --masters 3 --nodes 3 --provider ALI_CLOUD

create cluster by docker container, set the number of masters or nodes, and set provider "CONTAINER":
sealer run registry.cn-qingdao.aliyuncs.com/sealer-io/kubernetes:v1.19.8 --masters 3 --nodes 3 --provider CONTAINER

create cluster to your baremetal server, appoint the iplist:
sealer run registry.cn-qingdao.aliyuncs.com/sealer-io/kubernetes:v1.19.8 --masters 192.168.0.2,192.168.0.3,192.168.0.4
--nodes 192.168.0.5,192.168.0.6,192.168.0.7

Flags:
-h, --help help for run
-m, --masters string set Count or IPList to masters
-n, --nodes string set Count or IPList to nodes
-p, --passwd string set cloud provider or baremetal server password
--pk string set baremetal server private key (default "/root/.ssh/id_rsa")
--pk-passwd string set baremetal server private key password
--podcidr string set default pod CIDR network. example '10.233.0.0/18'
--provider ALI_CLOUD set infra provider, example ALI_CLOUD, the local server need ignore this
--svccidr string set default service CIDR network. example '10.233.64.0/18'
-u, --user string set baremetal server username (default "root")

Global Flags:
--config string config file (default is $HOME/.sealer.json)
-d, --debug turn on debug mode

get certifacate key failed [I0507 00:52:01.328407 82613 version.go:254] remote version is much newer: v1.24.0; falling back to: stable-1.20
error execution phase upload-certs: failed to load admin kubeconfig: open /etc/kubernetes/admin.conf: no such file or directory
To see the stack trace of this error execute with --v=5 or higher

What you expected to happen:

setup a new cluster succeed

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • sealer version (use sealer version):
  • Cloud provider or hardware configuration: {"gitVersion":"v0.5.2","gitCommit":"858ece9","buildDate":"2021-12-13 03:22:26","goVersion":"go1.14.15","compiler":"gc","platform":"linux/amd64"}
  • OS (e.g: cat /etc/os-release): CentOS Linux release 7.9.2009 (Core)
  • Kernel (e.g. uname -a): Linux node1 3.10.0-1160.el7.x86_64 fix: ci lint for mod registry and image #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools:
  • Others:
@hackeren hackeren added the kind/bug Something isn't working label May 6, 2022
@kakaZhou719
Copy link
Member

@hackeren, could you pls run sealer delete -a to clean the host environment to retry sealer run? this file "/etc/kubernetes/admin.conf" don’t exists on the rootfs.

@hackeren
Copy link
Author

@hackeren, could you pls run sealer delete -a to clean the host environment to retry sealer run? this file "/etc/kubernetes/admin.conf" don’t exists on the rootfs.

THX,it does work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants