Browse Source

Nova base cleanups for hiera json hook

This patch resolves an issue with nova-base.yaml that prevents
it from working with the new heat hiera agent hook (which
uses Json instead of Yaml).

It updates the service so that we only set the upgrade level if it
is not an empty string.

Partial-bug: #1596373

Change-Id: I595f2e16c33a6f935c7ca8935fec445d19c7b8f3
tags/6.0.0.0b1
Dan Prince 2 years ago
parent
commit
8ab22a95da
1 changed files with 51 additions and 43 deletions
  1. 51
    43
      puppet/services/nova-base.yaml

+ 51
- 43
puppet/services/nova-base.yaml View File

@@ -1,4 +1,4 @@
1
-heat_template_version: 2016-04-08
1
+heat_template_version: 2016-10-14
2 2
 
3 3
 description: >
4 4
   OpenStack Nova base service. Shared for all Nova services.
@@ -66,6 +66,9 @@ parameters:
66 66
     type: string
67 67
     description: Nova Compute upgrade level
68 68
     default: ''
69
+conditions:
70
+
71
+  compute_upgrade_level_empty: {equals : [{get_param: UpgradeLevelNovaCompute}, '']}
69 72
 
70 73
 outputs:
71 74
   role_data:
@@ -73,45 +76,50 @@ outputs:
73 76
     value:
74 77
       service_name: nova_base
75 78
       config_settings:
76
-        nova::rabbit_password: {get_param: RabbitPassword}
77
-        nova::rabbit_userid: {get_param: RabbitUserName}
78
-        nova::rabbit_use_ssl: {get_param: RabbitClientUseSSL}
79
-        nova::rabbit_port: {get_param: RabbitClientPort}
80
-        nova::database_connection:
81
-          list_join:
82
-            - ''
83
-            - - {get_param: [EndpointMap, MysqlInternal, protocol]}
84
-              - '://nova:'
85
-              - {get_param: NovaPassword}
86
-              - '@'
87
-              - {get_param: [EndpointMap, MysqlInternal, host]}
88
-              - '/nova'
89
-        nova::api_database_connection:
90
-          list_join:
91
-            - ''
92
-            - - {get_param: [EndpointMap, MysqlInternal, protocol]}
93
-              - '://nova_api:'
94
-              - {get_param: NovaPassword}
95
-              - '@'
96
-              - {get_param: [EndpointMap, MysqlInternal, host]}
97
-              - '/nova_api'
98
-        nova::debug: {get_param: Debug}
99
-        nova::purge_config: {get_param: EnableConfigPurge}
100
-        nova::network::neutron::neutron_project_name: 'service'
101
-        nova::network::neutron::neutron_username: 'neutron'
102
-        nova::network::neutron::dhcp_domain: ''
103
-        nova::network::neutron::neutron_password: {get_param: NeutronPassword}
104
-        nova::network::neutron::neutron_url: {get_param: [EndpointMap, NeutronInternal, uri]}
105
-        nova::network::neutron::neutron_auth_url: {get_param: [EndpointMap, KeystoneV3Admin, uri]}
106
-        nova::rabbit_heartbeat_timeout_threshold: 60
107
-        nova::cinder_catalog_info: 'volumev2:cinderv2:internalURL'
108
-        nova::host: '"%{::fqdn}"'    # NOTE: extra quoting is needed.
109
-        nova::notify_on_state_change: 'vm_and_task_state'
110
-        nova::notification_driver: messagingv2
111
-        nova::network::neutron::neutron_auth_type: 'v3password'
112
-        nova::db::database_db_max_retries: -1
113
-        nova::db::database_max_retries: -1
114
-        nova::glance_api_servers: {get_param: [EndpointMap, GlanceInternal, uri]}
115
-        nova::use_ipv6: {get_param: NovaIPv6}
116
-        nova::upgrade_level_compute: {get_param: UpgradeLevelNovaCompute}
117
-        nova::network::neutron::neutron_ovs_bridge: {get_param: NovaOVSBridge}
79
+        map_merge:
80
+        - nova::rabbit_password: {get_param: RabbitPassword}
81
+          nova::rabbit_userid: {get_param: RabbitUserName}
82
+          nova::rabbit_use_ssl: {get_param: RabbitClientUseSSL}
83
+          nova::rabbit_port: {get_param: RabbitClientPort}
84
+          nova::database_connection:
85
+            list_join:
86
+              - ''
87
+              - - {get_param: [EndpointMap, MysqlInternal, protocol]}
88
+                - '://nova:'
89
+                - {get_param: NovaPassword}
90
+                - '@'
91
+                - {get_param: [EndpointMap, MysqlInternal, host]}
92
+                - '/nova'
93
+          nova::api_database_connection:
94
+            list_join:
95
+              - ''
96
+              - - {get_param: [EndpointMap, MysqlInternal, protocol]}
97
+                - '://nova_api:'
98
+                - {get_param: NovaPassword}
99
+                - '@'
100
+                - {get_param: [EndpointMap, MysqlInternal, host]}
101
+                - '/nova_api'
102
+          nova::debug: {get_param: Debug}
103
+          nova::purge_config: {get_param: EnableConfigPurge}
104
+          nova::network::neutron::neutron_project_name: 'service'
105
+          nova::network::neutron::neutron_username: 'neutron'
106
+          nova::network::neutron::dhcp_domain: ''
107
+          nova::network::neutron::neutron_password: {get_param: NeutronPassword}
108
+          nova::network::neutron::neutron_url: {get_param: [EndpointMap, NeutronInternal, uri]}
109
+          nova::network::neutron::neutron_auth_url: {get_param: [EndpointMap, KeystoneV3Admin, uri]}
110
+          nova::rabbit_heartbeat_timeout_threshold: 60
111
+          nova::cinder_catalog_info: 'volumev2:cinderv2:internalURL'
112
+          nova::host: '"%{::fqdn}"'    # NOTE: extra quoting is needed.
113
+          nova::notify_on_state_change: 'vm_and_task_state'
114
+          nova::notification_driver: messagingv2
115
+          nova::network::neutron::neutron_auth_type: 'v3password'
116
+          nova::db::database_db_max_retries: -1
117
+          nova::db::database_max_retries: -1
118
+          nova::glance_api_servers: {get_param: [EndpointMap, GlanceInternal, uri]}
119
+          nova::use_ipv6: {get_param: NovaIPv6}
120
+          nova::network::neutron::neutron_ovs_bridge: {get_param: NovaOVSBridge}
121
+        - 
122
+          if:
123
+          - compute_upgrade_level_empty
124
+          - {}
125
+          - nova::upgrade_level_compute: {get_param: UpgradeLevelNovaCompute}

Loading…
Cancel
Save