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

[BUG] When we have docker-cli but there is no dockerd, sealer run will get a error #55

Open
Lan-ce-lot opened this issue May 18, 2023 · 1 comment

Comments

@Lan-ce-lot
Copy link
Collaborator

What happened:

Sometime we have dockercli but there is no dockerd.

❯ ./sealer run my-kube:v1.22.15 -m 172.16.0.10 -p xx
2023-05-18 22:11:40 [INFO] [run.go:252] start to create new cluster with image: my-kube:v1.22.15

2023-05-18 22:11:43 [INFO] [installer.go:456] The cri is docker, cluster runtime type is kubernetes


+ set -e
+++ dirname /var/lib/sealer/data/my-cluster/rootfs/scripts/docker.sh
++ cd /var/lib/sealer/data/my-cluster/rootfs/scripts
++ pwd
+ scripts_path=/var/lib/sealer/data/my-cluster/rootfs/scripts
+ image_dir=/var/lib/sealer/data/my-cluster/rootfs/scripts/../images
+ DOCKER_VERSION=19.03.15
+ storage=/var/lib/docker
+ mkdir -p /var/lib/docker
+ utils_command_exists docker
+ command -v docker
+ disable_selinux
+ '[' -s /etc/selinux/config ']'
+ systemctl daemon-reload
+ systemctl restart docker.service
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xeu docker.service" for details.
Usage:
  sealer run [flags]

Examples:

run cluster by Clusterfile:
  sealer run -f Clusterfile
run cluster by CLI flags:
  sealer run docker.io/sealerio/kubernetes:v1-22-15-sealerio-2 -m 172.16.130.21 -n 172.16.130.22 -p 'Sealer123'
run app image:
  sealer run localhost/nginx:v1


Flags:
  -f, --Clusterfile string   Clusterfile path to run a Kubernetes cluster
      --apps strings         override default AppNames of sealer image
      --cmds strings         override default LaunchCmds of sealer image
  -e, --env strings          set custom environment variables
  -h, --help                 help for run
      --ignore-cache         whether ignore cache when distribute sealer image, default is false.
  -m, --masters string       set count or IPList to masters
      --mode string          load images to the specified registry in advance (default "apply")
  -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
      --port uint16          set the sshd service port number for the server (default port: 22) (default 22)
  -u, --user string          set baremetal server username (default "root")

Global Flags:
      --color string               set the log color mode, the possible values can be [never always] (default "always")
      --config string              config file of sealer tool (default is $HOME/.sealer.json)
  -d, --debug                      turn on debug mode
      --hide-path                  hide the log path
      --hide-time                  hide the log time
      --log-to-file                write log message to disk (default true)
  -q, --quiet                      silence the usage when fail
      --remote-logger-url string   remote logger url, if not empty, will send log to this url
      --task-name string           task name which will embedded in the remote logger header, only valid when --remote-logger-url is set

2023-05-18 22:11:44 [ERROR] [root.go:75] sealer-unknown: failed to install docker: execute command(bash /var/lib/sealer/data/my-cluster/rootfs/scripts/docker.sh) on host (172.16.0.10): error(failed to execute command(export LocalRegistryDomain="sea.hub"; export LocalRegistryPort="5000"; export LocalRegistryURL="sea.hub:5000"; export RegistryDomain="sea.hub"; export RegistryPort="5000"; export RegistryURL="sea.hub:5000"; bash /var/lib/sealer/data/my-cluster/rootfs/scripts/docker.sh) on host(172.16.0.10): error(exit status 1))

What you expected to happen:

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:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@Lan-ce-lot Lan-ce-lot changed the title [BUG] When we have docker-cli but there is no dockerd [BUG] When we have docker-cli but there is no dockerd, then we sealer run will get a error May 18, 2023
@Lan-ce-lot Lan-ce-lot changed the title [BUG] When we have docker-cli but there is no dockerd, then we sealer run will get a error [BUG] When we have docker-cli but there is no dockerd, sealer run will get a error May 18, 2023
@starnop
Copy link

starnop commented Jul 10, 2023

For now, we would recommend that you install the cluster image in a clean environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants