Merge "Implement new option: default_ephemeral_format"

This commit is contained in:
Zuul 2019-02-20 22:44:59 +00:00 committed by Gerrit Code Review
commit 94d97db499
12 changed files with 49 additions and 0 deletions

View File

@ -482,6 +482,12 @@ options:
Block devices to use for storage of ephermeral disks to support nova
instances; generally used in-conjunction with 'encrypt' to support
data-at-rest encryption of instance direct attached storage volumes.
default-ephemeral-format:
type: string
default: ext4
description: |
The default format an ephemeral volume will be formatted with on creation.
Possible values: ext2 ext3 ext4 xfs ntfs (only for Windows guests)
encrypt:
default: False
type: boolean

View File

@ -213,6 +213,10 @@ class NovaComputeLibvirtContext(context.OSContextGenerator):
if config('use-multipath'):
ctxt['use_multipath'] = config('use-multipath')
if config('default-ephemeral-format'):
ctxt['default_ephemeral_format'] = \
config('default-ephemeral-format')
if config('cpu-mode'):
ctxt['cpu_mode'] = config('cpu-mode')
elif ctxt['arch'] in ('ppc64el', 'ppc64le', 'aarch64'):

View File

@ -176,5 +176,8 @@ disk_cachemodes = {{ disk_cachemodes }}
{% if use_multipath -%}
iscsi_use_multipath = {{ use_multipath }}
{% endif %}
{% if default_ephemeral_format -%}
default_ephemeral_format = {{ default_ephemeral_format }}
{% endif %}
{% include "parts/section-ephemeral" %}

View File

@ -171,6 +171,9 @@ disk_cachemodes = {{ disk_cachemodes }}
{% if use_multipath -%}
iscsi_use_multipath = {{ use_multipath }}
{% endif %}
{% if default_ephemeral_format -%}
default_ephemeral_format = {{ default_ephemeral_format }}
{% endif %}
{% include "parts/section-cinder" %}

View File

@ -192,6 +192,9 @@ disk_cachemodes = {{ disk_cachemodes }}
{% if use_multipath -%}
iscsi_use_multipath = {{ use_multipath }}
{% endif %}
{% if default_ephemeral_format -%}
default_ephemeral_format = {{ default_ephemeral_format }}
{% endif %}
{% include "parts/section-database" %}

View File

@ -196,6 +196,9 @@ disk_cachemodes = {{ disk_cachemodes }}
{% if use_multipath -%}
iscsi_use_multipath = {{ use_multipath }}
{% endif %}
{% if default_ephemeral_format -%}
default_ephemeral_format = {{ default_ephemeral_format }}
{% endif %}
{% include "parts/section-database" %}

View File

@ -208,6 +208,9 @@ live_migration_tunnelled = False
{% if use_multipath -%}
iscsi_use_multipath = {{ use_multipath }}
{% endif %}
{% if default_ephemeral_format -%}
default_ephemeral_format = {{ default_ephemeral_format }}
{% endif %}
hw_disk_discard = unmap
{% if virt_type == 'lxd' -%}

View File

@ -220,6 +220,9 @@ live_migration_tunnelled = False
{% if use_multipath -%}
volume_use_multipath = {{ use_multipath }}
{% endif %}
{% if default_ephemeral_format -%}
default_ephemeral_format = {{ default_ephemeral_format }}
{% endif %}
hw_disk_discard = unmap
{% if virt_type == 'lxd' -%}

View File

@ -224,6 +224,9 @@ live_migration_tunnelled = False
{% if use_multipath -%}
volume_use_multipath = {{ use_multipath }}
{% endif %}
{% if default_ephemeral_format -%}
default_ephemeral_format = {{ default_ephemeral_format }}
{% endif %}
hw_disk_discard = unmap
{% if virt_type == 'lxd' -%}

View File

@ -232,6 +232,9 @@ live_migration_tunnelled = False
{% if use_multipath -%}
volume_use_multipath = {{ use_multipath }}
{% endif %}
{% if default_ephemeral_format -%}
default_ephemeral_format = {{ default_ephemeral_format }}
{% endif %}
hw_disk_discard = unmap
{% if virt_type == 'lxd' -%}

View File

@ -220,6 +220,9 @@ live_migration_tunnelled = False
{% if use_multipath -%}
volume_use_multipath = {{ use_multipath }}
{% endif %}
{% if default_ephemeral_format -%}
default_ephemeral_format = {{ default_ephemeral_format }}
{% endif %}
hw_disk_discard = unmap
{% if virtio_net_tx_queue_size -%}
tx_queue_size = {{ virtio_net_tx_queue_size }}

View File

@ -216,6 +216,7 @@ class NovaComputeContextTests(CharmTestCase):
'listen_tls': 0,
'host_uuid': self.host_uuid,
'force_raw_images': True,
'default_ephemeral_format': 'ext4',
'reserved_host_memory': 512}, libvirt())
def test_libvirt_context_libvirtd_reserved_huge_pages_1(self):
@ -234,6 +235,7 @@ class NovaComputeContextTests(CharmTestCase):
'listen_tls': 0,
'host_uuid': self.host_uuid,
'force_raw_images': True,
'default_ephemeral_format': 'ext4',
'reserved_host_memory': 512,
'reserved_huge_pages': ['node:0,size:2048,count:6']}, libvirt())
@ -255,6 +257,7 @@ class NovaComputeContextTests(CharmTestCase):
'listen_tls': 0,
'host_uuid': self.host_uuid,
'force_raw_images': True,
'default_ephemeral_format': 'ext4',
'reserved_host_memory': 512,
'reserved_huge_pages': ['node:0,size:2048,count:6',
'node:1,size:1G,count:32']}, libvirt())
@ -274,6 +277,7 @@ class NovaComputeContextTests(CharmTestCase):
'listen_tls': 0,
'host_uuid': self.host_uuid,
'force_raw_images': True,
'default_ephemeral_format': 'ext4',
'reserved_host_memory': 512}, libvirt())
def test_libvirt_bin_context_migration_tcp_listen(self):
@ -293,6 +297,7 @@ class NovaComputeContextTests(CharmTestCase):
'live_migration_uri': 'qemu+ssh://%s/system',
'live_migration_permit_auto_converge': False,
'live_migration_permit_post_copy': False,
'default_ephemeral_format': 'ext4',
'force_raw_images': True,
'reserved_host_memory': 512}, libvirt())
@ -315,6 +320,7 @@ class NovaComputeContextTests(CharmTestCase):
'live_migration_permit_auto_converge': True,
'live_migration_permit_post_copy': False,
'force_raw_images': True,
'default_ephemeral_format': 'ext4',
'reserved_host_memory': 512}, libvirt())
def test_libvirt_bin_context_migration_tcp_listen_with_post_copy(self):
@ -335,6 +341,7 @@ class NovaComputeContextTests(CharmTestCase):
'live_migration_uri': 'qemu+ssh://%s/system',
'live_migration_permit_auto_converge': False,
'live_migration_permit_post_copy': True,
'default_ephemeral_format': 'ext4',
'force_raw_images': True,
'reserved_host_memory': 512}, libvirt())
@ -354,6 +361,7 @@ class NovaComputeContextTests(CharmTestCase):
'listen_tls': 0,
'host_uuid': self.host_uuid,
'force_raw_images': True,
'default_ephemeral_format': 'ext4',
'reserved_host_memory': 512}, libvirt())
def test_libvirt_hugepages(self):
@ -373,6 +381,7 @@ class NovaComputeContextTests(CharmTestCase):
'listen_tls': 0,
'host_uuid': self.host_uuid,
'force_raw_images': True,
'default_ephemeral_format': 'ext4',
'reserved_host_memory': 512}, libvirt())
def test_libvirt_context_libvirtd_force_raw_images(self):
@ -391,6 +400,7 @@ class NovaComputeContextTests(CharmTestCase):
'listen_tls': 0,
'host_uuid': self.host_uuid,
'force_raw_images': False,
'default_ephemeral_format': 'ext4',
'reserved_host_memory': 512}, libvirt())
def test_lxd_live_migration_opts_xenial(self):
@ -501,6 +511,7 @@ class NovaComputeContextTests(CharmTestCase):
'pci_passthrough_whitelist': 'mypcidevices',
'virtio_net_tx_queue_size': 512,
'virtio_net_rx_queue_size': 1024,
'default_ephemeral_format': 'ext4',
'cpu_shared_set': "4-12,^8,15"}, libvirt())
def test_ksm_configs(self):
@ -653,6 +664,7 @@ class SerialConsoleContextTests(CharmTestCase):
'listen_tls': 0,
'host_uuid': self.host_uuid,
'force_raw_images': True,
'default_ephemeral_format': 'ext4',
'reserved_host_memory': 512}, libvirt())