Make nova server user_data format configurable
Nova server property user_data_format default equals to HEAT_CFNTOOLS since resource creation, so there's time to move on - this format currently still used, but by no means all. So add config option to easier changing default user_data_format for flexible configuration of desired heat behaviour. Now for specifying user_data_format default value, need just set config option default_user_data_format equals to HEAT_CFNTOOLS/RAW/SOFTWARE_CONFIG (underline as necessary) in default section of heat config file. Change-Id: Iabfd07a893282245cdd8a4a0afc26e9401f44c96 Closes-bug: #1629336
This commit is contained in:
parent
b51e9dd03e
commit
74dde021c8
|
@ -230,6 +230,19 @@ engine_opts = [
|
|||
'credentials. ZAQAR_SIGNAL will create a dedicated '
|
||||
'zaqar queue to be signaled using the provided keystone '
|
||||
'credentials.')),
|
||||
cfg.StrOpt('default_user_data_format',
|
||||
choices=['HEAT_CFNTOOLS',
|
||||
'RAW',
|
||||
'SOFTWARE_CONFIG'],
|
||||
default='HEAT_CFNTOOLS',
|
||||
help=_('Template default for how the user_data should be '
|
||||
'formatted for the server. For HEAT_CFNTOOLS, the '
|
||||
'user_data is bundled as part of the heat-cfntools '
|
||||
'cloud-init boot configuration data. For RAW the '
|
||||
'user_data is passed to Nova unmodified. For '
|
||||
'SOFTWARE_CONFIG user_data is bundled as part of the '
|
||||
'software config data, and metadata is derived from any '
|
||||
'associated SoftwareDeployment resources.')),
|
||||
cfg.ListOpt('hidden_stack_tags',
|
||||
default=['data-processing-cluster'],
|
||||
help=_('Stacks containing these tag names will be hidden. '
|
||||
|
|
|
@ -38,6 +38,7 @@ from heat.engine import translation
|
|||
from heat.rpc import api as rpc_api
|
||||
|
||||
cfg.CONF.import_opt('default_software_config_transport', 'heat.common.config')
|
||||
cfg.CONF.import_opt('default_user_data_format', 'heat.common.config')
|
||||
cfg.CONF.import_opt('max_server_name_length', 'heat.common.config')
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -444,7 +445,7 @@ class Server(stack_user.StackUser, sh.SchedulerHintsMixin,
|
|||
'For SOFTWARE_CONFIG user_data is bundled as part of the '
|
||||
'software config data, and metadata is derived from any '
|
||||
'associated SoftwareDeployment resources.'),
|
||||
default=HEAT_CFNTOOLS,
|
||||
default=cfg.CONF.default_user_data_format,
|
||||
constraints=[
|
||||
constraints.AllowedValues(_SOFTWARE_CONFIG_FORMATS),
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue