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

FR: A including of config files #208

Open
tsv1991 opened this issue Aug 11, 2023 · 5 comments
Open

FR: A including of config files #208

tsv1991 opened this issue Aug 11, 2023 · 5 comments

Comments

@tsv1991
Copy link

tsv1991 commented Aug 11, 2023

For large installations (more than 1000 interfaces) a including of config files is very lacking. It would be convenient to store a configuration for each interface in separate files.
For example: /run/radvd/radvd.conf.d/br145.conf

@stappersg
Copy link
Member

stappersg commented Aug 11, 2023 via email

@robbat2
Copy link
Member

robbat2 commented Aug 20, 2023

@tsv1991 can you provide some more details about this running with "more than 1000 interfaces".

  • Is it being run as a single large instance with all interfaces, or one instance per interface, something in-between?
  • Would you need globbing to include the config files?
  • This leads into the discussion of dynamic config reloads; what is the present behavior for a large config?
  • Does it start fast enough?
  • what if there's an error for a single interface?

@tsv1991
Copy link
Author

tsv1991 commented Aug 21, 2023

@robbat2

  • We run radvd as one large instance.
  • Yes, it could be something like include radvd.conf.d/*.conf
  • Typical HUP call enough
  • It works fast enough, almost instantly:
Aug 22 01:40:36 debian-rt systemd[1]: Reloading radvd.service - Router advertisement daemon for IPv6...
Aug 22 01:40:36 debian-rt radvd[1199]: config file, /etc/radvd.conf, syntax ok
Aug 22 01:40:36 debian-rt systemd[1]: Reloaded radvd.service - Router advertisement daemon for IPv6.

On this example we have 1000 interfaces described in one file.

  • The same as with a single configuration file. I think that including files should work as an extension of the main one and the config should be combined as a single.

@robbat2
Copy link
Member

robbat2 commented Aug 28, 2023

  • Should individual files pass validation in isolation?
  • Can a file be included multiple times (e.g. as common data)?
  • Should we detect/abort circular includes?

@tsv1991
Copy link
Author

tsv1991 commented Aug 29, 2023

@robbat2 I think that all included files should processed as a single file config.
Included files are just extension of main config.
For example:
radvd.conf:

interface dum3{
  IgnoreIfMissing on;
};
include{
 ./*.conf
};

config1.conf:

interface br9551 {
    IgnoreIfMissing on;
    AdvDefaultPreference medium;
    AdvManagedFlag off;
    MaxRtrAdvInterval 600;
    AdvReachableTime 0;
    AdvIntervalOpt on;
    AdvSendAdvert on;
    AdvOtherConfigFlag off;
    AdvRetransTimer 0;
    AdvCurHopLimit 64;
    prefix 2a0f:1::/64 {
        AdvAutonomous on;
        AdvValidLifetime 2592000;
        AdvOnLink on;
        AdvPreferredLifetime 14400;
    };
};

config2.conf:

interface br9553 {
    IgnoreIfMissing on;
    AdvDefaultPreference medium;
    AdvManagedFlag off;
    MaxRtrAdvInterval 600;
    AdvReachableTime 0;
    AdvIntervalOpt on;
    AdvSendAdvert on;
    AdvOtherConfigFlag off;
    AdvRetransTimer 0;
    AdvCurHopLimit 64;
    prefix 2a0f:2::/64 {
        AdvAutonomous on;
        AdvValidLifetime 2592000;
        AdvOnLink on;
        AdvPreferredLifetime 14400;
    };
};

And RADVD shoud treat this construct as a single config:

interface dum3{
  IgnoreIfMissing on;
};
interface br9551 {
    IgnoreIfMissing on;
    AdvDefaultPreference medium;
    AdvManagedFlag off;
    MaxRtrAdvInterval 600;
    AdvReachableTime 0;
    AdvIntervalOpt on;
    AdvSendAdvert on;
    AdvOtherConfigFlag off;
    AdvRetransTimer 0;
    AdvCurHopLimit 64;
    prefix 2a0f:1::/64 {
        AdvAutonomous on;
        AdvValidLifetime 2592000;
        AdvOnLink on;
        AdvPreferredLifetime 14400;
    };
};
interface br9553 {
    IgnoreIfMissing on;
    AdvDefaultPreference medium;
    AdvManagedFlag off;
    MaxRtrAdvInterval 600;
    AdvReachableTime 0;
    AdvIntervalOpt on;
    AdvSendAdvert on;
    AdvOtherConfigFlag off;
    AdvRetransTimer 0;
    AdvCurHopLimit 64;
    prefix 2a0f:2::/64 {
        AdvAutonomous on;
        AdvValidLifetime 2592000;
        AdvOnLink on;
        AdvPreferredLifetime 14400;
    };
};

I think that nginx has good config including implementation.

@radvd-project radvd-project deleted a comment from Neustradamus Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants