You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See tarantool/tarantool#9452 for the problem
statement. In short: some upgrade scenarios may need to configure
tarantool instances differently depending on a tarantool version.
A new top level configuration block is added for this purpose: conditional. Let's look on an example:
conditional:
- if: tarantool_version >= 3.99.0 && tarantool_version < 4.0.0# This section shouldn't be validated and shouldn't be applied.replication:
new_option: foo
- if: tarantool_version < 3.99.0# This section is to be applied.process:
title: '{{ instance_name }} -- in upgrade'
The block contains an array of conditional sections, each accompanied by if predicate to determine, whether to apply it on particular tarantool
version. (if is required.)
If a section is not to be applied on the given version, it is not
validated at all and may contain unknown options.
If a section is to be applied, it must match the cluster configuration
schema like the main config.
If the same option is set by several sections with true predicate, the
last section wins.
The if expression supports one data type: version. A value may be
referenced in two ways:
Version literal: 1.2.3 (three components, not less, not more).
Variable: tarantool_version (only this variable is supported).
tarantool_version is assumed as three components version, say, 3.0.0.
The operations are the following.
Logical OR: ||
Logical AND: &&
Compare: >, <, >=, <=, ==, !=
Parentheses: (, )
All the comparisons assume the versions as three component ones.
Requested by @ Totktonada in tarantool/tarantool@6206f74.
The text was updated successfully, but these errors were encountered:
Related dev. issue(s): tarantool/tarantool#9452
Product: Tarantool
Since: 3.0
Root document:
SME: @ Totktonada
Details
See tarantool/tarantool#9452 for the problem
statement. In short: some upgrade scenarios may need to configure
tarantool instances differently depending on a tarantool version.
A new top level configuration block is added for this purpose:
conditional
. Let's look on an example:The block contains an array of conditional sections, each accompanied by
if
predicate to determine, whether to apply it on particular tarantoolversion. (
if
is required.)If a section is not to be applied on the given version, it is not
validated at all and may contain unknown options.
If a section is to be applied, it must match the cluster configuration
schema like the main config.
If the same option is set by several sections with true predicate, the
last section wins.
The
if
expression supports one data type:version
. A value may bereferenced in two ways:
1.2.3
(three components, not less, not more).tarantool_version
(only this variable is supported).tarantool_version
is assumed as three components version, say, 3.0.0.The operations are the following.
||
&&
>
,<
,>=
,<=
,==
,!=
(
,)
All the comparisons assume the versions as three component ones.
Requested by @ Totktonada in tarantool/tarantool@6206f74.
The text was updated successfully, but these errors were encountered: