[Kea-users] timers defined on gloval scope are not exported with the get-config command

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Kea-users] timers defined on gloval scope are not exported with the get-config command

itay cohen
hello all

i have this configuration on the global scope
        "renew-timer": 900,
        "rebind-timer": 1800,
        "valid-lifetime": 3600,
it is used as the "default" timers, unless a timer is configured on the subnet level.

when i use the get-config command i cant see the timers configured on the global level.

please advise,

itay



_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] timers defined on gloval scope are not exported with the get-config command

Francis Dupont
itay cohen writes:
> i have this configuration on the global scope
>         "renew-timer": 900,
>         "rebind-timer": 1800,
>         "valid-lifetime": 3600,
> it is used as the "default" timers, unless a timer is configured on the
> subnet level.
>
> when i use the get-config command i cant see the timers configured on the
> global level.

=> I have a question which is in fact the response: is your concern
the fact you can't see these timers at the global scope, or the fact
there are some subnets where no specific timer values are configured
and a default value copied from the global scope is not configured?

Regards

Francis Dupont <[hidden email]>

PS: if the action of deriveParams (src/lib/cc/simple_parser.h) is misleading
we have somewhere the code of a factorParams doing the opposite.
It was considered as too complex and potentially even more misleading
(i.e. clearly against the least astonishment principle) so was not adopted.
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] timers defined on gloval scope are not exported with the get-config command

itay cohen
hi
my concern is that some parameters are configured in the config file, and when i'm pulling the configuration via api the parameters are not there,

thank you for your replay

itay



On Tue, Oct 3, 2017 at 8:26 PM, Francis Dupont <[hidden email]> wrote:
itay cohen writes:
> i have this configuration on the global scope
>         "renew-timer": 900,
>         "rebind-timer": 1800,
>         "valid-lifetime": 3600,
> it is used as the "default" timers, unless a timer is configured on the
> subnet level.
>
> when i use the get-config command i cant see the timers configured on the
> global level.

=> I have a question which is in fact the response: is your concern
the fact you can't see these timers at the global scope, or the fact
there are some subnets where no specific timer values are configured
and a default value copied from the global scope is not configured?

Regards

Francis Dupont <[hidden email]>

PS: if the action of deriveParams (src/lib/cc/simple_parser.h) is misleading
we have somewhere the code of a factorParams doing the opposite.
It was considered as too complex and potentially even more misleading
(i.e. clearly against the least astonishment principle) so was not adopted.


_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] timers defined on gloval scope are not exported with the get-config command

Tomek Mrugalski
W dniu 04.10.2017 o 06:25, itay cohen pisze:
> my concern is that some parameters are configured in the config file,
> and when i'm pulling the configuration via api the parameters are not there,
The short answer to this is: can you submit a bug report for this on
kea.isc.org?

The slightly longer answer is that we use the values while parsing the
configuration to derive values in subnets, but afterwards do not store
the global values. The config returned has the values applied to subnets
that did't have the values specified.

We can extend the configuration handling code to keep the global values.
This is easy to do. What we can't fix is the values returned by subnets
that did have the global values applied to.

So, the global timers would be returned as you defined them, but the
subnets that had those global timers applied, would return their values
as well. Would that be ok?

Tomek
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] timers defined on gloval scope are not exported with the get-config command

itay cohen
the global timers would be returned as you defined them <-- that would be grate.

the subnets that had those global timers applied, would return their values as well. Would that be ok? <-- maybe add an indication to know that is from global and not local 

thank you
itay,

On Wed, Oct 4, 2017 at 4:07 PM, Tomek Mrugalski <[hidden email]> wrote:
W dniu 04.10.2017 o 06:25, itay cohen pisze:
> my concern is that some parameters are configured in the config file,
> and when i'm pulling the configuration via api the parameters are not there,
The short answer to this is: can you submit a bug report for this on
kea.isc.org?

The slightly longer answer is that we use the values while parsing the
configuration to derive values in subnets, but afterwards do not store
the global values. The config returned has the values applied to subnets
that did't have the values specified.

We can extend the configuration handling code to keep the global values.
This is easy to do. What we can't fix is the values returned by subnets
that did have the global values applied to.

So, the global timers would be returned as you defined them, but the
subnets that had those global timers applied, would return their values
as well. Would that be ok?

Tomek
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users


_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] timers defined on gloval scope are not exported with the get-config command

Tomek Mrugalski
W dniu 04.10.2017 o 17:05, itay cohen pisze:
> the global timers would be returned as you defined them <-- that would
> be grate.
Cool.

> the subnets that had those global timers applied, would return their
> values as well. Would that be ok? <-- maybe add an indication to know
> that is from global and not local This would be difficult to do. When we parse the original configuration
and the timer values are calculated, we don't retain the information
where they came from. To store that additional value would be a
significant effort and would complicate the code a lot, so am afraid
we're not going to do it, because the benefit is far too small for the
required amount of work here.

If you want to go into more details, we have a code that once the JSON
structures are loaded, we go through them and fill in the blanks. We
first start with default values. For example, if a user didn't specify a
value for valid-lifetime, we fill it with the default. Next, we go
through the structures and derive or inherit values that are not
explicitly set. At that stage, every subnet has all timers and other
parameters defined and it is ready to be applied.

This approach simplifies the actual parser significantly, because it
doesn't have to deal with the optional parameters. Almost everything is
always specified. This makes the code much simpler, easier to maintain
and extend. The price for this approach is that we lose the information
where exactly the value came from.

Hope that explanation is ok for you.

Tomek
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users