CloudNetService / CloudNet

A modern application that can dynamically and easily deliver Minecraft oriented software
https://cloudnetservice.eu
Apache License 2.0
371 stars 115 forks source link

fix: only start smart services on allowed nodes #1315

Closed 0utplay closed 10 months ago

0utplay commented 10 months ago

Motivation

A service task can specify which nodes are allowed to pick up a service that is about to start using the allowedNodes option. The smart modules extends some of these tasks options by allowing to choose if the task should be spread evenly onto other nodes using splitLogicallyOverNodes. But now these two options are clashing because the smart module would not check if the service is allowed to start on the node that was chosen for logically splitting the services.

Modification

Added a check to the smart modules splitLogicallyOverNodes handling which makes sure that only nodes are chosen that are allowed (if any are specified).

Result

The smart module options and service task options are not clashing anymore and respecting each other.

Other context

Fixes #1312