SUSE / caasp-salt

A collection of salt states used to provision a kubernetes cluster
Apache License 2.0
64 stars 29 forks source link

Increase timeout for salt-minion-ca modules, bsc#1108470 #734

Closed mjura closed 5 years ago

mjura commented 5 years ago

On realy slow deployments salt-minion-ca can exceed timeouts for "ca-setup" and "generate-sa-key" modules. We can avoid this and add timeout option to "generate-sa-key".

Option "timeout" is the maximum time in seconds to wait before failing.

isbm commented 5 years ago

And on even slower we just double that! (SCNR)

mjura commented 5 years ago

And on even slower we just double that! (SCNR)

@isbm nope, we don't need that, only default timeout value is too short

mjura commented 5 years ago

I think we néed to find a more convenient and granular solution instead of increasing timeout

Proposed solution is sufficient, default timeout value is too low. I was trying also implement this in following way:

ca-setup:
  salt.state:
    - tgt: 'roles:ca'
    - tgt_type: grain
    - tag: ca/setup_event
    - highstate: True

wait-for-ca-setup:
  salt.wait_for_event:
    - name: ca/setup_event
    - timeout: 120
    - id_list:
      - ca

generate-sa-key:
  salt.state:
    - tgt: 'roles:ca'
    - tgt_type: grain
    - tag: ca/generate_sa_event
    - sls:
      - kubernetes-common.generate-serviceaccount-key

wait-for-generate-sa:
  salt.wait_for_event:
    - name: ca/generate_sa_event
    - timeout: 300
    - id_list:
      - ca

but it doesn't work as I expected.

@isbm Do you have maybe other proposal ?

mjura commented 5 years ago

After discussion with @ereslibre we agreed that default timeout 30 seconds can be littlebit too low for virtual environments. We would like increase it to 120 seconds.