blob: ef95fe988a242142d280c02b443ce1a48acbbe34 [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
Taras Khlivnyak0d2606d2021-02-09 13:47:27 +0200301Configure host_subset_size
302--------------------------
303
304.. code-block:: yaml
305
306 nova:
307 controller:
308 host_subset_size: 1
309
Martin Polreichdbf4f142019-12-17 14:19:44 +0100310
Filip Pytloun4a72d792015-10-06 16:28:32 +0200311Compute nodes
312-------------
313
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300314Nova controller services on compute node:
Filip Pytloun4a72d792015-10-06 16:28:32 +0200315
316.. code-block:: yaml
317
318 nova:
319 compute:
320 version: juno
321 enabled: true
Dmitry Stremkovskiy2bcba8d2017-07-30 21:43:59 +0300322 cross_az_attach: false
Dmitry Stremkovskiy35e53b72017-07-29 12:50:39 +0300323 disk_cachemodes: network=writeback,block=none
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100324 availability_zone: availability_zone_01
Damian Szelugae1922412017-04-18 16:36:46 +0200325 aggregates:
326 - hosts_with_fc
327 - hosts_with_ssd
Filip Pytloun4a72d792015-10-06 16:28:32 +0200328 security_group: true
Petr Michalecf03e4882017-04-10 10:26:18 +0200329 resume_guests_state_on_host_boot: False
Michael Polenchuk159c2542018-06-09 15:31:51 +0400330 preallocate_images: space # Default is 'none'
Dmitry Stremkovskiy8a0ff512017-07-25 20:54:13 +0300331 my_ip: 10.1.0.16
Ivan Berezovskiy689e6ea2019-11-14 20:17:58 +0400332 concurrency:
333 lock_path: '/var/lib/nova/tmp'
Filip Pytloun4a72d792015-10-06 16:28:32 +0200334 bind:
335 vnc_address: 172.20.0.100
336 vnc_port: 6080
337 vnc_name: openstack.domain.com
338 vnc_protocol: http
339 database:
340 engine: mysql
341 host: 127.0.0.1
342 port: 3306
343 name: nova
344 user: nova
345 password: pwd
346 identity:
347 engine: keystone
348 host: 127.0.0.1
349 port: 35357
350 user: nova
351 password: pwd
352 tenant: service
353 message_queue:
354 engine: rabbitmq
355 host: 127.0.0.1
356 port: 5672
357 user: openstack
358 password: pwd
359 virtual_host: '/openstack'
360 image:
361 engine: glance
362 host: 127.0.0.1
363 port: 9292
Oleh Hryhorovf5093b82018-10-17 11:16:08 +0000364 pci:
365 alias:
366 alias1:
367 device_type: "type-PF"
368 name: "a1"
369 product_id: "154d"
370 vendor_id: "8086"
Oleksandr Pidrepnyid9bab1b2019-02-20 12:48:17 +0200371 passthrough_whitelist:
372 - vendor_id: "10de"
373 product_id: "1db4"
Filip Pytloun4a72d792015-10-06 16:28:32 +0200374 network:
375 engine: neutron
376 host: 127.0.0.1
377 port: 9696
378 identity:
379 engine: keystone
380 host: 127.0.0.1
381 port: 35357
382 user: neutron
383 password: pwd
384 tenant: service
385 qemu:
386 max_files: 4096
387 max_processes: 4096
Dmitry Stremkovskiy96281f52017-07-26 00:39:22 +0300388 host: node-12.domain.tld
Filip Pytloun4a72d792015-10-06 16:28:32 +0200389
Vasyl Saienkocab3a902018-07-12 13:17:17 +0300390Compute with vmware driver. Each vmware cluster requires a separate process of nova-compute.
391Each process should have uniq host identifier. However multiple computes might be running on
392single host. It is not recommended to have multiple computes running on different hosts that
393manage the same vmware cluster. To achive this pacemaker/corosync or keepalived might be used.
394
395.. code-block:: yaml
396
397 nova:
398 compute:
399 compute_driver: vmwareapi.VMwareVCDriver
400 vmware:
401 host_username: vmware
402 host_password: vmware
403 cluster_name: vmware_cluster01
404 host_ip: 1.2.3.4
405
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300406Group and user to be used for QEMU processes run by the system instance:
kkalynovskyif50f0c02017-12-12 17:52:57 +0200407
408.. code-block:: yaml
409
410 nova:
411 compute:
412 enabled: true
413 ...
414 qemu:
415 user: nova
416 group: cinder
417 dynamic_ownership: 1
418
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300419Group membership for user nova (upgrade related):
Dmitry Stremkovskiy3cd6ba82017-07-25 17:15:36 +0300420
421.. code-block:: yaml
422
423 nova:
424 compute:
425 enabled: true
426 ...
427 user:
428 groups:
429 - libvirt
Filip Pytloun4a72d792015-10-06 16:28:32 +0200430
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300431Nova services on compute node with OpenContrail:
Filip Pytloun4a72d792015-10-06 16:28:32 +0200432
433.. code-block:: yaml
434
435 nova:
436 compute:
437 enabled: true
438 ...
439 networking: contrail
440
Oleksandr Bryndziibb8abfe2018-09-28 22:21:43 +0000441Nova services on compute node with memcached caching and security strategy:
Filip Pytloun4a72d792015-10-06 16:28:32 +0200442
443.. code-block:: yaml
444
445 nova:
446 compute:
447 enabled: true
448 ...
449 cache:
450 engine: memcached
451 members:
452 - host: 127.0.0.1
453 port: 11211
454 - host: 127.0.0.1
455 port: 11211
Oleksandr Bryndziibb8abfe2018-09-28 22:21:43 +0000456 security:
457 enabled: true
458 strategy: ENCRYPT
459 secret_key: secret
Filip Pytloun4a72d792015-10-06 16:28:32 +0200460
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300461Client-side RabbitMQ HA setup:
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200462
463.. code-block:: yaml
464
465 nova:
Kirill Bespalov64617172017-07-11 14:43:14 +0300466 compute:
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200467 ....
468 message_queue:
469 engine: rabbitmq
470 members:
471 - host: 10.0.16.1
472 - host: 10.0.16.2
473 - host: 10.0.16.3
474 user: openstack
475 password: pwd
476 virtual_host: '/openstack'
477 ....
478
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300479Nova with ephemeral configured with Ceph:
maxstack39e6aca2016-05-04 13:50:13 +0000480
481.. code-block:: yaml
482
483 nova:
484 compute:
485 enabled: true
486 ...
487 ceph:
488 ephemeral: yes
489 rbd_pool: nova
490 rbd_user: nova
491 secret_uuid: 03006edd-d957-40a3-ac4c-26cd254b3731
Kalynovskyi0bc79692017-07-21 16:22:09 +0300492 ....
maxstack39e6aca2016-05-04 13:50:13 +0000493
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300494Nova with ephemeral configured with LVM:
Kalynovskyi0bc79692017-07-21 16:22:09 +0300495
496.. code-block:: yaml
497
498 nova:
499 compute:
500 enabled: true
501 ...
502 lvm:
503 ephemeral: yes
504 images_volume_group: nova_vg
505
506 linux:
507 storage:
508 lvm:
509 nova_vg:
510 name: nova_vg
511 devices:
512 - /dev/sdf
513 - /dev/sdd
514 - /dev/sdg
515 - /dev/sde
516 - /dev/sdc
517 - /dev/sdj
518 - /dev/sdh
maxstack39e6aca2016-05-04 13:50:13 +0000519
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300520Enable Barbican integration:
Oleg Iurchenko370c10d2017-10-19 14:03:37 +0300521
522.. code-block:: yaml
523
524 nova:
525 compute:
526 ....
527 barbican:
528 enabled: true
529
Oleksandr Pidrepnyid9bab1b2019-02-20 12:48:17 +0200530Define aliases for a PCI passthrough devices:
Oleh Hryhorovf5093b82018-10-17 11:16:08 +0000531.. code-block:: yaml
532
533 nova:
534 compute:
535 ...
536 pci:
537 alias:
538 alias1:
539 device_type: "type-PF"
540 name: "a1"
541 product_id: "154d"
542 vendor_id: "8086"
543
Oleksandr Pidrepnyid9bab1b2019-02-20 12:48:17 +0200544Define white list of PCI devices available to VMs:
545.. code-block:: yaml
546
547 nova:
548 compute:
549 ...
550 pci:
551 passthrough_whitelist:
552 - vendor_id: "10de"
553 product_id: "1db4"
554
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300555Nova metadata custom bindings:
Vasyl Saienko2d591282018-02-05 14:19:02 +0200556
557.. code-block:: yaml
558
559 nova:
560 controller:
561 enabled: true
562 ...
563 metadata:
564 bind:
565 address: 1.2.3.4
566 port: 8776
567
Oleh Hryhorov08482aa2018-11-19 14:07:47 +0200568Define multipath for nova compute:
569
570.. code-block:: yaml
571
572 nova:
573 compute:
574 ....
575 libvirt:
576 volume_use_multipath: True
577
Oleh Hryhorov5add3b22019-03-06 17:00:00 +0000578To disable or enable StrictHostKeyChecking and discover
579compute nodes fingerprints the below pillar should be used:
580
581.. code-block:: yaml
582
583 nova:
584 compute:
585 ....
586 openssh:
587 stricthostkeychecking: True
588 discover_compute_hosts: True
589
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100590Client role
591-----------
592
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300593Nova configured with NFS:
Dmitry Stremkovskiy665c7282017-07-05 17:36:27 +0300594
595.. code-block:: yaml
596
597 nova:
598 compute:
599 instances_path: /mnt/nova/instances
Valeriy Sakharovc62d3212022-09-29 14:37:33 +0400600 image_cache_manager_interval: 2400
Dmitry Stremkovskiy665c7282017-07-05 17:36:27 +0300601
602 linux:
603 storage:
604 enabled: true
605 mount:
606 nfs_nova:
607 enabled: true
608 path: ${nova:compute:instances_path}
609 device: 172.31.35.145:/data
610 file_system: nfs
611 opts: rw,vers=3
612
Valeriy Sakharovc62d3212022-09-29 14:37:33 +0400613.. note:: Parameter 'image_cache_manager_interval' recommended to set to 2400 for the NFS shared storage setup (PROD-36930)
614
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300615Nova flavors:
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100616
617.. code-block:: yaml
618
619 nova:
620 client:
621 enabled: true
Dzmitry Stremkouski48410002019-11-22 20:14:21 +0100622 resources:
623 v21:
624 admin_identity:
625 endpoint_type: internalURL
626 flavor:
627 flavor1:
628 flavor_id: 10
629 ram: 4096
630 disk: 10
631 vcpus: 1
632 flavor2:
633 flavor_id: auto
634 ram: 4096
635 disk: 20
636 vcpus: 2
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100637
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300638Availability zones:
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100639
640.. code-block:: yaml
641
642 nova:
643 client:
644 enabled: true
645 server:
646 identity:
647 availability_zones:
648 - availability_zone_01
649 - availability_zone_02
650
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300651Aggregates:
Damian Szeluga5dca0f02017-04-13 17:27:15 +0200652
653.. code-block:: yaml
654
655 nova:
656 client:
657 enabled: true
Dzmitry Stremkouski48410002019-11-22 20:14:21 +0100658 resources:
659 v21:
660 admin_identity:
661 aggregates:
662 aggregate1: {}
663 aggregate2:
664 metadata: "..."
Damian Szeluga5dca0f02017-04-13 17:27:15 +0200665
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300666Upgrade levels:
Dmitry Stremkovskiy91f45852017-07-18 16:22:31 +0300667
668.. code-block:: yaml
669
670 nova:
671 controller:
672 upgrade_levels:
673 compute: juno
674
675 nova:
676 compute:
677 upgrade_levels:
678 compute: juno
679
Petr Jedinýd855ef22017-03-06 22:24:33 +0100680SR-IOV
Jakub Pavlik39a05942017-02-13 23:03:08 +0100681------
682
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300683Add ``PciPassthroughFilter`` into scheduler filters and NICs on
684specific compute nodes:
Jakub Pavlik39a05942017-02-13 23:03:08 +0100685
686.. code-block:: yaml
687
688 nova:
689 controller:
690 sriov: true
sandriichenko4fe321d2018-01-22 17:34:06 +0000691 scheduler_default_filters: "DifferentHostFilter,SameHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter"
Jakub Pavlik39a05942017-02-13 23:03:08 +0100692
693 nova:
694 compute:
695 sriov:
696 nic_one:
697 devname: eth1
698 physical_network: physnet1
699
Oleh Hryhorovf5093b82018-10-17 11:16:08 +0000700.. note:: Parameters located under nova:compute:sriov:<nic_name> are copied to passthrough_whitelist parameter into
701 nova.conf file in appropriate format.
702
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100703CPU pinning & Hugepages
704-----------------------
705
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300706CPU pinning of virtual machine instances to dedicated physical
707CPU cores. Hugepages mount point for libvirt.
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100708
709.. code-block:: yaml
710
711 nova:
712 controller:
sandriichenko4fe321d2018-01-22 17:34:06 +0000713 scheduler_default_filters: "DifferentHostFilter,SameHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,NUMATopologyFilter,AggregateInstanceExtraSpecsFilter"
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100714
715 nova:
716 compute:
717 vcpu_pin_set: 2,3,4,5
718 hugepages:
719 mount_points:
720 - path: /mnt/hugepages_1GB
721 - path: /mnt/hugepages_2MB
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100722
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200723Custom Scheduler filters
724------------------------
725
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300726If you have a custom filter, that needs to be included in the
727scheduler, then you can include it like so:
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200728
729.. code-block:: yaml
730
731 nova:
732 controller:
733 scheduler_custom_filters:
734 - my_custom_driver.nova.scheduler.filters.my_custom_filter.MyCustomFilter
735
736 # 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 +0000737 scheduler_default_filters: "DifferentHostFilter,SameHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter,MyCustomFilter"
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200738
Michael Polenchuk2bce2cb2018-09-17 16:05:43 +0400739 # Since Queens version a sequence could be used as well:
740 ~scheduler_default_filters:
741 - DifferentHostFilter
742 - SameHostFilter
743 ...
744 - MyCustomFilter
745
746
Michel Nederlofeb566f62017-04-21 15:37:47 +0200747Hardware Trip/Unmap Support
748---------------------------
749
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300750To enable TRIM support for ephemeral images (thru nova managed
751images), libvirt has this option:
Michel Nederlofeb566f62017-04-21 15:37:47 +0200752
753.. code-block:: yaml
754
755 nova:
756 compute:
757 libvirt:
758 hw_disk_discard: unmap
759
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300760To actually utilize this feature, the following metadata must be
761set on the image as well, so the SCSI unmap is supported:
Michel Nederlofeb566f62017-04-21 15:37:47 +0200762
763.. code-block:: bash
764
765 glance image-update --property hw_scsi_model=virtio-scsi <image>
766 glance image-update --property hw_disk_bus=scsi <image>
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100767
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000768Scheduler Host Manager
769----------------------
770
771Specify a custom host manager.
772
Thom Gerdesec00afd2017-04-07 18:06:59 +0000773libvirt CPU mode
774----------------
775
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300776Allow setting the model of CPU that is exposed to a VM. This
777allows for better support live migration between hypervisors with
778different hardware, among other things. Defaults to host-passthrough.
Jakub Pavlik7046b9c2017-09-19 12:04:19 +0200779
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000780.. code-block:: yaml
781
782 nova:
783 controller:
784 scheduler_host_manager: ironic_host_manager
785
Thom Gerdesec00afd2017-04-07 18:06:59 +0000786 compute:
787 cpu_mode: host-model
788
Dzmitry Stremkouski7da9bf12018-04-25 22:30:37 +0200789Nova compute cpu model
790----------------------
791
792.. code-block:: yaml
793
794 nova:
795 compute:
796 cpu_mode: custom
797 libvirt:
798 cpu_model: IvyBridge
799
Oleksandr Pidrepnyief9fd782019-03-04 19:18:19 +0200800RNG (Random Number Generator) device path
801----------------------
802
803The path to an RNG (Random Number Generator) device that will be used
804as the source of entropy on the host.
805The recommended source of entropy is /dev/urandom.
806Permitted options are: /dev/random, /dev/urandom or /dev/hwrng.
807Default: /dev/urandom
808
809.. code-block:: yaml
810
811 nova:
812 controller:
813 libvirt:
814 rng_dev_path: /dev/random
815
816 compute:
817 libvirt:
818 rng_dev_path: /dev/random
819
Dzmitry Stremkouski7da9bf12018-04-25 22:30:37 +0200820
Michel Nederloff7eefb22017-07-10 11:14:33 +0200821Nova compute workarounds
822------------------------
823
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300824Live snapshotting is disabled by default in nova. To enable
825this, it needs a manual switch.
Michel Nederloff7eefb22017-07-10 11:14:33 +0200826
827From manual:
828
829.. code-block:: yaml
830
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300831 When using libvirt 1.2.2 live snapshots fail intermittently under load
832 (likely related to concurrent libvirt/qemu operations). This config
833 option provides a mechanism to disable live snapshot, in favor of cold
834 snapshot, while this is resolved. Cold snapshot causes an instance
835 outage while the guest is going through the snapshotting process.
836
837 For more information, refer to the bug report:
838
839 https://bugs.launchpad.net/nova/+bug/1334398
Michel Nederloff7eefb22017-07-10 11:14:33 +0200840
841Configurable pillar data:
842
843.. code-block:: yaml
844
845 nova:
846 compute:
Michel Nederlofe322ebb2017-07-10 12:29:21 +0200847 workaround:
Michel Nederloff7eefb22017-07-10 11:14:33 +0200848 disable_libvirt_livesnapshot: False
849
Michel Nederlofb51a5142017-06-27 08:31:35 +0200850Config drive options
851--------------------
852
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300853See example below on how to configure the options for the
854config drive:
Michel Nederlofb51a5142017-06-27 08:31:35 +0200855
856.. code-block:: yaml
857
858 nova:
859 compute:
860 config_drive:
861 forced: True # Default: True
862 cdrom: True # Default: False
863 format: iso9660 # Default: vfat
864 inject_password: False # Default: False
865
Michel Nederloff81919b2017-11-20 09:37:07 +0100866Number of concurrent live migrates
867----------------------------------
868
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300869Default is to have no concurrent live migrations (so 1
870live-migration at a time).
Michel Nederloff81919b2017-11-20 09:37:07 +0100871
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300872Excerpt from config options page
873https://docs.openstack.org/ocata/config-reference/compute/config-options.html:
Michel Nederloff81919b2017-11-20 09:37:07 +0100874
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300875Maximum number of live migrations to run concurrently. This limit is
876enforced to avoid outbound live migrations overwhelming the host/network
877and causing failures. It is not recommended that you change this unless
878you are very sure that doing so is safe and stable in your environment.
Michel Nederloff81919b2017-11-20 09:37:07 +0100879
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300880Possible values:
Michel Nederloff81919b2017-11-20 09:37:07 +0100881
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300882- 0 : treated as unlimited.
883- Negative value defaults to 0.
884- Any positive integer representing maximum number of live migrations
885 to run concurrently.
Michel Nederloff81919b2017-11-20 09:37:07 +0100886
887To configure this option:
888
889.. code-block:: yaml
890
891 nova:
892 compute:
893 max_concurrent_live_migrations: 1 # (1 is the default)
894
Sergio Lystopad9d31cba2018-05-15 11:29:11 +0300895Live migration with auto converge
896----------------------------------
897
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300898Auto converge throttles down CPU if a progress of on-going live
899migration is slow
900https://docs.openstack.org/ocata/config-reference/compute/config-options.html:
Sergio Lystopad9d31cba2018-05-15 11:29:11 +0300901
902.. code-block:: yaml
903
904 nova:
905 compute:
906 libvirt:
907 live_migration_permit_auto_converge: False # (False is the default)
908
909.. code-block:: yaml
910
911 nova:
912 controller:
913 libvirt:
914 live_migration_permit_auto_converge: False # (False is the default)
915
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400916Enhanced logging with logging.conf
917----------------------------------
918
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300919By default ``logging.conf`` is disabled.
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400920
921That is possible to enable per-binary logging.conf with new variables:
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400922
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300923* ``openstack_log_appender``
924 Set to true to enable log_config_append for all OpenStack services
925
926* ``openstack_fluentd_handler_enabled``
927 Set to true to enable FluentHandler for all Openstack services
928
929* ``openstack_ossyslog_handler_enabled``
930 Set to true to enable OSSysLogHandler for all Openstack services
931
932Only ``WatchedFileHandler``, ``OSSysLogHandler``, and ``FluentHandler``
933are available.
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400934
Dmitry Kalashnik8da249c2018-01-16 17:58:00 +0400935Also it is possible to configure this with pillar:
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400936
937.. code-block:: yaml
938
939 nova:
940 controller:
941 logging:
942 log_appender: true
943 log_handlers:
944 watchedfile:
945 enabled: true
946 fluentd:
947 enabled: true
Oleksii Chupryn99e35032018-02-06 01:59:40 +0200948 ossyslog:
949 enabled: true
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400950
951 compute:
952 logging:
953 log_appender: true
954 log_handlers:
955 watchedfile:
956 enabled: true
957 fluentd:
958 enabled: true
Oleksii Chupryn99e35032018-02-06 01:59:40 +0200959 ossyslog:
960 enabled: true
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000961
Vasyl Saienko7243a952018-05-11 21:26:54 +0300962The log level might be configured per logger by using the
963following pillar structure:
964
965.. code-block:: yaml
966
967 nova:
968 compute:
969 logging:
970 loggers:
971 <logger_name>:
972 level: WARNING
973
974 nova:
975 compute:
976 logging:
977 loggers:
978 <logger_name>:
979 level: WARNING
980
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000981Configure syslog parameters for libvirtd
982----------------------------------------
983
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300984To configure syslog parameters for libvirtd the below pillar
985structure should be used with values which are supported
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000986by libvirtd. These values might be known from the documentation.
987
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300988.. code-block:: yaml
989
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000990 nova:
991 compute:
992 libvirt:
993 logging:
994 level: 3
995 filters: '3:remote 4:event'
996 outputs: '3:syslog:libvirtd'
997 buffer_size: 64
998
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300999Logging controls:
Oleh Hryhorove38525d2018-05-15 08:58:59 +00001000
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001001Logging level: 4 errors, 3 warnings, 2 information, 1 debug
1002basically 1 will log everything possible ``log_level = 3``
Oleh Hryhorove38525d2018-05-15 08:58:59 +00001003
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001004Logging filters:
Oleh Hryhorove38525d2018-05-15 08:58:59 +00001005
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001006A filter allows to select a different logging level for a given category
1007of logs.
Oleh Hryhorove38525d2018-05-15 08:58:59 +00001008
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001009The format for a filter is one of:
Oleh Hryhorove38525d2018-05-15 08:58:59 +00001010
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001011* ``x:name``
1012* ``x:+name``
1013 where name is a string which is matched against source file name,
1014 e.g., ``remote``, ``qemu``, or ``util/json``, the optional ``+`` prefix
1015 tells libvirt to log stack trace for each message matching name,
1016 and x is the minimal level where matching messages should be logged:
Oleh Hryhorove38525d2018-05-15 08:58:59 +00001017
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001018* ``1: DEBUG``
1019* ``2: INFO``
1020* ``3: WARNING``
1021* ``4: ERROR``
1022
1023Multiple filter can be defined in a single @filters, they just
1024need to be separated by spaces.
1025
1026For example, to only get warning or errors from the remote layer
1027and only errors from the event layer: ``log_filters="3:remote 4:event``
1028
1029Logging outputs:
1030
1031An output is one of the places to save logging information
1032The format for an output can be:
1033
1034* ``x:stderr``
1035 Output goes to stderr
1036
1037* ``x:syslog:name``
1038 Use syslog for the output and use the given name as the ident
1039
1040* ``x:file:file_path``
1041 output to a file, with the given filepath
1042
1043 In all case the x prefix is the minimal level, acting as a filter
1044
1045* ``1: DEBUG``
1046* ``2: INFO``
1047* ``3: WARNING``
1048* ``4: ERROR``
1049
1050Multiple output can be defined, they just need to be separated by spaces.
1051For example, to log all warnings and errors to syslog under the libvirt
1052dident: ``log_outputs="3:syslog:libvirtd``
1053
1054Log debug buffer size: default 64
1055The daemon keeps an internal debug log buffer which will be dumped
1056in case of crash or upon receiving a ``SIGUSR2`` signal. This setting
1057allows to override the default buffer size in kilobytes.
1058If value is ``0`` or less the debug log buffer is deactivated
1059``log_buffer_size = 64``
1060
1061To configure the logging parameters for QEMU, the below pillar
1062structure and logging parameters should be used:
1063
1064.. code-block:: yaml
1065
1066 nova:
1067 compute:
1068 qemu:
1069 logging:
1070 handler: logd
1071 virtlog:
1072 enabled: true
1073 level: 4
1074 filters: '3:remote 3:event'
1075 outputs: '4:syslog:virtlogd'
1076 max_clients: 512
1077 max_size: 2097100
1078 max_backups: 2
Oleh Hryhorove38525d2018-05-15 08:58:59 +00001079
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +03001080Inject password to VM
1081---------------------
1082
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001083By default nova blocks up any inject to VM because
1084``inject_partition`` param is equal to ``-2``.
1085If you want to inject password to VM, you will need to
1086define ``inject_partition`` greater or equal to ``-1`` and
1087define ``inject_password`` to ``True``
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +03001088
1089For example:
1090
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001091.. code-block:: yaml
1092
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +03001093 nova:
1094 compute:
1095 inject_partition: '-1'
1096 inject_password: True
1097
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001098Allow the injection of an admin password for instance only at
1099``create`` and ``rebuild`` process.
1100
1101There is no agent needed within the image to do this. If *libguestfs* is
1102available on the host, it will be used. Otherwise *nbd* is used. The file
1103system of the image will be mounted and the admin password, which is provided
1104in the REST API call will be injected as password for the root user. If no
1105root user is available, the instance won't be launched and an error is thrown.
1106Be aware that the injection is *not* possible when the instance gets launched
1107from a volume.
1108
1109Possible values:
1110
1111* ``True``
1112 Allows the injection
1113
1114* ``False`` (default)
1115 Disallows the injection. Any via the REST API provided
1116 admin password will be silently ignored.
1117
1118Related options:
1119
1120* ``inject_partition``
1121 Decides about the discovery and usage of the file system.
1122 It also can disable the injection at all.
1123 (boolean value)
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +03001124
1125You can read more about injecting the administrator password here:
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001126https://docs.openstack.org/nova/queens/admin/admin-password-injection.html
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +03001127
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +03001128Enable libvirt control channel over TLS
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001129---------------------------------------
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +03001130
1131By default TLS is disabled.
1132
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001133Enable TLS transport:
1134
1135.. code-block:: yaml
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +03001136
1137 compute:
1138 libvirt:
1139 tls:
1140 enabled: True
1141
1142You able to set custom certificates in pillar:
1143
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001144.. code-block:: yaml
1145
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +03001146 nova:
1147 compute:
1148 libvirt:
1149 tls:
1150 key: (certificate content)
1151 cert: (certificate content)
1152 cacert: (certificate content)
1153 client:
1154 key: (certificate content)
1155 cert: (certificate content)
1156
Dmitry Teselkin70862022019-04-18 16:43:50 +03001157It is possible to limit allowed SSL / TLS ciphers using libvirt's tls_priority:
1158
1159.. code-block:: yaml
1160
1161 nova:
1162 compute:
1163 libvirt:
1164 tls:
1165 priority: <TLS priority string>
1166
1167Example priority strings are:
1168
1169- The system imposed security level:
1170
1171.. code-block:: text
1172
1173 "SYSTEM"
1174
1175- The default priority without the HMAC-MD5:
1176
1177.. code-block:: text
1178
1179 "NORMAL:-MD5"
1180
1181- Specifying RSA with AES-128-CBC:
1182
1183.. code-block:: text
1184
1185 "NONE:+VERS-TLS-ALL:+MAC-ALL:+RSA:+AES-128-CBC:+SIGN-ALL:+COMP-NULL"
1186
1187- Specifying the defaults plus ARCFOUR-128:
1188
1189.. code-block:: text
1190
1191 "NORMAL:+ARCFOUR-128"
1192
1193- Enabling the 128-bit secure ciphers, while disabling TLS 1.0:
1194
1195.. code-block:: text
1196
1197 "SECURE128:-VERS-TLS1.0"
1198
1199- Enabling the 128-bit and 192-bit secure ciphers, while disabling all TLS
1200 versions except TLS 1.2:
1201
1202.. code-block:: text
1203
1204 "SECURE128:+SECURE192:-VERS-ALL:+VERS-TLS1.2"
1205
1206More on TLS Priority Strings:
1207
1208- https://gnutls.org/manual/html_node/Priority-Strings.html
1209
Vasyl Saienko11ac9732018-10-02 17:04:33 +00001210Controlling access by `tls_allowed_dn_list`.
1211Enable an access control list of client certificate Distinguished Names (DNs)
1212which can connect to the TLS port on this server. The default is that DNs are
1213not checked. This list may contain wildcards such as
1214"C=GB,ST=London,L=London,O=Libvirt Project,CN=*" See the POSIX fnmatch function
1215for the format of the wildcards.
1216Note that if this is an empty list, no client can connect.
1217Note also that GnuTLS returns DNs without spaces after commas between
1218the fields (and this is what we check against), but the openssl x509 tool
1219shows spaces.
1220
1221.. code-block:: yaml
1222
1223 nova:
1224 compute:
1225 libvirt:
1226 tls:
1227 tls_allowed_dn_list:
1228 host1:
1229 enabled: true
1230 value: 'C=foo,CN=cmp1'
1231 host2:
1232 enabled: true
1233 value: 'C=foo,CN=cmp2'
1234
1235
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +03001236You can read more about live migration over TLS here:
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001237https://wiki.libvirt.org/page/TLSCreateServerCerts
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +03001238
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001239Enable transport + authentication for VNC over TLS
1240---------------------
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001241# Only for Queens. Communication between noVNC proxy service and QEMU
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001242
1243By default communication between nova-novncproxy and qemu service is unsecure.
1244
1245compute:
1246 qemu:
1247 vnc:
1248 tls:
1249 enabled: True
1250
1251controller:
1252 novncproxy:
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001253 # This section responsible for communication between noVNC proxy and client machine
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001254 tls:
1255 enabled: True
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001256 # This section responsible for communication between nova-novncproxy and qemu service
1257 vencrypt:
1258 tls:
1259 enabled: True
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001260
1261You able to set custom certificates in pillar:
1262
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001263nova:
1264 compute:
1265 qemu:
1266 vnc:
1267 tls:
1268 cacert (certificate content)
1269 cert (certificate content)
1270 key (certificate content)
1271
1272nova:
1273 controller:
1274 novncproxy:
1275 tls:
1276 server:
1277 cert (certificate content)
1278 key (certificate content)
1279 vencrypt:
1280 tls:
1281 cacert (certificate content)
1282 cert (certificate content)
1283 key (certificate content)
1284
1285
1286You can read more about it here:
1287 https://docs.openstack.org/nova/queens/admin/remote-console-access.html
1288
1289Enable communication between noVNC proxy and client machine over TLS
1290---------------------
1291
1292By default communication between noVNC proxy and client machine is unsecure.
1293
1294 controller:
1295 novncproxy:
1296 tls:
1297 enabled: True
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001298
1299 nova:
1300 controller:
1301 novncproxy:
1302 tls:
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001303 server:
1304 cert (certificate content)
1305 key (certificate content)
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001306
1307You can read more about it here:
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001308 https://docs.openstack.org/mitaka/config-reference/dashboard/configure.html
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001309
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001310Enable x509 and ssl communication between Nova and Galera cluster.
1311---------------------
1312By default communication between Nova and Galera is unsecure.
1313
Oleksandr Shyshkocbe87352018-09-07 13:42:57 +03001314nova:
1315 controller:
1316 database:
1317 x509:
1318 enabled: True
1319
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001320You able to set custom certificates in pillar:
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001321
1322nova:
1323 controller:
1324 database:
1325 x509:
Oleksandr Shyshkocbe87352018-09-07 13:42:57 +03001326 cacert: (certificate content)
1327 cert: (certificate content)
1328 key: (certificate content)
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001329
1330You can read more about it here:
1331 https://docs.openstack.org/security-guide/databases/database-access-control.html
1332
Oleksandr Bryndzii687b6542019-02-20 15:51:15 +02001333Configure nova to use service user tokens:
1334========
1335Long-running operations such as live migration or snapshot can sometimes overrun the
1336expiry of the user token. In such cases, post operations such as cleaning up after a
1337live migration can fail when the nova-compute service needs to cleanup resources in
1338other services, such as in the block-storage (cinder) or networking (neutron) services.
1339
1340This patch enables nova to use service user tokens to supplement the regular user token
1341used to initiate the operation. The identity service (keystone) will then authenticate
1342a request using the service user token if the user token has already expired.
1343
1344.. code-block:: yaml
1345
1346 nova:
1347 controller:
1348 enabled: True
1349 ...
1350 service_user:
1351 enabled: True
1352 user_domain_id: default
1353 project_domain_id: default
1354 project_name: service
1355 username: nova
1356 password: pswd
1357
1358
obryndzii2ea61412019-01-31 00:55:56 +00001359Nova database connection setup:
1360========
1361
1362.. code-block:: yaml
1363
1364 nova:
1365 controller:
1366 enabled: True
1367 ...
1368 min_pool_size: 100
1369 max_pool_size: 700
1370 max_overflow: 100
1371 retry_interval: 5
1372 max_retries: '-1'
1373 db_max_retries: 3
1374 db_retry_interval: 1
1375 connection_debug: 10
1376 pool_timeout: 120
Oleksandr Bryndzii687b6542019-02-20 15:51:15 +02001377
Oleksandr Bryndziife715df2019-04-23 15:34:42 +03001378Change default resource quotas using configmap template settings
1379========
1380
1381.. code-block:: yaml
1382
1383 nova:
1384 controller:
1385 configmap:
1386 quota:
1387 instances: 10
1388 cores: 20
1389 ram: 51200
1390 metadata_items: 128
1391 injected_files: 5
1392 injected_file_content_bytes: 10240
1393 injected_file_path_length: 255
1394 key_pairs: 100
1395 server_groups: 10
1396 server_group_members: 10
1397 reservation_expire: 86400
1398 until_refresh: 0
1399 max_age: 0
1400
Roman Lubianyiddd2c712020-03-26 14:08:10 +02001401Set use_db_reconnect for Nova
1402========
1403
1404.. code-block:: yaml
1405
1406 nova:
1407 controller:
1408 database:
1409 use_db_reconnect: true
1410
1411.. code-block:: yaml
1412
1413 nova:
1414 compute:
1415 database:
1416 use_db_reconnect: true
1417
Oleksii Molchanov1f9f6612020-11-19 22:46:05 +02001418Set qemu security_driver
1419========
1420
1421.. code-block:: yaml
1422
1423 nova:
1424 compute:
1425 security_driver: apparmor
1426
Oleksii Molchanov1a55e092022-03-14 18:21:16 +02001427Disable new services automatically
1428========
1429
1430.. code-block:: yaml
1431
1432 nova:
1433 compute:
1434 enable_new_services: False
1435 controller:
1436 enable_new_services: False
Taras Khlivnyakdb4aa582021-08-19 09:48:56 +03001437
1438Change files/directories permissions for nova service:
1439=======================================
1440In order to change file permissions the following should be set:
1441
1442'files' - block to set permissions for files.
1443- full path to file
1444- user ( default value is 'root' ) this parameter is optional.
1445- group ( default value is 'nova' ) this parameter is optional
1446- mode ( default value is '0640' ) this parameter is optional
1447
1448'directories' - block to set permissions for directories.
1449- full path to directory
1450- user ( default value is 'root' ) this parameter is optional
1451- group ( default value is 'nova' ) this parameter is optional
1452- mode ( default value is '0750' ) this parameter is optional
1453
1454.. code-block:: yaml
1455
1456 nova:
1457 files:
1458 /etc/nova/nova.conf:
1459 user: 'root'
1460 group: 'nova'
1461 mode: '0750'
1462 directories:
1463 /etc/nova:
1464 user: 'root'
1465 group: 'nova'
1466 mode: '0750'
1467
1468
Oleh Hryhorov63ee8452018-08-14 09:16:02 +00001469Upgrades
1470========
1471
1472Each openstack formula provide set of phases (logical bloks) that will help to
1473build flexible upgrade orchestration logic for particular components. The list
1474of phases might and theirs descriptions are listed in table below:
1475
1476+-------------------------------+------------------------------------------------------+
1477| State | Description |
1478+===============================+======================================================+
1479| <app>.upgrade.service_running | Ensure that all services for particular application |
1480| | are enabled for autostart and running |
1481+-------------------------------+------------------------------------------------------+
1482| <app>.upgrade.service_stopped | Ensure that all services for particular application |
1483| | disabled for autostart and dead |
1484+-------------------------------+------------------------------------------------------+
1485| <app>.upgrade.pkgs_latest | Ensure that packages used by particular application |
1486| | are installed to latest available version. |
1487| | This will not upgrade data plane packages like qemu |
1488| | and openvswitch as usually minimal required version |
1489| | in openstack services is really old. The data plane |
1490| | packages should be upgraded separately by `apt-get |
1491| | upgrade` or `apt-get dist-upgrade` |
1492| | Applying this state will not autostart service. |
1493+-------------------------------+------------------------------------------------------+
1494| <app>.upgrade.render_config | Ensure configuration is rendered actual version. +
1495+-------------------------------+------------------------------------------------------+
1496| <app>.upgrade.pre | We assume this state is applied on all nodes in the |
1497| | cloud before running upgrade. |
1498| | Only non destructive actions will be applied during |
1499| | this phase. Perform service built in service check |
1500| | like (keystone-manage doctor and nova-status upgrade)|
1501+-------------------------------+------------------------------------------------------+
1502| <app>.upgrade.upgrade.pre | Mostly applicable for data plane nodes. During this |
1503| | phase resources will be gracefully removed from |
1504| | current node if it is allowed. Services for upgraded |
1505| | application will be set to admin disabled state to |
1506| | make sure node will not participate in resources |
1507| | scheduling. For example on gtw nodes this will set |
1508| | all agents to admin disable state and will move all |
1509| | routers to other agents. |
1510+-------------------------------+------------------------------------------------------+
1511| <app>.upgrade.upgrade | This state will basically upgrade application on |
1512| | particular target. Stop services, render |
1513| | configuration, install new packages, run offline |
1514| | dbsync (for ctl), start services. Data plane should |
1515| | not be affected, only OpenStack python services. |
1516+-------------------------------+------------------------------------------------------+
1517| <app>.upgrade.upgrade.post | Add services back to scheduling. |
1518+-------------------------------+------------------------------------------------------+
1519| <app>.upgrade.post | This phase should be launched only when upgrade of |
1520| | the cloud is completed. Cleanup temporary files, |
1521| | perform other post upgrade tasks. |
1522+-------------------------------+------------------------------------------------------+
1523| <app>.upgrade.verify | Here we will do basic health checks (API CRUD |
1524| | operations, verify do not have dead network |
1525| | agents/compute services) |
1526+-------------------------------+------------------------------------------------------+
Oleksandr Pidrepnyidabe8b22019-06-07 16:18:11 +03001527
1528
1529Don't manage services scheduling while upgrade
1530----------------------------------------------
1531For some special cases, don't manage services scheduling both enable and disable
1532before and after upgrade procedure.
1533
1534If 'manage_service_maintenance: true' or not present - default behavior, disable services
1535before upgrade and enable it after upgrade.
1536If 'manage_service_maintenance: false' - don't disable and don't enable upgraded services
1537scheduling before and after upgrade.
1538
1539.. code-block:: yaml
1540
1541 nova:
1542 upgrade:
1543 manage_service_maintenance: false
Dzmitry Stremkouskice8475b2020-07-06 20:02:58 +02001544
1545Execute database maintenance tasks
1546----------------------------------
1547Cleanup stale records from nova database to make it smaller.
1548This is helpful before any upgrade activity.
1549It is safe to execute it generally without maintenance window same as online db_sync.
1550
1551Enable this pillar:
1552
1553.. code-block:: yaml
1554
1555 nova:
1556 controller:
1557 db_purge:
1558 enabled: True
1559
1560Execute state nova.db.db_cleanup to purge stale records:
1561
1562.. code-block:: bash
1563
1564 salt -C 'I@nova:controller:role:primary' state.apply nova.db.db_cleanup -l debug
1565
1566Starting from rocky release it is possible to pass days parameter.
1567If you skip setting it, all records would be archived/purged:
1568
1569.. code-block:: yaml
1570
1571 nova:
1572 controller:
1573 db_purge:
1574 enabled: True
1575 days: 45
1576
1577Control pre-rocky releases parameters:
1578
1579.. code-block:: yaml
1580
1581 nova:
1582 controller:
1583 db_purge:
1584 enabled: True
1585 max_rows: 1000
1586 verbose: True
1587
1588Control rocky+ releases parameters:
1589'days' and 'all' parameters are mutually exclusive.
1590
1591.. code-block:: yaml
1592
1593 nova:
1594 controller:
1595 db_purge:
1596 enabled: True
1597 all: True
1598 verbose: True
1599 all_cells: True
Vladimir Khlyunev76b9e342020-09-15 12:39:55 +04001600
1601
1602Configure filter schedulers
1603---------------------------
1604At this moment only max_instances_per_host for NumInstancesFilter is supported.
1605
1606.. code-block:: yaml
1607
1608 nova:
1609 controller:
1610 filter_scheduler:
1611 max_instances_per_host: 50
Roman Lubianyic35585d2022-07-26 11:41:18 +02001612
1613Enable Nova nova-serialproxy service:
1614
1615.. code-block:: yaml
1616
1617 nova:
1618 controller:
1619 ....
1620 serial_proxy:
1621 enabled: True