test-kitchen/kitchen-ec2

retryable_tries gets ignored

henryk-radoslaw-rychlik opened this issue · 2 comments

$ kitchen converge
-----> Starting Kitchen (v2.2.5)
-----> Creating <storm-supervisor-ubuntu-1804>...
       Detected platform: ubuntu version 1.2 on x86_64. Instance Type: ["m5.xlarge", "t3a.xlarge", "t3.xlarge", "m5a.xlarge", "t2.xlarge"]. Default username: ubuntu (default).
       Waited 0/60s for spot request <sir-spk1jgqg> to become fulfilled.
       Waited 5/60s for spot request <sir-spk1jgqg> to become fulfilled.
       Waited 10/60s for spot request <sir-spk1jgqg> to become fulfilled.
       Waited 15/60s for spot request <sir-spk1jgqg> to become fulfilled.
       Waited 20/60s for spot request <sir-spk1jgqg> to become fulfilled.
       Waited 25/60s for spot request <sir-spk1jgqg> to become fulfilled.
       Waited 30/60s for spot request <sir-spk1jgqg> to become fulfilled.
       Waited 35/60s for spot request <sir-spk1jgqg> to become fulfilled.
       Waited 40/60s for spot request <sir-spk1jgqg> to become fulfilled.
       Waited 45/60s for spot request <sir-spk1jgqg> to become fulfilled.
       Waited 50/60s for spot request <sir-spk1jgqg> to become fulfilled.
       Waited 55/60s for spot request <sir-spk1jgqg> to become fulfilled.
       Waited 0/60s for spot request <sir-5bq9kfcj> to become fulfilled.
       Waited 5/60s for spot request <sir-5bq9kfcj> to become fulfilled.
       Instance <i-09bc8f973704eabef> requested.

Despite the following in the kitchen file:

$ grep retry .kitchen.yml
  retryable_tries: 5
  retryable_sleep: 5

This seems to be in contradiction with the documentation:
retryable_tries

The retryable_tries propery allows you to set the number of retries to try when creating a new instance. Combines with retryable_sleep.

The default is 60.

Am I misunderstanding the documentation?

That particular code - the spot instance request code - has been rewritten. Current test kitchen (2.6.2) and current kitchen-ec2 (3.8.0) now use a different API call to run spot instances, and use retryable_tries and retryable_sleep differently. Try upgrading and see if the behavior is as you expect.

tas50 commented

Closing this out since we never heard back. If you're still having the issue using the latest Chef Workstation let us know.