From 2486af283c25289251401add2168f7e4f210b310 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur <divius.inside@gmail.com> Date: Wed, 6 Dec 2017 15:05:50 +0100 Subject: [PATCH] undercloud: set default_resource_class to 'baremetal' We already default to this value when enrolling nodes with our workflows, and when upgrading an undercloud to Pike. This change ensures that nodes enrolled outside of our workflows also default to 'baremetal'. A similar change to instack-undercloud is Iee8604a6a942c12e6fa6b9cb8ea88a2cee1ead8f Change-Id: I8c3c45810571a5d58d8d3c21561b96186d2ebbb2 Partial-Bug: #1732190 --- environments/undercloud.yaml | 1 + puppet/services/ironic-base.yaml | 48 ++++++++++++++++++++------------ 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/environments/undercloud.yaml b/environments/undercloud.yaml index cd50cdda4c..e15c2111fe 100644 --- a/environments/undercloud.yaml +++ b/environments/undercloud.yaml @@ -19,6 +19,7 @@ parameter_defaults: HeatConvergenceEngine: false HeatMaxResourcesPerStack: -1 HeatMaxJsonBodySize: 2097152 + IronicDefaultResourceClass: 'baremetal' IronicEnabledHardwareTypes: ['ipmi', 'redfish', 'idrac', 'ilo'] IronicEnabledBootInterfaces: ['pxe', 'ilo-pxe'] IronicEnabledConsoleInterfaces: ['ipmitool-socat', 'ilo', 'no-console'] diff --git a/puppet/services/ironic-base.yaml b/puppet/services/ironic-base.yaml index 28c7a73f3a..cd89da939c 100644 --- a/puppet/services/ironic-base.yaml +++ b/puppet/services/ironic-base.yaml @@ -40,6 +40,10 @@ parameters: type: string constraints: - allowed_values: [ '', 'true', 'True', 'TRUE', 'false', 'False', 'FALSE'] + IronicDefaultResourceClass: + default: '' + description: Default resource class to use for new nodes. + type: string IronicPassword: description: The password for the Ironic service and db account, used by the Ironic services type: string @@ -65,6 +69,7 @@ parameters: conditions: service_debug_unset: {equals : [{get_param: IronicDebug}, '']} + default_rsc_unset: {equals : [{get_param: IronicDefaultResourceClass}, '']} outputs: role_data: @@ -72,24 +77,31 @@ outputs: value: service_name: ironic_base config_settings: - ironic::database_connection: - make_url: - scheme: {get_param: [EndpointMap, MysqlInternal, protocol]} - username: ironic - password: {get_param: IronicPassword} - host: {get_param: [EndpointMap, MysqlInternal, host]} - path: /ironic - query: - read_default_file: /etc/my.cnf.d/tripleo.cnf - read_default_group: tripleo - ironic::debug: + map_merge: + - + ironic::database_connection: + make_url: + scheme: {get_param: [EndpointMap, MysqlInternal, protocol]} + username: ironic + password: {get_param: IronicPassword} + host: {get_param: [EndpointMap, MysqlInternal, host]} + path: /ironic + query: + read_default_file: /etc/my.cnf.d/tripleo.cnf + read_default_group: tripleo + ironic::debug: + if: + - service_debug_unset + - {get_param: Debug } + - {get_param: IronicDebug } + ironic::rabbit_userid: {get_param: RabbitUserName} + ironic::rabbit_password: {get_param: RabbitPassword} + ironic::rabbit_port: {get_param: RabbitClientPort} + ironic::rabbit_use_ssl: {get_param: RabbitClientUseSSL} + - if: - - service_debug_unset - - {get_param: Debug } - - {get_param: IronicDebug } - ironic::rabbit_userid: {get_param: RabbitUserName} - ironic::rabbit_password: {get_param: RabbitPassword} - ironic::rabbit_port: {get_param: RabbitClientPort} - ironic::rabbit_use_ssl: {get_param: RabbitClientUseSSL} + - default_rsc_unset + - {} + - ironic::default_resource_class: {get_param: IronicDefaultResourceClass} step_config: | include ::tripleo::profile::base::ironic