orleans icon indicating copy to clipboard operation
orleans copied to clipboard

Subnet configuration is not usable with programmatic configuration

Open benjaminpetit opened this issue 9 years ago • 5 comments

In a "multi-homed" silo, the silo will choose the IP address to use by filtering with NodeConfiguration.Subnet. The issue is that this property is internal only, and this valus is set only if we are loading a xml configuration file: https://github.com/dotnet/orleans/blob/master/src/Orleans/Configuration/ClusterConfiguration.cs#L89

I think we should either

  1. Make NodeConfiguration.Subnet public: user can directly set the default value. It will also allow to customize this value per node using ClusterConfiguration.Overrides. We could then deprecate/remove GlobalConfiguration.Subnet, but this is a breaking change.
  2. When setting GlobalConfiguration.Subnet, propagate it to NodeConfiguration.Subnet: we need to be sure that there is no issue with the current configuration parsing.

I am more leaning to solution 1. We could also rename the field since I find it a bit misleading: it is not really a subnet, more a "IpAddress.StartWith(xx)". Or implement a real subnet check.

benjaminpetit avatar Jul 06 '17 22:07 benjaminpetit

+1 for first option. It is a small breaking change, and it brought more flexibility and ability to programmatic config.

And I think we should do a real subset check, instead of change subnet to "IpAddressPrefix", for the purpose of less breaking change.

xiazen avatar Jul 07 '17 21:07 xiazen

I'm in favor of option 2. The thinking here was that settings such as "subnet" (or IP address prefix) would be the same across all silos in the cluster. Hence, it is set as part of GlobalConfiguiration. Is there really a case for overriding "subnet" on a silo by silo basis?

sergeybykov avatar Jul 11 '17 15:07 sergeybykov

You could deploy a new set of silos that lives on a different subnet, but that can reach the "original" subnet. I agree that it is an edge case, but it is not harder for us to implement and it will give total flexibility if needed.

And I think we really should implement a real subnet network option (IP Address + netmask)

benjaminpetit avatar Jul 11 '17 16:07 benjaminpetit

Is this needed now that #4005 has been merged?

sergeybykov avatar Feb 13 '18 02:02 sergeybykov

Not needed anymore

benjaminpetit avatar Feb 14 '18 23:02 benjaminpetit