Merge "Remove hostname-format option"

This commit is contained in:
Zuul 2024-02-28 02:46:52 +00:00 committed by Gerrit Code Review
commit 8775e54e5d
4 changed files with 7 additions and 15 deletions

View File

@ -45,7 +45,6 @@ Selecting the OpenStack driver adds the following options to the
launch-timeout: 900
launch-retries: 3
image-name-format: '{image_name}-{timestamp}'
hostname-format: '{label.name}-{provider.name}-{node.id}'
post-upload-hook: /usr/bin/custom-hook
diskimages:
- name: trusty
@ -80,7 +79,6 @@ Selecting the OpenStack driver adds the following options to the
region-name: 'region1'
rate: 1.0
image-name-format: '{image_name}-{timestamp}'
hostname-format: '{label.name}-{provider.name}-{node.id}'
diskimages:
- name: precise
meta:
@ -156,12 +154,6 @@ Selecting the OpenStack driver adds the following options to the
The region name if the provider cloud has multiple regions.
.. attr:: hostname-format
:type: string
:default: {label.name}-{provider.name}-{node.id}
Hostname template to use for the spawned instance.
.. attr:: image-name-format
:type: string
:default: {image_name}-{timestamp}

View File

@ -344,7 +344,6 @@ class AwsProviderConfig(ProviderConfig):
'profile-name': str,
'cloud-images': [provider_cloud_images],
'diskimages': [provider_diskimages],
'hostname-format': str,
'boot-timeout': int,
'launch-timeout': int,
'launch-retries': int,

View File

@ -176,7 +176,6 @@ class OpenStackProviderConfig(ProviderConfig):
self.port_cleanup_interval = None
self.diskimages = {}
self.cloud_images = {}
self.hostname_format = None
self.image_name_format = None
self.post_upload_hook = None
super().__init__(provider)
@ -214,10 +213,6 @@ class OpenStackProviderConfig(ProviderConfig):
'port-cleanup-interval',
600
)
self.hostname_format = self.provider.get(
'hostname-format',
'{label.name}-{provider.name}-{node.id}'
)
self.image_name_format = self.provider.get(
'image-name-format',
'{image_name}-{timestamp}'
@ -348,7 +343,6 @@ class OpenStackProviderConfig(ProviderConfig):
'launch-retries': int,
'nodepool-id': str,
'rate': v.Coerce(float),
'hostname-format': str,
'image-name-format': str,
'clean-floating-ips': bool,
'port-cleanup-interval': int,

View File

@ -0,0 +1,7 @@
---
upgrade:
- |
The hostname-format option, previously available for the OpenStack
and AWS drivers, but unused for some time, has been removed.
Remove any uses of it from nodepool config files before upgrading;
otherwise they will fail config validation.