Browse Source

cell_v2 multi-cell

- uses split-control-plane
- adds a new CellController role
  - nova-conductor, message rpc (not notifications) and db
- move nova dbsync from nova-api to nova-conductor
  - nova db is more tightly coupled to conductor/computes
  - we don't have a nova-api services on a CellController
  - super-conductor on Controller will sync cell0 db
- new 'magic' MysqlCellInternal endpoint
  - always refers the to local MysqlInternal endpoint
  - identical to MysqlInternal for regular deployment
  - but doesn't get overridden when inheriting EndpointMap from parent
    control-plane stack
- duplicate service node name hiera for transport_urls on cell stack
  - nova -> cell oslo messaging rpc nodes
  - neutron agent -> global messaging rpc nodes
- run cell host discovery only on default cell, for additional cells
the cell needs to be created first

bp tripleo-multicell-basic

Co-Authored-By: Martin Schuppert <mschuppert@redhat.com>

Change-Id: Ife9bf12d3a6011906fa8d9f97f7524b51aef906a
Depends-On: I79c1080605611c5c7748a28d2afcc9c7275a2e5d
Oliver Walsh 7 months ago
parent
commit
dc9a76aa23

+ 4
- 19
deployment/nova/nova-api-container-puppet.yaml View File

@@ -260,14 +260,7 @@ outputs:
260 260
         mysql:
261 261
           map_merge:
262 262
           - {get_attr: [NovaBase, role_data, service_config_settings, mysql]}
263
-          - nova::db::mysql::password: {get_param: NovaPassword}
264
-            nova::db::mysql::user: nova
265
-            nova::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
266
-            nova::db::mysql::dbname: nova
267
-            nova::db::mysql::allowed_hosts:
268
-              - '%'
269
-              - "%{hiera('mysql_bind_host')}"
270
-            nova::db::mysql_api::password: {get_param: NovaPassword}
263
+          - nova::db::mysql_api::password: {get_param: NovaPassword}
271 264
             nova::db::mysql_api::user: nova_api
272 265
             nova::db::mysql_api::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
273 266
             nova::db::mysql_api::dbname: nova_api
@@ -372,7 +365,7 @@ outputs:
372 365
           get_attr: [NovaApiLogging, docker_config, step_2]
373 366
         step_3:
374 367
           nova_api_db_sync:
375
-            start_order: 0
368
+            start_order: 0 # Runs before nova-conductor dbsync
376 369
             image: &nova_api_image {get_param: DockerNovaApiImage}
377 370
             net: host
378 371
             detach: false
@@ -386,7 +379,7 @@ outputs:
386 379
                   - /var/lib/config-data/nova/etc/nova/:/etc/nova/:ro
387 380
             command: "/usr/bin/bootstrap_host_exec nova_api su nova -s /bin/bash -c '/usr/bin/nova-manage api_db sync'"
388 381
           nova_api_map_cell0:
389
-            start_order: 1
382
+            start_order: 1 # Runs before nova-conductor dbsync
390 383
             image: *nova_api_image
391 384
             net: host
392 385
             detach: false
@@ -415,7 +408,7 @@ outputs:
415 408
                       - '?'
416 409
                       - '{query}'
417 410
           nova_api_ensure_default_cell:
418
-            start_order: 2
411
+            start_order: 2 # Runs before nova-conductor dbsync
419 412
             image: *nova_api_image
420 413
             net: host
421 414
             detach: false
@@ -427,14 +420,6 @@ outputs:
427 420
                   - /var/lib/docker-config-scripts/nova_api_ensure_default_cell.sh:/nova_api_ensure_default_cell.sh:ro
428 421
             user: root
429 422
             command: "/usr/bin/bootstrap_host_exec nova_api /nova_api_ensure_default_cell.sh"
430
-          nova_db_sync:
431
-            start_order: 3
432
-            image: *nova_api_image
433
-            net: host
434
-            detach: false
435
-            volumes: *nova_api_bootstrap_volumes
436
-            user: root
437
-            command: "/usr/bin/bootstrap_host_exec nova_api su nova -s /bin/bash -c '/usr/bin/nova-manage db sync'"
438 423
         step_4:
439 424
           nova_api:
440 425
             start_order: 2

+ 23
- 15
deployment/nova/nova-compute-container-puppet.yaml View File

@@ -248,6 +248,10 @@ parameters:
248 248
     description: >
249 249
       Setting this to a unique value will re-run any deployment tasks which
250 250
       perform configuration on a Heat stack-update.
251
+  NovaAdditionalCell:
252
+    default: false
253
+    description: Whether this is an cell additional to the default cell.
254
+    type: boolean
251 255
 
252 256
 resources:
253 257
 
@@ -331,6 +335,8 @@ conditions:
331 335
       -  equals: [{get_param: NovaLibvirtFileBackedMemory}, '']
332 336
       -  equals: [{get_param: NovaLibvirtFileBackedMemory}, 0]
333 337
 
338
+  is_not_additional_cell: {equals: [{get_param: NovaAdditionalCell}, false]}
339
+
334 340
 outputs:
335 341
   role_data:
336 342
     description: Role data for the Nova Compute service.
@@ -550,21 +556,23 @@ outputs:
550 556
                 -
551 557
                   - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
552 558
         step_5:
553
-          nova_cellv2_discover_hosts:
554
-            start_order: 0
555
-            image: *nova_compute_image
556
-            net: host
557
-            detach: false
558
-            volumes:
559
-              list_concat:
560
-                - {get_attr: [ContainersCommon, volumes]}
561
-                -
562
-                  - /var/lib/config-data/nova_libvirt/etc/my.cnf.d/:/etc/my.cnf.d/:ro
563
-                  - /var/lib/config-data/nova_libvirt/etc/nova/:/etc/nova/:ro
564
-                  - /var/log/containers/nova:/var/log/nova
565
-                  - /var/lib/docker-config-scripts/:/docker-config-scripts/
566
-            user: root
567
-            command: "/docker-config-scripts/pyshim.sh /docker-config-scripts/nova_cell_v2_discover_host.py"
559
+          if:
560
+            - is_not_additional_cell
561
+            - nova_cellv2_discover_hosts:
562
+                start_order: 0
563
+                image: *nova_compute_image
564
+                net: host
565
+                detach: false
566
+                volumes:
567
+                  list_concat:
568
+                    - {get_attr: [ContainersCommon, volumes]}
569
+                    -
570
+                      - /var/lib/config-data/nova_libvirt/etc/nova/:/etc/nova/:ro
571
+                      - /var/log/containers/nova:/var/log/nova
572
+                      - /var/lib/docker-config-scripts/:/docker-config-scripts/
573
+                user: root
574
+                command: "/docker-config-scripts/pyshim.sh /docker-config-scripts/nova_cell_v2_discover_host.py"
575
+            - {}
568 576
       host_prep_tasks:
569 577
         list_concat:
570 578
         - {get_attr: [NovaLogging, host_prep_tasks]}

+ 33
- 9
deployment/nova/nova-conductor-container-puppet.yaml View File

@@ -56,6 +56,10 @@ parameters:
56 56
     type: string
57 57
     description: Nova Compute upgrade level
58 58
     default: ''
59
+  NovaPassword:
60
+    description: The password for the nova service and db account
61
+    type: string
62
+    hidden: true
59 63
 
60 64
 conditions:
61 65
   nova_workers_zero: {equals : [{get_param: NovaWorkers}, 0]}
@@ -104,6 +108,16 @@ outputs:
104 108
             - nova
105 109
           tripleo_fluentd_sources_nova_conductor:
106 110
             - {get_param: NovaConductorLoggingSource}
111
+        mysql:
112
+          map_merge:
113
+          - {get_attr: [NovaBase, role_data, service_config_settings, mysql]}
114
+          - nova::db::mysql::password: {get_param: NovaPassword}
115
+            nova::db::mysql::user: nova
116
+            nova::db::mysql::host: {get_param: [EndpointMap, MysqlCellInternal, host_nobrackets]}
117
+            nova::db::mysql::dbname: nova
118
+            nova::db::mysql::allowed_hosts:
119
+              - '%'
120
+              - "%{hiera('mysql_bind_host')}"
107 121
       # BEGIN DOCKER SETTINGS
108 122
       puppet_config:
109 123
         config_volume: nova
@@ -131,21 +145,31 @@ outputs:
131 145
               owner: nova:nova
132 146
               recurse: true
133 147
       docker_config:
148
+        step_2:
149
+          get_attr: [NovaLogging, docker_config, step_2]
150
+        step_3:
151
+          nova_db_sync:
152
+            image: &nova_conductor_image {get_param: DockerNovaConductorImage}
153
+            start_order: 3 # Runs after nova-api tasks if installed on this host
154
+            net: host
155
+            detach: false
156
+            volumes: &nova_conductor_bootstrap_volumes
157
+              list_concat:
158
+                - {get_attr: [ContainersCommon, volumes]}
159
+                - {get_attr: [NovaLogging, volumes]}
160
+                -
161
+                  - /var/lib/config-data/nova/etc/my.cnf.d/tripleo.cnf:/etc/my.cnf.d/tripleo.cnf:ro
162
+                  - /var/lib/config-data/nova/etc/nova/:/etc/nova/:ro
163
+            user: root
164
+            command: "/usr/bin/bootstrap_host_exec nova_conductor su nova -s /bin/bash -c '/usr/bin/nova-manage db sync'"
134 165
         step_4:
135 166
           nova_conductor:
136
-            image: {get_param: DockerNovaConductorImage}
167
+            image: *nova_conductor_image
137 168
             net: host
138 169
             privileged: false
139 170
             restart: always
140 171
             healthcheck:
141
-              test:
142
-                list_join:
143
-                  - ' '
144
-                  - - '/openstack/healthcheck'
145
-                    - yaql:
146
-                        expression: str($.data.port)
147
-                        data:
148
-                          port: {get_attr: [NovaBase, role_data, config_settings, 'nova::rabbit_port']}
172
+              test: /openstack/healthcheck
149 173
             volumes:
150 174
               list_concat:
151 175
                 - {get_attr: [ContainersCommon, volumes]}

+ 1
- 2
deployment/nova/nova-scheduler-container-puppet.yaml View File

@@ -117,8 +117,7 @@ outputs:
117 117
         map_merge:
118 118
           - {get_attr: [NovaBase, role_data, config_settings]}
119 119
           - {get_attr: [NovaLogging, config_settings]}
120
-          - nova::ram_allocation_ratio: '1.0'
121
-            nova::scheduler::filter::scheduler_available_filters: {get_param: NovaSchedulerAvailableFilters}
120
+          - nova::scheduler::filter::scheduler_available_filters: {get_param: NovaSchedulerAvailableFilters}
122 121
             nova::scheduler::filter::scheduler_default_filters: {get_param: NovaSchedulerDefaultFilters}
123 122
             nova::scheduler::filter::scheduler_max_attempts: {get_param: NovaSchedulerMaxAttempts}
124 123
             nova::scheduler::discover_hosts_in_cells_interval: {get_param: NovaSchedulerDiscoverHostsInCellsInterval}

+ 20
- 5
network/ports/net_ip_list_map.j2.yaml View File

@@ -25,7 +25,13 @@ parameters:
25 25
   NetworkHostnameMap:
26 26
     default: []
27 27
     type: json
28
+  NovaAdditionalCell:
29
+    default: false
30
+    description: Whether this is an cell additional to the default cell.
31
+    type: boolean
28 32
 
33
+conditions:
34
+  is_cell: {equals: [{get_param: NovaAdditionalCell}, true]}
29 35
 
30 36
 resources:
31 37
    # This adds the extra "services" on for keystone
@@ -123,11 +129,20 @@ outputs:
123 129
               map:
124 130
                 map_replace:
125 131
                   - map_merge:
126
-                      repeat:
127
-                        template:
128
-                          SERVICE_node_names: SERVICE_network
129
-                        for_each:
130
-                          SERVICE: {get_attr: [EnabledServicesValue, value]}
132
+                      if:
133
+                        - is_cell
134
+                        -
135
+                          repeat:
136
+                            template:
137
+                              SERVICE_cell_node_names: SERVICE_network
138
+                            for_each:
139
+                              SERVICE: {get_attr: [EnabledServicesValue, value]}
140
+                        -
141
+                          repeat:
142
+                            template:
143
+                              SERVICE_node_names: SERVICE_network
144
+                            for_each:
145
+                              SERVICE: {get_attr: [EnabledServicesValue, value]}
131 146
                   - values: {get_param: ServiceNetMap}
132 147
         - values: {get_param: NetworkHostnameMap}
133 148
   short_service_hostnames:

+ 1
- 0
overcloud.j2.yaml View File

@@ -390,6 +390,7 @@ resources:
390 390
         map_merge:
391 391
           - {get_attr: [EndpointMap, endpoint_map]}
392 392
           - {get_param: EndpointMapOverride}
393
+          - MysqlCellInternal: {get_attr: [EndpointMap, endpoint_map, MysqlInternal]}
393 394
 
394 395
   SshKnownHostsConfig:
395 396
     type: OS::TripleO::Ssh::KnownHostsConfig

+ 8
- 2
puppet/services/nova-base.yaml View File

@@ -217,6 +217,10 @@ parameters:
217 217
         Messaging client subscriber parameter to specify
218 218
         an SSL connection to the messaging host.
219 219
     type: string
220
+  NovaAdditionalCell:
221
+    default: false
222
+    description: Whether this is an cell additional to the default cell.
223
+    type: boolean
220 224
 
221 225
 conditions:
222 226
 
@@ -262,10 +266,10 @@ outputs:
262 266
           nova::placement::valid_interfaces: {get_param: NovaPlacementAPIInterface}
263 267
           nova::database_connection:
264 268
             make_url:
265
-              scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}
269
+              scheme: {get_param: [EndpointMap, MysqlCellInternal, protocol]}
266 270
               username: nova
267 271
               password: {get_param: NovaPassword}
268
-              host: {get_param: [EndpointMap, MysqlInternal, host]}
272
+              host: {get_param: [EndpointMap, MysqlCellInternal, host]}
269 273
               path: /nova
270 274
               query:
271 275
                 read_default_file: /etc/my.cnf.d/tripleo.cnf
@@ -348,6 +352,8 @@ outputs:
348 352
           nova::cron::purge_shadow_tables::verbose: {get_param: NovaCronPurgeShadowTablesVerbose}
349 353
           nova::cron::purge_shadow_tables::all_cells: {get_param: NovaCronPurgeShadowTablesAllCells}
350 354
           nova::compute::sync_power_state_interval: {get_param: NovaSyncPowerStateInterval}
355
+          nova::ram_allocation_ratio: '1.0'
356
+          nova_is_additional_cell: {get_param: NovaAdditionalCell}
351 357
         - get_attr: [RoleParametersValue, value]
352 358
         -
353 359
           if:

+ 56
- 0
roles/CellController.yaml View File

@@ -0,0 +1,56 @@
1
+###############################################################################
2
+# Role: CellController                                                        #
3
+###############################################################################
4
+- name: CellController
5
+  description: |
6
+    CellController role for the nova cell_v2 controler services
7
+  CountDefault: 1
8
+  tags:
9
+    - primary
10
+    - controller
11
+  networks:
12
+    - External
13
+    - InternalApi
14
+    - Storage
15
+    - StorageMgmt
16
+    - Tenant
17
+  # For systems with both IPv4 and IPv6, you may specify a gateway network for
18
+  # each, such as ['ControlPlane', 'External']
19
+  default_route_networks: ['External']
20
+  HostnameFormatDefault: '%stackname%-cellcontrol-%index%'
21
+  ServicesDefault:
22
+    - OS::TripleO::Services::Aide
23
+    - OS::TripleO::Services::AuditD
24
+    - OS::TripleO::Services::CACerts
25
+    - OS::TripleO::Services::CertmongerUser
26
+    - OS::TripleO::Services::Clustercheck
27
+    - OS::TripleO::Services::Collectd
28
+    - OS::TripleO::Services::Docker
29
+    - OS::TripleO::Services::Fluentd
30
+    - OS::TripleO::Services::HAproxy
31
+    - OS::TripleO::Services::Ipsec
32
+    - OS::TripleO::Services::Iscsid
33
+    - OS::TripleO::Services::Keepalived
34
+    - OS::TripleO::Services::Kernel
35
+    - OS::TripleO::Services::LoginDefs
36
+    - OS::TripleO::Services::MetricsQdr
37
+    - OS::TripleO::Services::MySQL
38
+    - OS::TripleO::Services::MySQLClient
39
+    - OS::TripleO::Services::NovaConductor
40
+    - OS::TripleO::Services::Ntp
41
+    - OS::TripleO::Services::ContainersLogrotateCrond
42
+    - OS::TripleO::Services::Pacemaker
43
+    - OS::TripleO::Services::OsloMessagingRpc
44
+    - OS::TripleO::Services::Rhsm
45
+    - OS::TripleO::Services::RsyslogSidecar
46
+    - OS::TripleO::Services::Securetty
47
+    - OS::TripleO::Services::SensuClient
48
+    - OS::TripleO::Services::SkydiveAgent
49
+    - OS::TripleO::Services::Snmp
50
+    - OS::TripleO::Services::Sshd
51
+    - OS::TripleO::Services::Timezone
52
+    - OS::TripleO::Services::TripleoFirewall
53
+    - OS::TripleO::Services::TripleoPackages
54
+    - OS::TripleO::Services::Tuned
55
+    - OS::TripleO::Services::Vpp
56
+    - OS::TripleO::Services::Ptp

Loading…
Cancel
Save