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

timeout failed #1288

Closed
Nello-Angelo opened this issue May 21, 2022 · 4 comments · Fixed by #1371
Closed

timeout failed #1288

Nello-Angelo opened this issue May 21, 2022 · 4 comments · Fixed by #1371
Labels
bug Something isn't working good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/need-to-verify

Comments

@Nello-Angelo
Copy link

What is version of KubeKey has the issue?

A versions with a "timeout" option for the host TCP connection to establish

What is your os environment?

centos 7

KubeKey config file

apiVersion: kubekey.kubesphere.io/v1alpha2
kind: Cluster
metadata:
  name: sample
spec:
  hosts:
  - {name: master1, address: 192.168.101.128, internalAddress: 192.168.101.128, user: root, password: "123"}
  - {name: worker, address: 192.168.101.131, internalAddress: 192.168.101.131, user: root, password: "123"}
  - {name: worker2, address: 192.168.101.134, internalAddress: 192.168.101.134, user: root, password: "123"}
  roleGroups:
    etcd:
    - master1
    control-plane: 
    - master1
    worker:
    - worker
    - worker2
  controlPlaneEndpoint: 
    internalLoadbalancer: haproxy
    domain: lb.kubesphere.local
    address: ""
    port: 6443
  kubernetes:
    version: v1.23.6
    clusterName: cluster.local
    masqueradeAll: false 
    maxPods: 110 
    nodeCidrMaskSize: 24  
    proxyMode: ipvs
  etcd:
    type: kubeadm
  network:
    plugin: calico
    calico:
      ipipMode: Never
      vxlanMode: Never  
      vethMTU: 1440
    kubePodsCIDR: 10.233.64.0/18
    kubeServiceCIDR: 10.233.0.0/18
    multusCNI:
      enabled: false
  registry:
    plainHTTP: false
    privateRegistry: ""
    namespaceOverride: ""
    registryMirrors: []
    insecureRegistries: []
  addons: []

A clear and concise description of what happend.

failed after a time when kubekey checked hosts

Relevant log output

14:07:49 MSK [GreetingsModule] Greetings
14:07:49 MSK message: [worker2]
Greetings, KubeKey!
14:08:19 MSK success: [worker2]
14:08:19 MSK failed: [master1]
14:08:19 MSK failed: [worker]
error: Pipeline[CreateClusterPipeline] execute failed: Module[GreetingsModule] exec failed:
failed: [master1] execute task timeout, Timeout=30000000000
failed: [worker] execute task timeout, Timeout=30000000000

Additional information

this happen every time after you added a "timeout" option for the host TCP connection

you need to add a key to set custome timeout or increase timeout maybe 10 minutes

@Nello-Angelo Nello-Angelo added the bug Something isn't working label May 21, 2022
@Nello-Angelo Nello-Angelo changed the title timeout feiled timeout failed May 21, 2022
@ks-ci-bot ks-ci-bot added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels May 21, 2022
@kubesphere kubesphere deleted a comment from ks-ci-bot May 21, 2022
@24sama
Copy link
Collaborator

24sama commented May 21, 2022

Hi @Nello-Angelo , thanks for your feedback.
There is a field that can set up the TCP connection timeout, and the default value of this field is 10 seconds.

Timeout *int64 `yaml:"timeout,omitempty" json:"timeout,omitempty"`

You can have a try.
30 seconds example:

  - {name: master1, address: 192.168.101.128, internalAddress: 192.168.101.128, user: root, password: "123", timeout: 30}

If it doesn't work, I think that is caused by the task timer, because the task timeout of GreatingsModule is hardcoded 30 seconds. But the terrible, there is no cli option that can modify it at present, maybe you need to modify the code and build kubekey manually.

hello := &task.RemoteTask{

@Nello-Angelo
Copy link
Author

i did it "build kubekey manually." i changed that option (kubekey/pkg/bootstrap/precheck/module.go) but please try to add option to change timeout option in confige "config-sample.yaml"

Or you will always to get issue with this moment

@24sama
Copy link
Collaborator

24sama commented Jul 10, 2022

Hi @Nello-Angelo, sorry to reply to you late.

I create a new PR #1371 to fix this issue. Welcome to review and test it!

@24sama
Copy link
Collaborator

24sama commented Jul 10, 2022

/kind need-to-verify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/need-to-verify
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants