Merge instances-path for testing
This commit is contained in:
commit
9f5c6cc83f
|
@ -89,6 +89,9 @@ options:
|
|||
default: eth1
|
||||
type: string
|
||||
description: Network interface on which to build bridge
|
||||
instances-path:
|
||||
type: string
|
||||
description: Instance path to use - empty means default of /var/lib/nova/instances
|
||||
config-flags:
|
||||
type: string
|
||||
description: Comma separated list of key=value config flags to be set in nova.conf.
|
||||
|
|
|
@ -234,6 +234,10 @@ class IdentityServiceContext(OSContextGenerator):
|
|||
rdata.get('auth_protocol') or 'http',
|
||||
}
|
||||
if context_complete(ctxt):
|
||||
# NOTE(jamespage) this is required for >= icehouse
|
||||
# so a missing value just indicates keystone needs
|
||||
# upgrading
|
||||
ctxt['admin_tenant_id'] = rdata.get('service_tenant_id')
|
||||
return ctxt
|
||||
return {}
|
||||
|
||||
|
|
|
@ -100,6 +100,9 @@ class NovaComputeLibvirtContext(context.OSContextGenerator):
|
|||
# nova.conf
|
||||
ctxt['live_migration_uri'] = 'qemu+ssh://%s/system'
|
||||
|
||||
if config('instances-path') is not None:
|
||||
ctxt['instances_path'] = config('instances-path')
|
||||
|
||||
return ctxt
|
||||
|
||||
|
||||
|
|
|
@ -51,7 +51,8 @@ from nova_compute_utils import (
|
|||
NOVA_CONF,
|
||||
QUANTUM_CONF, NEUTRON_CONF,
|
||||
ceph_config_file, CEPH_SECRET,
|
||||
enable_shell, disable_shell
|
||||
enable_shell, disable_shell,
|
||||
fix_path_ownership
|
||||
)
|
||||
|
||||
from nova_compute_context import CEPH_SECRET_UUID
|
||||
|
@ -86,6 +87,10 @@ def config_changed():
|
|||
else:
|
||||
disable_shell(user='nova')
|
||||
|
||||
if config('instances-path') is not None:
|
||||
fp = config('instances-path')
|
||||
fix_path_ownership(fp, user='nova')
|
||||
|
||||
[compute_joined(rid) for rid in relation_ids('cloud-compute')]
|
||||
|
||||
CONFIGS.write_all()
|
||||
|
|
|
@ -420,3 +420,8 @@ def enable_shell(user):
|
|||
def disable_shell(user):
|
||||
cmd = ['usermod', '-s', '/bin/false', user]
|
||||
check_call(cmd)
|
||||
|
||||
|
||||
def fix_path_ownership(path, user='nova'):
|
||||
cmd = ['chown', user, path]
|
||||
check_call(cmd)
|
||||
|
|
|
@ -75,3 +75,8 @@ volume_api_class = nova.volume.cinder.API
|
|||
{% if live_migration_uri -%}
|
||||
live_migration_uri = {{ live_migration_uri }}
|
||||
{% endif -%}
|
||||
|
||||
{% if instances_path -%}
|
||||
instances_path = {{ instances_path }}
|
||||
{% endif -%}
|
||||
|
||||
|
|
|
@ -79,3 +79,8 @@ volume_api_class = nova.volume.cinder.API
|
|||
{% if live_migration_uri -%}
|
||||
live_migration_uri = {{ live_migration_uri }}
|
||||
{% endif -%}
|
||||
|
||||
{% if instances_path -%}
|
||||
instances_path = {{ instances_path }}
|
||||
{% endif -%}
|
||||
|
||||
|
|
|
@ -80,6 +80,10 @@ volume_api_class = nova.volume.cinder.API
|
|||
live_migration_uri = {{ live_migration_uri }}
|
||||
{% endif -%}
|
||||
|
||||
{% if instances_path -%}
|
||||
instances_path = {{ instances_path }}
|
||||
{% endif -%}
|
||||
|
||||
{% if sections and 'DEFAULT' in sections -%}
|
||||
{% for key, value in sections['DEFAULT'] -%}
|
||||
{{ key }} = {{ value }}
|
||||
|
|
Loading…
Reference in New Issue