Browse Source

Add auth_token_lifetime to undercloud.conf

The undercloud currently defines the auth token life time in the
undercloud.yaml environment in tripleo-heat-templates. At certain scale,
it makes sense to increase this so we should make it a top level
configuration item.

Change-Id: Ibf917826a2d6b2662215c58c9dd8ec8007e57881
(cherry picked from commit 438e53ad4e)
changes/24/777324/1
Alex Schultz 6 months ago
parent
commit
bb64cf4455
  1. 6
      releasenotes/notes/undercloud-auth-token-expiration-configuration-6159d733f09e1b6e.yaml
  2. 7
      tripleoclient/config/undercloud.py
  3. 2
      tripleoclient/tests/config/test_config_undercloud.py
  4. 1
      tripleoclient/v1/undercloud_config.py

6
releasenotes/notes/undercloud-auth-token-expiration-configuration-6159d733f09e1b6e.yaml

@ -0,0 +1,6 @@
---
features:
- |
Adds `auth_token_lifetime` to undercloud.conf with a default of 14400. This
configuration option exposes the keystone token expirataion as a top level
configuration since it may need to be increased to handle larger clouds.

7
tripleoclient/config/undercloud.py

@ -374,6 +374,13 @@ class UndercloudConfig(StandaloneConfig):
help=(_('Ironic network interface implementation to '
'use by default.'))
),
cfg.StrOpt('auth_token_lifetime',
default=14400,
help=(_(
'Authentication token expiration time in '
'seconds. Note reducing this can have impacts on '
'long running undercloud processes.'))
),
]
return self.sort_opts(_base_opts + _opts)

2
tripleoclient/tests/config/test_config_undercloud.py

@ -26,6 +26,7 @@ class TestUndercloudConfig(base.TestCase):
def test_get_base_opts(self):
ret = self.config.get_base_opts()
expected = ['additional_architectures',
'auth_token_lifetime',
'certificate_generation_ca',
'clean_nodes',
'cleanup',
@ -84,6 +85,7 @@ class TestUndercloudConfig(base.TestCase):
def test_get_opts(self):
ret = self.config.get_opts()
expected = ['additional_architectures',
'auth_token_lifetime',
'certificate_generation_ca',
'clean_nodes',
'cleanup',

1
tripleoclient/v1/undercloud_config.py

@ -73,6 +73,7 @@ PARAMETER_MAPPING = {
'local_subnet': 'UndercloudCtlplaneLocalSubnet',
'enable_routed_networks': 'UndercloudEnableRoutedNetworks',
'local_interface': 'NeutronPublicInterface',
'auth_token_lifetime': 'TokenExpiration',
}
SUBNET_PARAMETER_MAPPING = {

Loading…
Cancel
Save