Reconcile docs/validation for some options

Some drivers were missing docs and/or validation for options that
they actually support.  This change:

adds launch-timeout to:
  metastatic docs and validation
  aws validation
  gce docs and validation
adds post-upload-hook to:
  aws validation
adds boot-timeout to:
  metastatic docs and validation
adds launch-retries to:
  metastatic docs and validation

Change-Id: Id3f4bb687c1b2c39a1feb926a50c46b23ae9df9a
This commit is contained in:
James E. Blair 2024-02-08 09:36:35 -08:00
parent 7abd12906f
commit f89b41f6ad
6 changed files with 79 additions and 0 deletions

View File

@ -80,6 +80,14 @@ section of the configuration.
image via SSH. If the timeout is exceeded, the node launch is
aborted and the instance deleted.
.. attr:: launch-timeout
:type: int seconds
:default: 3600
The time to wait from issuing the command to create a new instance
until that instance is reported as "active". If the timeout is
exceeded, the node launch is aborted and the instance deleted.
.. attr:: launch-retries
:default: 3

View File

@ -59,6 +59,28 @@ itself, which is "meta".
A unique name for this provider configuration.
.. attr:: boot-timeout
:type: int seconds
:default: 60
Once an instance is active, how long to try connecting to the
image via SSH. If the timeout is exceeded, the node launch is
aborted and the instance deleted.
.. attr:: launch-timeout
:type: int seconds
:default: 3600
The time to wait from issuing the command to create a new instance
until that instance is reported as "active". If the timeout is
exceeded, the node launch is aborted and the instance deleted.
.. attr:: launch-retries
:default: 3
The number of times to retry launching a node before considering
the job failed.
.. attr:: pools
:type: list

View File

@ -346,6 +346,7 @@ class AwsProviderConfig(ProviderConfig):
'diskimages': [provider_diskimages],
'hostname-format': str,
'boot-timeout': int,
'launch-timeout': int,
'launch-retries': int,
'object-storage': object_storage,
'image-format': v.Any('ova', 'vhd', 'vhdx', 'vmdk', 'raw'),
@ -354,6 +355,7 @@ class AwsProviderConfig(ProviderConfig):
'max-cores': int,
'max-ram': int,
'max-resources': {str: int},
'post-upload-hook': str,
})
return v.Schema(provider)

View File

@ -187,6 +187,7 @@ class GceProviderConfig(ProviderConfig):
v.Required('zone'): str,
'cloud-images': [provider_cloud_images],
'boot-timeout': int,
'launch-timeout': int,
'launch-retries': int,
'rate-limit': int,
})

View File

@ -145,6 +145,9 @@ class MetastaticProviderConfig(ProviderConfig):
provider = ProviderConfig.getCommonSchemaDict()
provider.update({
'boot-timeout': int,
'launch-timeout': int,
'launch-retries': int,
v.Required('pools'): [pool],
})
return v.Schema(provider)

View File

@ -82,6 +82,7 @@ providers:
rate: 0.001
port-cleanup-interval: 0
post-upload-hook: /usr/bin/upload-hook
launch-timeout: 1500
diskimages:
- name: trusty
pause: False
@ -211,6 +212,9 @@ providers:
driver: aws
region-name: us-east-2
profile-name: default
launch-timeout: 1500
launch-retries: 5
boot-timeout: 120
cloud-images:
- name: centos-ami
image-id: ami-cfdafaaa
@ -228,6 +232,45 @@ providers:
volume-type: gp2
volume-size: 80
- name: gce-uscentral1
driver: gce
project: nodepool-123456
region: us-central1
zone: us-central1-a
launch-timeout: 1500
launch-retries: 5
boot-timeout: 120
cloud-images:
- name: debian-stretch
image-project: debian-cloud
image-family: debian-9
username: zuul
key: ssh-rsa ...
pools:
- name: main
max-servers: 8
labels:
- name: debian-stretch
instance-type: f1-micro
cloud-image: debian-stretch
volume-type: standard
volume-size: 10
- name: meta-provider
driver: metastatic
launch-timeout: 1500
launch-retries: 5
boot-timeout: 120
pools:
- name: main
max-servers: 10
labels:
- name: small-node
backing-label: large-node
max-parallel-jobs: 2
grace-time: 600
- name: openshift-single-project
driver: openshiftpods
context: "/hostname:8443/developer"