Hi Benedict, On Wed, Feb 18, 2026 at 12:40:25PM +0000, Weis, Benedict wrote: > Hi Willy, > > thank you for the insightful explanation. We did not initially consider > setting the precedence of the state file IP via init-add last. > > It is however interesting to us that this only affects the IP address and > that the port seems to always be taken from the state file. Is there also > some option or workaround to control where the port is read from?
I'm pretty sure it was because the original purpose was only to preserve DNS-learned info and that the DNS only changes the IP, not the port. I'm not aware of a way to preserve the port in case of such a change. > Anyways, it seems confusing to us that the default behavior is to read the IP > address from the config and the port from the state file. Does this not lead > to confusion and possibly even corrupt states? I totally understand, and as I said, it really comes from the fact that the feature has outlived its initial purpose and started to be used for more dynamic things than initially planned. We all know the correct solution to this: switch the file format to v2, and dump for each parameter, both the initial one and the current one. Then on reload, compare the new one with the previous initial one. If they differ, always use the new one, otherwise use the previous one. This way we can ensure to always use the most up-to-date values for everything and it will solve about all remaining problems. There might be corner cases where some parameters depend on other (e.g. detect if the address or port or something was manually changed in the config and ignore a given set of older settings), but that's the idea. We could for example consider that if the IP or port changed in the config, maybe the previous health state no longer applies. Regards, Willy

