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 image via SSH. If the timeout is exceeded, the node launch is
aborted and the instance deleted. 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 .. attr:: launch-retries
:default: 3 :default: 3

View File

@ -59,6 +59,28 @@ itself, which is "meta".
A unique name for this provider configuration. 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 .. attr:: pools
:type: list :type: list

View File

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

View File

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

View File

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

View File

@ -82,6 +82,7 @@ providers:
rate: 0.001 rate: 0.001
port-cleanup-interval: 0 port-cleanup-interval: 0
post-upload-hook: /usr/bin/upload-hook post-upload-hook: /usr/bin/upload-hook
launch-timeout: 1500
diskimages: diskimages:
- name: trusty - name: trusty
pause: False pause: False
@ -211,6 +212,9 @@ providers:
driver: aws driver: aws
region-name: us-east-2 region-name: us-east-2
profile-name: default profile-name: default
launch-timeout: 1500
launch-retries: 5
boot-timeout: 120
cloud-images: cloud-images:
- name: centos-ami - name: centos-ami
image-id: ami-cfdafaaa image-id: ami-cfdafaaa
@ -228,6 +232,45 @@ providers:
volume-type: gp2 volume-type: gp2
volume-size: 80 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 - name: openshift-single-project
driver: openshiftpods driver: openshiftpods
context: "/hostname:8443/developer" context: "/hostname:8443/developer"