Change default migration-auth-type from None to ssh

The default-auth-type only matters when enable-live-migration
is enabled, so we should make the default value something that
will deploy a functional cloud without requiring multiple
config values to be set

Change-Id: Icadf1ff7ce90a6a757d258c1f1dee70b8c1d6e0c
Closes-Bug: #1722456
This commit is contained in:
Chris MacNaughton 2017-10-10 08:55:00 +02:00
parent f5eb377a2f
commit f21f460dc7
3 changed files with 6 additions and 3 deletions

View File

@ -127,7 +127,7 @@ options:
compute hosts.
migration-auth-type:
type: string
default:
default: ssh
description: |
TCP authentication scheme for libvirt live migration. Available options
include ssh.

View File

@ -182,10 +182,12 @@ class NovaComputeLibvirtContext(context.OSContextGenerator):
if config('enable-live-migration'):
ctxt['libvirtd_opts'] += ' -l'
if config('migration-auth-type') in ['none', 'None', 'ssh']:
if config('enable-live-migration') and \
config('migration-auth-type') in ['none', 'None', 'ssh']:
ctxt['listen_tls'] = 0
if config('migration-auth-type') == 'ssh':
if config('enable-live-migration') and \
config('migration-auth-type') == 'ssh':
# nova.conf
ctxt['live_migration_uri'] = 'qemu+ssh://%s/system'

View File

@ -257,6 +257,7 @@ class NovaComputeContextTests(CharmTestCase):
'kvm_hugepages': 0,
'listen_tls': 0,
'host_uuid': self.host_uuid,
'live_migration_uri': 'qemu+ssh://%s/system',
'reserved_host_memory': 512}, libvirt())
def test_libvirt_disk_cachemodes(self):