[stork-users] Stork managing Kea backend ( database )
Marcin Siodelski
marcin at isc.org
Thu Dec 19 15:23:12 UTC 2024
There are two ways of managing Kea configuration: via configuration
backend and via a configuration file. The subnet_cmds hook library
should be used when the configuration is stored in the configuration
file. The cb_cmds hook should be used when the configuration is stored
in the database.
If you have two hook libraries loaded it means that you're getting into
NOT recommended Kea configuration. You should use one or another. That's
what this configuration checker is saying and that's what this checker
is for. Having said that, I disagree with removing it because it is
doing the job it was designed for.
The real problem is, if I understand your setup correctly, Stork does
not support managing Kea configuration stored in the config database (it
doesn't support cb_cmds). Since you're using cb_cmds I understand that
you have your Kea configuration in the database, not in the config file.
Stork can only currently manage Kea configurations stored in the file.
We will be working on adding support to Stork to manage configurations
stored in the config backend (cb_cmds), but it is not currently available.
The implication of using cb_cmds together with subnet_cmds is that Stork
modifies the subnets in Kea memory and persists them into the config
file, rather than modifying them in the config backend. As a result, you
end up with two versions of the subnet configuration. One in the
database (original) and the other in the config file (newer). The
database one overrides the in memory configuration (after server
restart), so you loose the configuration changes applied by Stork after
Kea restart.
Possible ways forward are:
- do not use config backend for subnet management - use subnet_cmds
instead of cb_cmds
- do not use config backend for subnet management but for other things -
use subnet_cmds and cb_cmds but ENSURE there are no subnets in the
config backend (you can also disable the config checker) - I don't
recommend it because it is very easy to shoot your own foot with it,
- continue using cb_cmds for all the configuration - use cb_cmds only
(that precludes using Stork for subnet management until support is added),
Kind Regards,
Marcin Siodelski
ISC
On 19.12.2024 15:51, Slawek Figiel wrote:
> Hello Vadim!
>
> The "subnet_cmds" hook is required to modify the subnets and shared
> network in Stork. Support for the "cb_cmds" hook is under development.
>
> I recommend you keep the subnet_cmds" hook loaded and disable the
> confusing checker.
>
> I opened https://gitlab.isc.org/isc-projects/stork/-/issues/1654 to
> remove it, as the suggestion is confusing. This checker was
> implemented when we didn't support the subnet hook.
>
> Regards,
> Slawek Figiel
>
> On 18/12/2024 21:08, Vadim Yakovenko wrote:
>> Hello.
>>
>> I'm using Stork server 2.0
>> The server is reporting the following issue:
>>
>> /It is recommended that the 'subnet_cmds' hook library not be used to
>> manage subnets when the configuration backend is used as a source of
>> information about the subnets. The 'subnet_cmds' hook library
>> modifies the local subnets configuration in the server's memory, not
>> in the database. Use the 'cb_cmds' hook library to manage the subnets
>> information in the database instead./
>> /
>> /
>> When I remove the subnet_cmds library I can't add any subnets via
>> stork. I'm getting the following message:
>>
>> In order to apply configuration changes, the server should begin a
>> transaction between the user and the server. The server should also
>> return current data required in the form where the subnet information
>> is specified. Unfortunately, starting the new transaction failed with
>> the following error:
>> /Unable to begin transaction because there are no Kea servers with
>> subnet_cmds hooks library available/
>> Retrying can help in some cases.
>>
>> To me it looks like a dead loop. I can't use subnet_cmds because I
>> have to use cb_cmds for database backend, but I can't add any subnets
>> without subnet_cmds. How am I supposed to manage subnets via Stork ???
>> -Vadim
>>
>
More information about the Stork-users
mailing list