Merge "Make pxc-strict-mode configurable via charm"

This commit is contained in:
Zuul 2018-05-23 12:26:17 +00:00 committed by Gerrit Code Review
commit e5974539a4
2 changed files with 11 additions and 1 deletions

View File

@ -227,6 +227,16 @@ options:
implication of this is one can set configuration values that could lead
to memory exhaustion during run time as memory is not allocated at
startup time.
pxc-strict-mode:
type: string
default: enforcing
description: |
Configures pxc_strict_mode (https://www.percona.com/doc/percona-xtradb-cluster/LATEST/features/pxc-strict-mode.html)
Valid values are 'disabled', 'permissive', 'enforcing' and 'master.'
Defaults to 'enforcing', as this is what PXC5.7 on bionic (and above)
does.
This option is ignored on PXC < 5.7 (xenial defaults to 5.6, trusty
defaults to 5.5)
tuning-level:
type: string
default: safest

View File

@ -216,7 +216,7 @@ def render_config(hosts=None):
context['default_storage_engine'] = 'InnoDB'
context['wsrep_log_conflicts'] = True
context['innodb_autoinc_lock_mode'] = '2'
context['pxc_strict_mode'] = 'ENFORCING'
context['pxc_strict_mode'] = config('pxc-strict-mode')
context.update(PerconaClusterHelper().parse_config())
render(os.path.basename(config_file), config_file, context, perms=0o444)