blob: 9acf16fb1340ed11afdaa8e73560dc82d283fa84 [file] [log] [blame]
Filip Pytloun4a72d792015-10-06 16:28:32 +02001
Aleš Komárek72152852017-04-11 13:48:48 +02002============
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03003Usage
Aleš Komárek72152852017-04-11 13:48:48 +02004============
Filip Pytloun4a72d792015-10-06 16:28:32 +02005
Jakub Pavlikfcf34f82016-05-20 09:35:51 +02006OpenStack Nova provides a cloud computing fabric controller, supporting a wide
7variety of virtualization technologies, including KVM, Xen, LXC, VMware, and
8more. In addition to its native API, it includes compatibility with the
9commonly encountered Amazon EC2 and S3 APIs.
Filip Pytloun4a72d792015-10-06 16:28:32 +020010
Aleš Komárek72152852017-04-11 13:48:48 +020011Sample Pillars
Filip Pytloun4a72d792015-10-06 16:28:32 +020012==============
13
14Controller nodes
15----------------
16
OlgaGusarenko9dd01c92018-07-31 00:49:30 +030017Nova services on the controller node:
Filip Pytloun4a72d792015-10-06 16:28:32 +020018
19.. code-block:: yaml
20
21 nova:
22 controller:
23 version: juno
24 enabled: true
25 security_group: true
Lachlan Evensonb72de502016-01-20 15:34:04 -080026 cpu_allocation_ratio: 8.0
27 ram_allocation_ratio: 1.0
Jiri Konecny9344a372016-03-21 19:25:48 +010028 disk_allocation_ratio: 1.0
Dmitry Stremkovskiy2bcba8d2017-07-30 21:43:59 +030029 cross_az_attach: false
Jiri Konecnyb5a80e42016-03-22 11:51:01 +010030 workers: 8
Jakub Pavlik617a8962016-09-04 18:50:06 +020031 report_interval: 60
Michel Nederlof8ff99332017-10-23 14:29:15 +020032 dhcp_domain: novalocal
Dzmitry Stremkouskife346fc2020-01-30 18:29:29 +010033 vif_plugging_timeout: 300
34 vif_plugging_is_fatal: false
35 instance_build_timeout: 600
36 use_cow_images: False
37 force_raw_images: True
38 snapshot_image_format: qcow2
39 images_type: default
Ivan Berezovskiy689e6ea2019-11-14 20:17:58 +040040 concurrency:
41 lock_path: '/var/lib/nova/tmp'
sgarbuzcc02c7f2018-10-25 14:29:30 +030042 consoleauth:
43 token_ttl: 600
Filip Pytloun4a72d792015-10-06 16:28:32 +020044 bind:
45 public_address: 10.0.0.122
46 public_name: openstack.domain.com
47 novncproxy_port: 6080
48 database:
49 engine: mysql
50 host: 127.0.0.1
51 port: 3306
52 name: nova
53 user: nova
54 password: pwd
55 identity:
56 engine: keystone
57 host: 127.0.0.1
58 port: 35357
59 user: nova
60 password: pwd
61 tenant: service
Dzmitry Stremkouski9f743222019-05-26 01:20:42 +020062 interface: internal
63 valid_interfaces:
64 - internal
Filip Pytloun4a72d792015-10-06 16:28:32 +020065 message_queue:
66 engine: rabbitmq
67 host: 127.0.0.1
68 port: 5672
69 user: openstack
70 password: pwd
71 virtual_host: '/openstack'
Oleh Hryhorovf5093b82018-10-17 11:16:08 +000072 pci:
73 alias:
74 alias1:
75 device_type: "type-PF"
76 name: "a1"
77 product_id: "154d"
78 vendor_id: "8086"
Filip Pytloun4a72d792015-10-06 16:28:32 +020079 network:
80 engine: neutron
81 host: 127.0.0.1
82 port: 9696
Jakub Pavlik617a8962016-09-04 18:50:06 +020083 extension_sync_interval: 600
Filip Pytloun4a72d792015-10-06 16:28:32 +020084 identity:
85 engine: keystone
86 host: 127.0.0.1
87 port: 35357
88 user: neutron
89 password: pwd
90 tenant: service
91 metadata:
92 password: password
Petr Michalecaa23dc02016-11-29 16:30:25 +010093 audit:
94 enabled: false
Simon Pasquier8683b7a2017-02-03 16:00:16 +010095 osapi_max_limit: 500
Oleg Iurchenko370c10d2017-10-19 14:03:37 +030096 barbican:
97 enabled: true
Filip Pytloun4a72d792015-10-06 16:28:32 +020098
OlgaGusarenko9dd01c92018-07-31 00:49:30 +030099Nova services from custom package repository:
Filip Pytloun4a72d792015-10-06 16:28:32 +0200100
101.. code-block:: yaml
102
103 nova:
104 controller:
105 version: juno
106 source:
107 engine: pkg
108 address: http://...
109 ....
110
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300111Client-side RabbitMQ HA setup:
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200112
113.. code-block:: yaml
114
115 nova:
116 controller:
117 ....
118 message_queue:
119 engine: rabbitmq
120 members:
121 - host: 10.0.16.1
122 - host: 10.0.16.2
123 - host: 10.0.16.3
124 user: openstack
125 password: pwd
126 virtual_host: '/openstack'
127 ....
128
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300129Enable auditing filter, i.e: CADF:
Petr Michalecaa23dc02016-11-29 16:30:25 +0100130
131.. code-block:: yaml
132
133 nova:
134 controller:
Simon Pasquier6a3c8f72016-12-19 15:37:24 +0100135 audit:
Petr Michalecaa23dc02016-11-29 16:30:25 +0100136 enabled: true
137 ....
138 filter_factory: 'keystonemiddleware.audit:filter_factory'
139 map_file: '/etc/pycadf/nova_api_audit_map.conf'
140 ....
141
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300142Enable CORS parameters:
Ondrej Smola25b53cb2017-04-28 10:56:19 +0200143
144.. code-block:: yaml
145
146 nova:
147 controller:
148 cors:
149 allowed_origin: https:localhost.local,http:localhost.local
150 expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
151 allow_methods: GET,PUT,POST,DELETE,PATCH
152 allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
153 allow_credentials: True
154 max_age: 86400
155
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300156Configuration of the ``policy.json`` file:
Dmitry Ukov3562a082017-05-04 00:00:48 +0400157
158.. code-block:: yaml
159
160 nova:
161 controller:
162 ....
163 policy:
164 context_is_admin: 'role:admin or role:administrator'
165 'compute:create': 'rule:admin_or_owner'
166 # Add key without value to remove line from policy.json
167 'compute:create:attach_network':
Ondrej Smola25b53cb2017-04-28 10:56:19 +0200168
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300169Enable Barbican integration:
Oleg Iurchenko370c10d2017-10-19 14:03:37 +0300170
171.. code-block:: yaml
172
173 nova:
174 controller:
175 ....
176 barbican:
177 enabled: true
178
Oleh Hryhorovf5093b82018-10-17 11:16:08 +0000179Define aliases for PCI devices:
180.. code-block:: yaml
181
182 nova:
183 controller:
184 ...
185 pci:
186 alias:
187 alias1:
188 device_type: "type-PF"
189 name: "a1"
190 product_id: "154d"
191 vendor_id: "8086"
192
Jiri Broulik789179a2018-02-13 16:16:46 +0100193Enable cells update:
194
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300195.. note:: Useful when upgrading Openstack. To update cells to test
196 sync db agains duplicated production database.
Jiri Broulik789179a2018-02-13 16:16:46 +0100197
198.. code-block:: yaml
199
200 nova:
201 controller:
202 update_cells: true
203
Dzmitry Stremkouskif8497672019-11-03 10:36:46 +0100204Increase number of chunks for online db migrations:
205
206.. note:: This only should be done in offline as large number of
207 rows locked by this process may cause service outage, which
208 may not be expected.
209
210.. code-block:: yaml
211
212 nova:
213 controller:
214 db_migrations:
215 max_count: 5000000
Kirill Bespalov64617172017-07-11 14:43:14 +0300216
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300217Configuring TLS communications
218------------------------------
Kirill Bespalov64617172017-07-11 14:43:14 +0300219
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300220.. note:: By default system wide installed CA certs are used,
221 so ``cacert_file`` param is optional, as well as ``cacert``.
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300222
223- **RabbitMQ TLS**
Kirill Bespalov64617172017-07-11 14:43:14 +0300224
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300225 .. code-block:: yaml
Kirill Bespalov64617172017-07-11 14:43:14 +0300226
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300227 nova:
228 compute:
229 message_queue:
230 port: 5671
231 ssl:
232 enabled: True
233 (optional) cacert: cert body if the cacert_file does not exists
234 (optional) cacert_file: /etc/openstack/rabbitmq-ca.pem
235 (optional) version: TLSv1_2
Kirill Bespalov64617172017-07-11 14:43:14 +0300236
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300237- **MySQL TLS**
Kirill Bespalov64617172017-07-11 14:43:14 +0300238
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300239 .. code-block:: yaml
Kirill Bespalov64617172017-07-11 14:43:14 +0300240
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300241 nova:
242 controller:
243 database:
244 ssl:
245 enabled: True
246 (optional) cacert: cert body if the cacert_file does not exists
247 (optional) cacert_file: /etc/openstack/mysql-ca.pem
Kirill Bespalov64617172017-07-11 14:43:14 +0300248
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300249- **Openstack HTTPS API**
250
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300251 Set the ``https`` as protocol at ``nova:compute`` and
252 ``nova:controller`` sections :
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300253
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300254 .. code-block:: yaml
Kirill Bespalov64617172017-07-11 14:43:14 +0300255
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300256 nova:
257 controller :
258 identity:
259 protocol: https
260 (optional) cacert_file: /etc/openstack/proxy.pem
261 network:
262 protocol: https
263 (optional) cacert_file: /etc/openstack/proxy.pem
264 glance:
265 protocol: https
266 (optional) cacert_file: /etc/openstack/proxy.pem
Kirill Bespalov64617172017-07-11 14:43:14 +0300267
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300268 .. code-block:: yaml
Kirill Bespalov64617172017-07-11 14:43:14 +0300269
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300270 nova:
271 compute:
272 identity:
273 protocol: https
274 (optional) cacert_file: /etc/openstack/proxy.pem
275 network:
276 protocol: https
277 (optional) cacert_file: /etc/openstack/proxy.pem
278 image:
279 protocol: https
280 (optional) cacert_file: /etc/openstack/proxy.pem
281 ironic:
282 protocol: https
283 (optional) cacert_file: /etc/openstack/proxy.pem
Kirill Bespalov64617172017-07-11 14:43:14 +0300284
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300285.. note:: Barbican, Cinder, and placement url endpoints are discovering
286 using service catalog.
Kirill Bespalov64617172017-07-11 14:43:14 +0300287
Martin Polreichdbf4f142019-12-17 14:19:44 +0100288Change default service policy configuration:
289--------------------------------------------
290
291.. code-block:: yaml
292
293 nova:
294 controller:
295 policy:
296 'context_is_admin': 'role:admin or role:administrator'
297 'compute:create': 'rule:admin_or_owner'
298 # Add key without value to remove line from policy.json
299 'compute:create:attach_network':
300
301
Filip Pytloun4a72d792015-10-06 16:28:32 +0200302Compute nodes
303-------------
304
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300305Nova controller services on compute node:
Filip Pytloun4a72d792015-10-06 16:28:32 +0200306
307.. code-block:: yaml
308
309 nova:
310 compute:
311 version: juno
312 enabled: true
Dmitry Stremkovskiy2bcba8d2017-07-30 21:43:59 +0300313 cross_az_attach: false
Dmitry Stremkovskiy35e53b72017-07-29 12:50:39 +0300314 disk_cachemodes: network=writeback,block=none
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100315 availability_zone: availability_zone_01
Damian Szelugae1922412017-04-18 16:36:46 +0200316 aggregates:
317 - hosts_with_fc
318 - hosts_with_ssd
Filip Pytloun4a72d792015-10-06 16:28:32 +0200319 security_group: true
Petr Michalecf03e4882017-04-10 10:26:18 +0200320 resume_guests_state_on_host_boot: False
Michael Polenchuk159c2542018-06-09 15:31:51 +0400321 preallocate_images: space # Default is 'none'
Dmitry Stremkovskiy8a0ff512017-07-25 20:54:13 +0300322 my_ip: 10.1.0.16
Ivan Berezovskiy689e6ea2019-11-14 20:17:58 +0400323 concurrency:
324 lock_path: '/var/lib/nova/tmp'
Filip Pytloun4a72d792015-10-06 16:28:32 +0200325 bind:
326 vnc_address: 172.20.0.100
327 vnc_port: 6080
328 vnc_name: openstack.domain.com
329 vnc_protocol: http
330 database:
331 engine: mysql
332 host: 127.0.0.1
333 port: 3306
334 name: nova
335 user: nova
336 password: pwd
337 identity:
338 engine: keystone
339 host: 127.0.0.1
340 port: 35357
341 user: nova
342 password: pwd
343 tenant: service
344 message_queue:
345 engine: rabbitmq
346 host: 127.0.0.1
347 port: 5672
348 user: openstack
349 password: pwd
350 virtual_host: '/openstack'
351 image:
352 engine: glance
353 host: 127.0.0.1
354 port: 9292
Oleh Hryhorovf5093b82018-10-17 11:16:08 +0000355 pci:
356 alias:
357 alias1:
358 device_type: "type-PF"
359 name: "a1"
360 product_id: "154d"
361 vendor_id: "8086"
Filip Pytloun4a72d792015-10-06 16:28:32 +0200362 network:
363 engine: neutron
364 host: 127.0.0.1
365 port: 9696
366 identity:
367 engine: keystone
368 host: 127.0.0.1
369 port: 35357
370 user: neutron
371 password: pwd
372 tenant: service
373 qemu:
374 max_files: 4096
375 max_processes: 4096
Dmitry Stremkovskiy96281f52017-07-26 00:39:22 +0300376 host: node-12.domain.tld
Filip Pytloun4a72d792015-10-06 16:28:32 +0200377
Vasyl Saienkocab3a902018-07-12 13:17:17 +0300378Compute with vmware driver. Each vmware cluster requires a separate process of nova-compute.
379Each process should have uniq host identifier. However multiple computes might be running on
380single host. It is not recommended to have multiple computes running on different hosts that
381manage the same vmware cluster. To achive this pacemaker/corosync or keepalived might be used.
382
383.. code-block:: yaml
384
385 nova:
386 compute:
387 compute_driver: vmwareapi.VMwareVCDriver
388 vmware:
389 host_username: vmware
390 host_password: vmware
391 cluster_name: vmware_cluster01
392 host_ip: 1.2.3.4
393
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300394Group and user to be used for QEMU processes run by the system instance:
kkalynovskyif50f0c02017-12-12 17:52:57 +0200395
396.. code-block:: yaml
397
398 nova:
399 compute:
400 enabled: true
401 ...
402 qemu:
403 user: nova
404 group: cinder
405 dynamic_ownership: 1
406
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300407Group membership for user nova (upgrade related):
Dmitry Stremkovskiy3cd6ba82017-07-25 17:15:36 +0300408
409.. code-block:: yaml
410
411 nova:
412 compute:
413 enabled: true
414 ...
415 user:
416 groups:
417 - libvirt
Filip Pytloun4a72d792015-10-06 16:28:32 +0200418
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300419Nova services on compute node with OpenContrail:
Filip Pytloun4a72d792015-10-06 16:28:32 +0200420
421.. code-block:: yaml
422
423 nova:
424 compute:
425 enabled: true
426 ...
427 networking: contrail
428
Oleksandr Bryndziibb8abfe2018-09-28 22:21:43 +0000429Nova services on compute node with memcached caching and security strategy:
Filip Pytloun4a72d792015-10-06 16:28:32 +0200430
431.. code-block:: yaml
432
433 nova:
434 compute:
435 enabled: true
436 ...
437 cache:
438 engine: memcached
439 members:
440 - host: 127.0.0.1
441 port: 11211
442 - host: 127.0.0.1
443 port: 11211
Oleksandr Bryndziibb8abfe2018-09-28 22:21:43 +0000444 security:
445 enabled: true
446 strategy: ENCRYPT
447 secret_key: secret
Filip Pytloun4a72d792015-10-06 16:28:32 +0200448
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300449Client-side RabbitMQ HA setup:
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200450
451.. code-block:: yaml
452
453 nova:
Kirill Bespalov64617172017-07-11 14:43:14 +0300454 compute:
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200455 ....
456 message_queue:
457 engine: rabbitmq
458 members:
459 - host: 10.0.16.1
460 - host: 10.0.16.2
461 - host: 10.0.16.3
462 user: openstack
463 password: pwd
464 virtual_host: '/openstack'
465 ....
466
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300467Nova with ephemeral configured with Ceph:
maxstack39e6aca2016-05-04 13:50:13 +0000468
469.. code-block:: yaml
470
471 nova:
472 compute:
473 enabled: true
474 ...
475 ceph:
476 ephemeral: yes
477 rbd_pool: nova
478 rbd_user: nova
479 secret_uuid: 03006edd-d957-40a3-ac4c-26cd254b3731
Kalynovskyi0bc79692017-07-21 16:22:09 +0300480 ....
maxstack39e6aca2016-05-04 13:50:13 +0000481
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300482Nova with ephemeral configured with LVM:
Kalynovskyi0bc79692017-07-21 16:22:09 +0300483
484.. code-block:: yaml
485
486 nova:
487 compute:
488 enabled: true
489 ...
490 lvm:
491 ephemeral: yes
492 images_volume_group: nova_vg
493
494 linux:
495 storage:
496 lvm:
497 nova_vg:
498 name: nova_vg
499 devices:
500 - /dev/sdf
501 - /dev/sdd
502 - /dev/sdg
503 - /dev/sde
504 - /dev/sdc
505 - /dev/sdj
506 - /dev/sdh
maxstack39e6aca2016-05-04 13:50:13 +0000507
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300508Enable Barbican integration:
Oleg Iurchenko370c10d2017-10-19 14:03:37 +0300509
510.. code-block:: yaml
511
512 nova:
513 compute:
514 ....
515 barbican:
516 enabled: true
517
Oleh Hryhorovf5093b82018-10-17 11:16:08 +0000518Define aliases for PCI devices:
519.. code-block:: yaml
520
521 nova:
522 compute:
523 ...
524 pci:
525 alias:
526 alias1:
527 device_type: "type-PF"
528 name: "a1"
529 product_id: "154d"
530 vendor_id: "8086"
531
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300532Nova metadata custom bindings:
Vasyl Saienko2d591282018-02-05 14:19:02 +0200533
534.. code-block:: yaml
535
536 nova:
537 controller:
538 enabled: true
539 ...
540 metadata:
541 bind:
542 address: 1.2.3.4
543 port: 8776
544
Oleh Hryhorov08482aa2018-11-19 14:07:47 +0200545Define multipath for nova compute:
546
547.. code-block:: yaml
548
549 nova:
550 compute:
551 ....
552 libvirt:
553 volume_use_multipath: True
554
Oleh Hryhorov5add3b22019-03-06 17:00:00 +0000555To disable or enable StrictHostKeyChecking and discover
556compute nodes fingerprints the below pillar should be used:
557
558.. code-block:: yaml
559
560 nova:
561 compute:
562 ....
563 openssh:
564 stricthostkeychecking: True
565 discover_compute_hosts: True
566
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100567Client role
568-----------
569
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300570Nova configured with NFS:
Dmitry Stremkovskiy665c7282017-07-05 17:36:27 +0300571
572.. code-block:: yaml
573
574 nova:
575 compute:
576 instances_path: /mnt/nova/instances
577
578 linux:
579 storage:
580 enabled: true
581 mount:
582 nfs_nova:
583 enabled: true
584 path: ${nova:compute:instances_path}
585 device: 172.31.35.145:/data
586 file_system: nfs
587 opts: rw,vers=3
588
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300589Nova flavors:
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100590
591.. code-block:: yaml
592
593 nova:
594 client:
595 enabled: true
Dzmitry Stremkouski48410002019-11-22 20:14:21 +0100596 resources:
597 v21:
598 admin_identity:
599 endpoint_type: internalURL
600 flavor:
601 flavor1:
602 flavor_id: 10
603 ram: 4096
604 disk: 10
605 vcpus: 1
606 flavor2:
607 flavor_id: auto
608 ram: 4096
609 disk: 20
610 vcpus: 2
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100611
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300612Availability zones:
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100613
614.. code-block:: yaml
615
616 nova:
617 client:
618 enabled: true
619 server:
620 identity:
621 availability_zones:
622 - availability_zone_01
623 - availability_zone_02
624
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300625Aggregates:
Damian Szeluga5dca0f02017-04-13 17:27:15 +0200626
627.. code-block:: yaml
628
629 nova:
630 client:
631 enabled: true
Dzmitry Stremkouski48410002019-11-22 20:14:21 +0100632 resources:
633 v21:
634 admin_identity:
635 aggregates:
636 aggregate1: {}
637 aggregate2:
638 metadata: "..."
Damian Szeluga5dca0f02017-04-13 17:27:15 +0200639
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300640Upgrade levels:
Dmitry Stremkovskiy91f45852017-07-18 16:22:31 +0300641
642.. code-block:: yaml
643
644 nova:
645 controller:
646 upgrade_levels:
647 compute: juno
648
649 nova:
650 compute:
651 upgrade_levels:
652 compute: juno
653
Petr Jedinýd855ef22017-03-06 22:24:33 +0100654SR-IOV
Jakub Pavlik39a05942017-02-13 23:03:08 +0100655------
656
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300657Add ``PciPassthroughFilter`` into scheduler filters and NICs on
658specific compute nodes:
Jakub Pavlik39a05942017-02-13 23:03:08 +0100659
660.. code-block:: yaml
661
662 nova:
663 controller:
664 sriov: true
sandriichenko4fe321d2018-01-22 17:34:06 +0000665 scheduler_default_filters: "DifferentHostFilter,SameHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter"
Jakub Pavlik39a05942017-02-13 23:03:08 +0100666
667 nova:
668 compute:
669 sriov:
670 nic_one:
671 devname: eth1
672 physical_network: physnet1
673
Oleh Hryhorovf5093b82018-10-17 11:16:08 +0000674.. note:: Parameters located under nova:compute:sriov:<nic_name> are copied to passthrough_whitelist parameter into
675 nova.conf file in appropriate format.
676
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100677CPU pinning & Hugepages
678-----------------------
679
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300680CPU pinning of virtual machine instances to dedicated physical
681CPU cores. Hugepages mount point for libvirt.
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100682
683.. code-block:: yaml
684
685 nova:
686 controller:
sandriichenko4fe321d2018-01-22 17:34:06 +0000687 scheduler_default_filters: "DifferentHostFilter,SameHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,NUMATopologyFilter,AggregateInstanceExtraSpecsFilter"
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100688
689 nova:
690 compute:
691 vcpu_pin_set: 2,3,4,5
692 hugepages:
693 mount_points:
694 - path: /mnt/hugepages_1GB
695 - path: /mnt/hugepages_2MB
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100696
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200697Custom Scheduler filters
698------------------------
699
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300700If you have a custom filter, that needs to be included in the
701scheduler, then you can include it like so:
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200702
703.. code-block:: yaml
704
705 nova:
706 controller:
707 scheduler_custom_filters:
708 - my_custom_driver.nova.scheduler.filters.my_custom_filter.MyCustomFilter
709
710 # Then add your custom filter on the end (make sure to include all other ones that you need as well)
sandriichenko4fe321d2018-01-22 17:34:06 +0000711 scheduler_default_filters: "DifferentHostFilter,SameHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter,MyCustomFilter"
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200712
Michael Polenchuk2bce2cb2018-09-17 16:05:43 +0400713 # Since Queens version a sequence could be used as well:
714 ~scheduler_default_filters:
715 - DifferentHostFilter
716 - SameHostFilter
717 ...
718 - MyCustomFilter
719
720
Michel Nederlofeb566f62017-04-21 15:37:47 +0200721Hardware Trip/Unmap Support
722---------------------------
723
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300724To enable TRIM support for ephemeral images (thru nova managed
725images), libvirt has this option:
Michel Nederlofeb566f62017-04-21 15:37:47 +0200726
727.. code-block:: yaml
728
729 nova:
730 compute:
731 libvirt:
732 hw_disk_discard: unmap
733
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300734To actually utilize this feature, the following metadata must be
735set on the image as well, so the SCSI unmap is supported:
Michel Nederlofeb566f62017-04-21 15:37:47 +0200736
737.. code-block:: bash
738
739 glance image-update --property hw_scsi_model=virtio-scsi <image>
740 glance image-update --property hw_disk_bus=scsi <image>
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100741
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000742Scheduler Host Manager
743----------------------
744
745Specify a custom host manager.
746
Thom Gerdesec00afd2017-04-07 18:06:59 +0000747libvirt CPU mode
748----------------
749
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300750Allow setting the model of CPU that is exposed to a VM. This
751allows for better support live migration between hypervisors with
752different hardware, among other things. Defaults to host-passthrough.
Jakub Pavlik7046b9c2017-09-19 12:04:19 +0200753
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000754.. code-block:: yaml
755
756 nova:
757 controller:
758 scheduler_host_manager: ironic_host_manager
759
Thom Gerdesec00afd2017-04-07 18:06:59 +0000760 compute:
761 cpu_mode: host-model
762
Dzmitry Stremkouski7da9bf12018-04-25 22:30:37 +0200763Nova compute cpu model
764----------------------
765
766.. code-block:: yaml
767
768 nova:
769 compute:
770 cpu_mode: custom
771 libvirt:
772 cpu_model: IvyBridge
773
Oleksandr Pidrepnyief9fd782019-03-04 19:18:19 +0200774RNG (Random Number Generator) device path
775----------------------
776
777The path to an RNG (Random Number Generator) device that will be used
778as the source of entropy on the host.
779The recommended source of entropy is /dev/urandom.
780Permitted options are: /dev/random, /dev/urandom or /dev/hwrng.
781Default: /dev/urandom
782
783.. code-block:: yaml
784
785 nova:
786 controller:
787 libvirt:
788 rng_dev_path: /dev/random
789
790 compute:
791 libvirt:
792 rng_dev_path: /dev/random
793
Dzmitry Stremkouski7da9bf12018-04-25 22:30:37 +0200794
Michel Nederloff7eefb22017-07-10 11:14:33 +0200795Nova compute workarounds
796------------------------
797
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300798Live snapshotting is disabled by default in nova. To enable
799this, it needs a manual switch.
Michel Nederloff7eefb22017-07-10 11:14:33 +0200800
801From manual:
802
803.. code-block:: yaml
804
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300805 When using libvirt 1.2.2 live snapshots fail intermittently under load
806 (likely related to concurrent libvirt/qemu operations). This config
807 option provides a mechanism to disable live snapshot, in favor of cold
808 snapshot, while this is resolved. Cold snapshot causes an instance
809 outage while the guest is going through the snapshotting process.
810
811 For more information, refer to the bug report:
812
813 https://bugs.launchpad.net/nova/+bug/1334398
Michel Nederloff7eefb22017-07-10 11:14:33 +0200814
815Configurable pillar data:
816
817.. code-block:: yaml
818
819 nova:
820 compute:
Michel Nederlofe322ebb2017-07-10 12:29:21 +0200821 workaround:
Michel Nederloff7eefb22017-07-10 11:14:33 +0200822 disable_libvirt_livesnapshot: False
823
Michel Nederlofb51a5142017-06-27 08:31:35 +0200824Config drive options
825--------------------
826
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300827See example below on how to configure the options for the
828config drive:
Michel Nederlofb51a5142017-06-27 08:31:35 +0200829
830.. code-block:: yaml
831
832 nova:
833 compute:
834 config_drive:
835 forced: True # Default: True
836 cdrom: True # Default: False
837 format: iso9660 # Default: vfat
838 inject_password: False # Default: False
839
Michel Nederloff81919b2017-11-20 09:37:07 +0100840Number of concurrent live migrates
841----------------------------------
842
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300843Default is to have no concurrent live migrations (so 1
844live-migration at a time).
Michel Nederloff81919b2017-11-20 09:37:07 +0100845
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300846Excerpt from config options page
847https://docs.openstack.org/ocata/config-reference/compute/config-options.html:
Michel Nederloff81919b2017-11-20 09:37:07 +0100848
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300849Maximum number of live migrations to run concurrently. This limit is
850enforced to avoid outbound live migrations overwhelming the host/network
851and causing failures. It is not recommended that you change this unless
852you are very sure that doing so is safe and stable in your environment.
Michel Nederloff81919b2017-11-20 09:37:07 +0100853
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300854Possible values:
Michel Nederloff81919b2017-11-20 09:37:07 +0100855
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300856- 0 : treated as unlimited.
857- Negative value defaults to 0.
858- Any positive integer representing maximum number of live migrations
859 to run concurrently.
Michel Nederloff81919b2017-11-20 09:37:07 +0100860
861To configure this option:
862
863.. code-block:: yaml
864
865 nova:
866 compute:
867 max_concurrent_live_migrations: 1 # (1 is the default)
868
Sergio Lystopad9d31cba2018-05-15 11:29:11 +0300869Live migration with auto converge
870----------------------------------
871
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300872Auto converge throttles down CPU if a progress of on-going live
873migration is slow
874https://docs.openstack.org/ocata/config-reference/compute/config-options.html:
Sergio Lystopad9d31cba2018-05-15 11:29:11 +0300875
876.. code-block:: yaml
877
878 nova:
879 compute:
880 libvirt:
881 live_migration_permit_auto_converge: False # (False is the default)
882
883.. code-block:: yaml
884
885 nova:
886 controller:
887 libvirt:
888 live_migration_permit_auto_converge: False # (False is the default)
889
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400890Enhanced logging with logging.conf
891----------------------------------
892
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300893By default ``logging.conf`` is disabled.
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400894
895That is possible to enable per-binary logging.conf with new variables:
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400896
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300897* ``openstack_log_appender``
898 Set to true to enable log_config_append for all OpenStack services
899
900* ``openstack_fluentd_handler_enabled``
901 Set to true to enable FluentHandler for all Openstack services
902
903* ``openstack_ossyslog_handler_enabled``
904 Set to true to enable OSSysLogHandler for all Openstack services
905
906Only ``WatchedFileHandler``, ``OSSysLogHandler``, and ``FluentHandler``
907are available.
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400908
Dmitry Kalashnik8da249c2018-01-16 17:58:00 +0400909Also it is possible to configure this with pillar:
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400910
911.. code-block:: yaml
912
913 nova:
914 controller:
915 logging:
916 log_appender: true
917 log_handlers:
918 watchedfile:
919 enabled: true
920 fluentd:
921 enabled: true
Oleksii Chupryn99e35032018-02-06 01:59:40 +0200922 ossyslog:
923 enabled: true
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400924
925 compute:
926 logging:
927 log_appender: true
928 log_handlers:
929 watchedfile:
930 enabled: true
931 fluentd:
932 enabled: true
Oleksii Chupryn99e35032018-02-06 01:59:40 +0200933 ossyslog:
934 enabled: true
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000935
Vasyl Saienko7243a952018-05-11 21:26:54 +0300936The log level might be configured per logger by using the
937following pillar structure:
938
939.. code-block:: yaml
940
941 nova:
942 compute:
943 logging:
944 loggers:
945 <logger_name>:
946 level: WARNING
947
948 nova:
949 compute:
950 logging:
951 loggers:
952 <logger_name>:
953 level: WARNING
954
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000955Configure syslog parameters for libvirtd
956----------------------------------------
957
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300958To configure syslog parameters for libvirtd the below pillar
959structure should be used with values which are supported
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000960by libvirtd. These values might be known from the documentation.
961
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300962.. code-block:: yaml
963
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000964 nova:
965 compute:
966 libvirt:
967 logging:
968 level: 3
969 filters: '3:remote 4:event'
970 outputs: '3:syslog:libvirtd'
971 buffer_size: 64
972
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300973Logging controls:
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000974
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300975Logging level: 4 errors, 3 warnings, 2 information, 1 debug
976basically 1 will log everything possible ``log_level = 3``
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000977
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300978Logging filters:
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000979
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300980A filter allows to select a different logging level for a given category
981of logs.
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000982
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300983The format for a filter is one of:
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000984
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300985* ``x:name``
986* ``x:+name``
987 where name is a string which is matched against source file name,
988 e.g., ``remote``, ``qemu``, or ``util/json``, the optional ``+`` prefix
989 tells libvirt to log stack trace for each message matching name,
990 and x is the minimal level where matching messages should be logged:
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000991
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300992* ``1: DEBUG``
993* ``2: INFO``
994* ``3: WARNING``
995* ``4: ERROR``
996
997Multiple filter can be defined in a single @filters, they just
998need to be separated by spaces.
999
1000For example, to only get warning or errors from the remote layer
1001and only errors from the event layer: ``log_filters="3:remote 4:event``
1002
1003Logging outputs:
1004
1005An output is one of the places to save logging information
1006The format for an output can be:
1007
1008* ``x:stderr``
1009 Output goes to stderr
1010
1011* ``x:syslog:name``
1012 Use syslog for the output and use the given name as the ident
1013
1014* ``x:file:file_path``
1015 output to a file, with the given filepath
1016
1017 In all case the x prefix is the minimal level, acting as a filter
1018
1019* ``1: DEBUG``
1020* ``2: INFO``
1021* ``3: WARNING``
1022* ``4: ERROR``
1023
1024Multiple output can be defined, they just need to be separated by spaces.
1025For example, to log all warnings and errors to syslog under the libvirt
1026dident: ``log_outputs="3:syslog:libvirtd``
1027
1028Log debug buffer size: default 64
1029The daemon keeps an internal debug log buffer which will be dumped
1030in case of crash or upon receiving a ``SIGUSR2`` signal. This setting
1031allows to override the default buffer size in kilobytes.
1032If value is ``0`` or less the debug log buffer is deactivated
1033``log_buffer_size = 64``
1034
1035To configure the logging parameters for QEMU, the below pillar
1036structure and logging parameters should be used:
1037
1038.. code-block:: yaml
1039
1040 nova:
1041 compute:
1042 qemu:
1043 logging:
1044 handler: logd
1045 virtlog:
1046 enabled: true
1047 level: 4
1048 filters: '3:remote 3:event'
1049 outputs: '4:syslog:virtlogd'
1050 max_clients: 512
1051 max_size: 2097100
1052 max_backups: 2
Oleh Hryhorove38525d2018-05-15 08:58:59 +00001053
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +03001054Inject password to VM
1055---------------------
1056
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001057By default nova blocks up any inject to VM because
1058``inject_partition`` param is equal to ``-2``.
1059If you want to inject password to VM, you will need to
1060define ``inject_partition`` greater or equal to ``-1`` and
1061define ``inject_password`` to ``True``
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +03001062
1063For example:
1064
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001065.. code-block:: yaml
1066
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +03001067 nova:
1068 compute:
1069 inject_partition: '-1'
1070 inject_password: True
1071
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001072Allow the injection of an admin password for instance only at
1073``create`` and ``rebuild`` process.
1074
1075There is no agent needed within the image to do this. If *libguestfs* is
1076available on the host, it will be used. Otherwise *nbd* is used. The file
1077system of the image will be mounted and the admin password, which is provided
1078in the REST API call will be injected as password for the root user. If no
1079root user is available, the instance won't be launched and an error is thrown.
1080Be aware that the injection is *not* possible when the instance gets launched
1081from a volume.
1082
1083Possible values:
1084
1085* ``True``
1086 Allows the injection
1087
1088* ``False`` (default)
1089 Disallows the injection. Any via the REST API provided
1090 admin password will be silently ignored.
1091
1092Related options:
1093
1094* ``inject_partition``
1095 Decides about the discovery and usage of the file system.
1096 It also can disable the injection at all.
1097 (boolean value)
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +03001098
1099You can read more about injecting the administrator password here:
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001100https://docs.openstack.org/nova/queens/admin/admin-password-injection.html
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +03001101
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +03001102Enable libvirt control channel over TLS
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001103---------------------------------------
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +03001104
1105By default TLS is disabled.
1106
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001107Enable TLS transport:
1108
1109.. code-block:: yaml
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +03001110
1111 compute:
1112 libvirt:
1113 tls:
1114 enabled: True
1115
1116You able to set custom certificates in pillar:
1117
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001118.. code-block:: yaml
1119
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +03001120 nova:
1121 compute:
1122 libvirt:
1123 tls:
1124 key: (certificate content)
1125 cert: (certificate content)
1126 cacert: (certificate content)
1127 client:
1128 key: (certificate content)
1129 cert: (certificate content)
1130
Dmitry Teselkin70862022019-04-18 16:43:50 +03001131It is possible to limit allowed SSL / TLS ciphers using libvirt's tls_priority:
1132
1133.. code-block:: yaml
1134
1135 nova:
1136 compute:
1137 libvirt:
1138 tls:
1139 priority: <TLS priority string>
1140
1141Example priority strings are:
1142
1143- The system imposed security level:
1144
1145.. code-block:: text
1146
1147 "SYSTEM"
1148
1149- The default priority without the HMAC-MD5:
1150
1151.. code-block:: text
1152
1153 "NORMAL:-MD5"
1154
1155- Specifying RSA with AES-128-CBC:
1156
1157.. code-block:: text
1158
1159 "NONE:+VERS-TLS-ALL:+MAC-ALL:+RSA:+AES-128-CBC:+SIGN-ALL:+COMP-NULL"
1160
1161- Specifying the defaults plus ARCFOUR-128:
1162
1163.. code-block:: text
1164
1165 "NORMAL:+ARCFOUR-128"
1166
1167- Enabling the 128-bit secure ciphers, while disabling TLS 1.0:
1168
1169.. code-block:: text
1170
1171 "SECURE128:-VERS-TLS1.0"
1172
1173- Enabling the 128-bit and 192-bit secure ciphers, while disabling all TLS
1174 versions except TLS 1.2:
1175
1176.. code-block:: text
1177
1178 "SECURE128:+SECURE192:-VERS-ALL:+VERS-TLS1.2"
1179
1180More on TLS Priority Strings:
1181
1182- https://gnutls.org/manual/html_node/Priority-Strings.html
1183
Vasyl Saienko11ac9732018-10-02 17:04:33 +00001184Controlling access by `tls_allowed_dn_list`.
1185Enable an access control list of client certificate Distinguished Names (DNs)
1186which can connect to the TLS port on this server. The default is that DNs are
1187not checked. This list may contain wildcards such as
1188"C=GB,ST=London,L=London,O=Libvirt Project,CN=*" See the POSIX fnmatch function
1189for the format of the wildcards.
1190Note that if this is an empty list, no client can connect.
1191Note also that GnuTLS returns DNs without spaces after commas between
1192the fields (and this is what we check against), but the openssl x509 tool
1193shows spaces.
1194
1195.. code-block:: yaml
1196
1197 nova:
1198 compute:
1199 libvirt:
1200 tls:
1201 tls_allowed_dn_list:
1202 host1:
1203 enabled: true
1204 value: 'C=foo,CN=cmp1'
1205 host2:
1206 enabled: true
1207 value: 'C=foo,CN=cmp2'
1208
1209
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +03001210You can read more about live migration over TLS here:
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001211https://wiki.libvirt.org/page/TLSCreateServerCerts
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +03001212
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001213Enable transport + authentication for VNC over TLS
1214---------------------
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001215# Only for Queens. Communication between noVNC proxy service and QEMU
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001216
1217By default communication between nova-novncproxy and qemu service is unsecure.
1218
1219compute:
1220 qemu:
1221 vnc:
1222 tls:
1223 enabled: True
1224
1225controller:
1226 novncproxy:
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001227 # This section responsible for communication between noVNC proxy and client machine
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001228 tls:
1229 enabled: True
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001230 # This section responsible for communication between nova-novncproxy and qemu service
1231 vencrypt:
1232 tls:
1233 enabled: True
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001234
1235You able to set custom certificates in pillar:
1236
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001237nova:
1238 compute:
1239 qemu:
1240 vnc:
1241 tls:
1242 cacert (certificate content)
1243 cert (certificate content)
1244 key (certificate content)
1245
1246nova:
1247 controller:
1248 novncproxy:
1249 tls:
1250 server:
1251 cert (certificate content)
1252 key (certificate content)
1253 vencrypt:
1254 tls:
1255 cacert (certificate content)
1256 cert (certificate content)
1257 key (certificate content)
1258
1259
1260You can read more about it here:
1261 https://docs.openstack.org/nova/queens/admin/remote-console-access.html
1262
1263Enable communication between noVNC proxy and client machine over TLS
1264---------------------
1265
1266By default communication between noVNC proxy and client machine is unsecure.
1267
1268 controller:
1269 novncproxy:
1270 tls:
1271 enabled: True
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001272
1273 nova:
1274 controller:
1275 novncproxy:
1276 tls:
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001277 server:
1278 cert (certificate content)
1279 key (certificate content)
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001280
1281You can read more about it here:
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001282 https://docs.openstack.org/mitaka/config-reference/dashboard/configure.html
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001283
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001284Enable x509 and ssl communication between Nova and Galera cluster.
1285---------------------
1286By default communication between Nova and Galera is unsecure.
1287
Oleksandr Shyshkocbe87352018-09-07 13:42:57 +03001288nova:
1289 controller:
1290 database:
1291 x509:
1292 enabled: True
1293
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001294You able to set custom certificates in pillar:
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001295
1296nova:
1297 controller:
1298 database:
1299 x509:
Oleksandr Shyshkocbe87352018-09-07 13:42:57 +03001300 cacert: (certificate content)
1301 cert: (certificate content)
1302 key: (certificate content)
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001303
1304You can read more about it here:
1305 https://docs.openstack.org/security-guide/databases/database-access-control.html
1306
Oleksandr Bryndzii687b6542019-02-20 15:51:15 +02001307Configure nova to use service user tokens:
1308========
1309Long-running operations such as live migration or snapshot can sometimes overrun the
1310expiry of the user token. In such cases, post operations such as cleaning up after a
1311live migration can fail when the nova-compute service needs to cleanup resources in
1312other services, such as in the block-storage (cinder) or networking (neutron) services.
1313
1314This patch enables nova to use service user tokens to supplement the regular user token
1315used to initiate the operation. The identity service (keystone) will then authenticate
1316a request using the service user token if the user token has already expired.
1317
1318.. code-block:: yaml
1319
1320 nova:
1321 controller:
1322 enabled: True
1323 ...
1324 service_user:
1325 enabled: True
1326 user_domain_id: default
1327 project_domain_id: default
1328 project_name: service
1329 username: nova
1330 password: pswd
1331
1332
obryndzii2ea61412019-01-31 00:55:56 +00001333Nova database connection setup:
1334========
1335
1336.. code-block:: yaml
1337
1338 nova:
1339 controller:
1340 enabled: True
1341 ...
1342 min_pool_size: 100
1343 max_pool_size: 700
1344 max_overflow: 100
1345 retry_interval: 5
1346 max_retries: '-1'
1347 db_max_retries: 3
1348 db_retry_interval: 1
1349 connection_debug: 10
1350 pool_timeout: 120
Oleksandr Bryndzii687b6542019-02-20 15:51:15 +02001351
Oleksandr Bryndziife715df2019-04-23 15:34:42 +03001352Change default resource quotas using configmap template settings
1353========
1354
1355.. code-block:: yaml
1356
1357 nova:
1358 controller:
1359 configmap:
1360 quota:
1361 instances: 10
1362 cores: 20
1363 ram: 51200
1364 metadata_items: 128
1365 injected_files: 5
1366 injected_file_content_bytes: 10240
1367 injected_file_path_length: 255
1368 key_pairs: 100
1369 server_groups: 10
1370 server_group_members: 10
1371 reservation_expire: 86400
1372 until_refresh: 0
1373 max_age: 0
1374
Roman Lubianyiddd2c712020-03-26 14:08:10 +02001375Set use_db_reconnect for Nova
1376========
1377
1378.. code-block:: yaml
1379
1380 nova:
1381 controller:
1382 database:
1383 use_db_reconnect: true
1384
1385.. code-block:: yaml
1386
1387 nova:
1388 compute:
1389 database:
1390 use_db_reconnect: true
1391
Oleh Hryhorov63ee8452018-08-14 09:16:02 +00001392Upgrades
1393========
1394
1395Each openstack formula provide set of phases (logical bloks) that will help to
1396build flexible upgrade orchestration logic for particular components. The list
1397of phases might and theirs descriptions are listed in table below:
1398
1399+-------------------------------+------------------------------------------------------+
1400| State | Description |
1401+===============================+======================================================+
1402| <app>.upgrade.service_running | Ensure that all services for particular application |
1403| | are enabled for autostart and running |
1404+-------------------------------+------------------------------------------------------+
1405| <app>.upgrade.service_stopped | Ensure that all services for particular application |
1406| | disabled for autostart and dead |
1407+-------------------------------+------------------------------------------------------+
1408| <app>.upgrade.pkgs_latest | Ensure that packages used by particular application |
1409| | are installed to latest available version. |
1410| | This will not upgrade data plane packages like qemu |
1411| | and openvswitch as usually minimal required version |
1412| | in openstack services is really old. The data plane |
1413| | packages should be upgraded separately by `apt-get |
1414| | upgrade` or `apt-get dist-upgrade` |
1415| | Applying this state will not autostart service. |
1416+-------------------------------+------------------------------------------------------+
1417| <app>.upgrade.render_config | Ensure configuration is rendered actual version. +
1418+-------------------------------+------------------------------------------------------+
1419| <app>.upgrade.pre | We assume this state is applied on all nodes in the |
1420| | cloud before running upgrade. |
1421| | Only non destructive actions will be applied during |
1422| | this phase. Perform service built in service check |
1423| | like (keystone-manage doctor and nova-status upgrade)|
1424+-------------------------------+------------------------------------------------------+
1425| <app>.upgrade.upgrade.pre | Mostly applicable for data plane nodes. During this |
1426| | phase resources will be gracefully removed from |
1427| | current node if it is allowed. Services for upgraded |
1428| | application will be set to admin disabled state to |
1429| | make sure node will not participate in resources |
1430| | scheduling. For example on gtw nodes this will set |
1431| | all agents to admin disable state and will move all |
1432| | routers to other agents. |
1433+-------------------------------+------------------------------------------------------+
1434| <app>.upgrade.upgrade | This state will basically upgrade application on |
1435| | particular target. Stop services, render |
1436| | configuration, install new packages, run offline |
1437| | dbsync (for ctl), start services. Data plane should |
1438| | not be affected, only OpenStack python services. |
1439+-------------------------------+------------------------------------------------------+
1440| <app>.upgrade.upgrade.post | Add services back to scheduling. |
1441+-------------------------------+------------------------------------------------------+
1442| <app>.upgrade.post | This phase should be launched only when upgrade of |
1443| | the cloud is completed. Cleanup temporary files, |
1444| | perform other post upgrade tasks. |
1445+-------------------------------+------------------------------------------------------+
1446| <app>.upgrade.verify | Here we will do basic health checks (API CRUD |
1447| | operations, verify do not have dead network |
1448| | agents/compute services) |
1449+-------------------------------+------------------------------------------------------+
Oleksandr Pidrepnyidabe8b22019-06-07 16:18:11 +03001450
1451
1452Don't manage services scheduling while upgrade
1453----------------------------------------------
1454For some special cases, don't manage services scheduling both enable and disable
1455before and after upgrade procedure.
1456
1457If 'manage_service_maintenance: true' or not present - default behavior, disable services
1458before upgrade and enable it after upgrade.
1459If 'manage_service_maintenance: false' - don't disable and don't enable upgraded services
1460scheduling before and after upgrade.
1461
1462.. code-block:: yaml
1463
1464 nova:
1465 upgrade:
1466 manage_service_maintenance: false
Dzmitry Stremkouskice8475b2020-07-06 20:02:58 +02001467
1468Execute database maintenance tasks
1469----------------------------------
1470Cleanup stale records from nova database to make it smaller.
1471This is helpful before any upgrade activity.
1472It is safe to execute it generally without maintenance window same as online db_sync.
1473
1474Enable this pillar:
1475
1476.. code-block:: yaml
1477
1478 nova:
1479 controller:
1480 db_purge:
1481 enabled: True
1482
1483Execute state nova.db.db_cleanup to purge stale records:
1484
1485.. code-block:: bash
1486
1487 salt -C 'I@nova:controller:role:primary' state.apply nova.db.db_cleanup -l debug
1488
1489Starting from rocky release it is possible to pass days parameter.
1490If you skip setting it, all records would be archived/purged:
1491
1492.. code-block:: yaml
1493
1494 nova:
1495 controller:
1496 db_purge:
1497 enabled: True
1498 days: 45
1499
1500Control pre-rocky releases parameters:
1501
1502.. code-block:: yaml
1503
1504 nova:
1505 controller:
1506 db_purge:
1507 enabled: True
1508 max_rows: 1000
1509 verbose: True
1510
1511Control rocky+ releases parameters:
1512'days' and 'all' parameters are mutually exclusive.
1513
1514.. code-block:: yaml
1515
1516 nova:
1517 controller:
1518 db_purge:
1519 enabled: True
1520 all: True
1521 verbose: True
1522 all_cells: True