Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to change consul serverslotsbase in dataplane api config #319

Open
rhermods opened this issue Dec 14, 2023 · 1 comment
Open

Unable to change consul serverslotsbase in dataplane api config #319

rhermods opened this issue Dec 14, 2023 · 1 comment

Comments

@rhermods
Copy link

Hi,
After changing serverslotsbase in the dataplane api config file to something like this:

service_discovery:
  consuls:
    - address: 127.0.0.1
      enabled: true
      port: 8500
      retrytimeout: 1
      serverslotsbase: 1
      serverslotsgrowthincrement: 3
      serverslotsgrowthtype: exponential

and restarting haproxy, the serverslotsbase setting is set to the default value again (10).

Haproxy version: 2.8.3
Dataplane version: v2.9.0

Any ideas or workarounds for this?
Thanks in advance!

@DLMSweet
Copy link

DLMSweet commented Feb 3, 2025

I ran into this as well, it looks like this is statically set in the code here:

minimumServerSlotsBase = 10

If anything less than 10 is specified for server_slots_base or server_slots_growth_increment, it resets it to 10 as the minimum.

Since this is set as a constant, it seems like to get around it we'd have to change it locally and build a custom version. Is there anyway to change that to a variable that can be set either in a configuration file or in the command line arguments?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants