From e097731339c111fb3752e07950c9a8c218a0a714 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 8 Feb 2024 09:40:41 -0800 Subject: [PATCH] Remove hostname-format option This option has not been used since at least the migratio to the statemachine framework. Change-Id: I7a0e928889f72606fcbba0c94c2d49fbb3ffe55f --- doc/source/openstack.rst | 8 -------- nodepool/driver/aws/config.py | 1 - nodepool/driver/openstack/config.py | 6 ------ releasenotes/notes/hostname-format-b773f6d0e8dd1933.yaml | 7 +++++++ 4 files changed, 7 insertions(+), 15 deletions(-) create mode 100644 releasenotes/notes/hostname-format-b773f6d0e8dd1933.yaml diff --git a/doc/source/openstack.rst b/doc/source/openstack.rst index 1b8069fb5..b7f64881b 100644 --- a/doc/source/openstack.rst +++ b/doc/source/openstack.rst @@ -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} diff --git a/nodepool/driver/aws/config.py b/nodepool/driver/aws/config.py index 617af89ff..bc9eff837 100644 --- a/nodepool/driver/aws/config.py +++ b/nodepool/driver/aws/config.py @@ -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, diff --git a/nodepool/driver/openstack/config.py b/nodepool/driver/openstack/config.py index 25985f962..543aab038 100644 --- a/nodepool/driver/openstack/config.py +++ b/nodepool/driver/openstack/config.py @@ -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, diff --git a/releasenotes/notes/hostname-format-b773f6d0e8dd1933.yaml b/releasenotes/notes/hostname-format-b773f6d0e8dd1933.yaml new file mode 100644 index 000000000..d62bb43b4 --- /dev/null +++ b/releasenotes/notes/hostname-format-b773f6d0e8dd1933.yaml @@ -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.