Closed Ithanil closed 2 months ago
Thanks -- will review.
@Ithanil Can this be rebased please?
@farhatahmad I opted for a merge, because rebase is a bit convoluted in this case. FYI: We use the present code + https://github.com/blindsidenetworks/scalelite/pull/1050 in production since Monday, no indication of any problems so far.
Description
This PR implements a new feature called "Server Tags" or "Tagged Servers".
It is supposed to work as follows:
This feature allows to provide users the choice of specially configured servers (e.g. optimized for very large conferences) or newer, potentially less stable, BBB versions, without the need of using dedicated LB + Frontend infrastructures. It might be very useful for the transition to BBB 3.0, of which I know many admins are afraid due to the amount of changes in the BBB backend.
Note: Because in the current handling of the create call, Server.find_available will always be executed before checking for existing meetings, any error raised in that method will lead to the create call failing (even if the meeting does already exist). This could happen before, if no more valid server are in server_load. Now it could also happen if no servers with a required tag are present, or no untagged servers when falling back from an optional tag. Merging https://github.com/blindsidenetworks/scalelite/pull/1050 would change that such that an existing meeting will be selected even if find_available would fail (for any reason).
TODO:
Testing Steps
For the already added code I have added corresponding automated tests. The code is also already used in actual production deployment, but in combination with https://github.com/blindsidenetworks/scalelite/pull/1050 and https://github.com/blindsidenetworks/scalelite/pull/1052.
Ideas for Greenlight
I imagine to have a per-role configuration of allowed tags, analogue to the allowed recording visibilities configuration. The difference would be however, that here we need a configurable list of possible tags, unlike the fixed/hardcoded list of possible recording visibilities.
Other ideas
It turned out that one could also "abuse" this feature to achieve per-tenant server pools by enforcing a certain meta_server-tag via OVERRIDE_CREATE_PARAMS for each (or some) tenants. But I think it would be better to have this as an explicit feature and it could be implemented in a very similar way to tags, by allowing to set a list of tenant IDs for a server to restrict the usage to them. But I think I'll wait for a review on the current PRs before working on this.
Merge with PR 1052
After merging https://github.com/blindsidenetworks/scalelite/pull/1052,
find_available
inapp/models/server.rb
will look like this: