Support for semicolon-separated list of tags on create calls #1127
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR enables support for semicolon-separated lists of tags as meta_server-tag argument in create calls, which then matches all servers with any of the tags in the list. It also introduces
none
as a special tag to explicitly reference untagged servers.Description
The following is a part of the updated documentation and describes how the feature works now:
A create API call using this feature is supposed to work as follows:
NOTE: Create calls without or with ''/'!' as meta_server-tag will only match untagged servers. So, for a frontend unaware of the feature, SL will behave as previously if a pool of untagged ("default") servers is maintained. It is recommended to always add your default servers as untagged servers.
Examples
Consider the following setup:
$ bundle exec rake status
Now, consider the following examples of
meta_server-tag
parameters:meta_server-tag=
ormeta_server-tag=!
or omitting the parameter altogether are all equivalent and will place the meeting onbbb-3
(least loaded untagged).meta_server-tag=test
ormeta_server-tag=test!
will place the meeting onbbb-1
(the only match).meta_server-tag=test;test2
ormeta_server-tag=test;test2!
will place the meeting onbbb-4
(least loaded match).meta_server-tag=none
ormeta_server-tag=none!
will place the meeting onbbb-3
) (least loaded match).meta_server-tag=test3
will place the meeting onbbb-3
(fallback to least loaded untagged).meta_server-tag=test3!
will place the meeting onbbb-3
(fallback to least loaded untagged).Fixed issues
#1095