Browse Source

Mount OVMF path for nova-compute and libvirt to support uefi

Override helm chart to mount OVMF path for nova-compute
and libvirt pods to support uefi boot VM creating

Closes-Bug: 1814335

Change-Id: Ib876971ff096a68fd3a65ed37a8e295a475641d8
Signed-off-by: Sun Austin <austin.sun@intel.com>
tags/v2.0.0.rc0
Sun Austin 6 months ago
parent
commit
c4766c0fde

+ 7
- 0
sysinv/sysinv/sysinv/sysinv/helm/libvirt.py View File

@@ -37,6 +37,13 @@ class LibvirtHelm(openstack.OpenstackBaseHelm):
37 37
                         'namespaces': [],
38 38
                         'clear_emulator_capabilities': 0
39 39
                     }
40
+                },
41
+                'pod': {
42
+                    'mounts': {
43
+                        'libvirt': {
44
+                            'libvirt': self._get_mount_uefi_overrides()
45
+                        }
46
+                    }
40 47
                 }
41 48
             }
42 49
         }

+ 5
- 0
sysinv/sysinv/sysinv/sysinv/helm/nova.py View File

@@ -65,6 +65,11 @@ class NovaHelm(openstack.OpenstackBaseHelm):
65 65
         overrides = {
66 66
             common.HELM_NS_OPENSTACK: {
67 67
                 'pod': {
68
+                    'mounts': {
69
+                        'nova_compute': {
70
+                            'nova_compute': self._get_mount_uefi_overrides()
71
+                        }
72
+                    },
68 73
                     'replicas': {
69 74
                         'api_metadata': self._num_controllers(),
70 75
                         'placement': self._num_controllers(),

+ 25
- 0
sysinv/sysinv/sysinv/sysinv/helm/openstack.py View File

@@ -396,3 +396,28 @@ class OpenstackBaseHelm(base.BaseHelm):
396 396
     def _get_service_default_dns_name(self, service):
397 397
         return "{}.{}.svc.{}".format(service, common.HELM_NS_OPENSTACK,
398 398
                                      constants.DEFAULT_DNS_SERVICE_DOMAIN)
399
+
400
+    def _get_mount_uefi_overrides(self):
401
+
402
+        # This path depends on OVMF packages and for starlingx
403
+        # we don't care about aarch64.
404
+        # This path will be used by nova-compute and libvirt pods.
405
+        uefi_loader_path = "/usr/share/OVMF"
406
+
407
+        uefi_config = {
408
+            'volumes': [
409
+                {
410
+                    'name': 'ovmf',
411
+                    'hostPath': {
412
+                        'path': uefi_loader_path
413
+                    }
414
+                }
415
+            ],
416
+            'volumeMounts': [
417
+                {
418
+                    'name': 'ovmf',
419
+                    'mountPath': uefi_loader_path
420
+                },
421
+            ]
422
+        }
423
+        return uefi_config

Loading…
Cancel
Save