[Kea-users] Kea 1.6 with MySQL Cluster

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

[Kea-users] Kea 1.6 with MySQL Cluster

Fernando Ruza Rodriguez
Hi, I'm trying to setup kea 1.6 with MySQL NDB Cluster backend. Has someone experienced with them?

I have changed the "ENGINE" in all create tables statements with ENGINE=NDBCLUSTER in the script dhcpdb_create.mysql however when I run it I get the following errors, I think, when created the tables keadhcp.dhcp4_pool and keadhcp.dhcp6_pool for the foreign keys they have:

...

ERROR 1215 (HY000): Cannot add foreign key constraint
Query OK, 0 rows affected (0,46 sec)

Query OK, 0 rows affected (1,50 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (1,77 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,48 sec)

ERROR 1146 (42S02): Table 'keadhcp.dhcp4_pool' doesn't exist
Query OK, 0 rows affected (0,48 sec)

...

ERROR 1215 (HY000): Cannot add foreign key constraint
ERROR 1215 (HY000): Cannot add foreign key constraint
Query OK, 0 rows affected (1,65 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (1,36 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,57 sec)

ERROR 1146 (42S02): Table 'keadhcp.dhcp6_pool' doesn't exist
Query OK, 1 row affected (0,03 sec)
Rows matched: 1  Changed: 1  Warnings: 0


Thanks in advanced for any help.

Regards, Fernando.


_______________________________________________
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] Kea 1.6 with MySQL Cluster

eliotte
Not all version of ndb support foreign key. Wich version are you using?

On Friday, April 26, 2019, Fernando Ruza Rodriguez <[hidden email]> wrote:
Hi, I'm trying to setup kea 1.6 with MySQL NDB Cluster backend. Has someone experienced with them?

I have changed the "ENGINE" in all create tables statements with ENGINE=NDBCLUSTER in the script dhcpdb_create.mysql however when I run it I get the following errors, I think, when created the tables keadhcp.dhcp4_pool and keadhcp.dhcp6_pool for the foreign keys they have:

...

ERROR 1215 (HY000): Cannot add foreign key constraint
Query OK, 0 rows affected (0,46 sec)

Query OK, 0 rows affected (1,50 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (1,77 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,48 sec)

ERROR 1146 (42S02): Table 'keadhcp.dhcp4_pool' doesn't exist
Query OK, 0 rows affected (0,48 sec)

...

ERROR 1215 (HY000): Cannot add foreign key constraint
ERROR 1215 (HY000): Cannot add foreign key constraint
Query OK, 0 rows affected (1,65 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (1,36 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,57 sec)

ERROR 1146 (42S02): Table 'keadhcp.dhcp6_pool' doesn't exist
Query OK, 1 row affected (0,03 sec)
Rows matched: 1  Changed: 1  Warnings: 0


Thanks in advanced for any help.

Regards, Fernando.


_______________________________________________
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] Kea 1.6 with MySQL Cluster

Fernando Ruza Rodriguez
Sorry, I've installed:

mysql-cluster-community-server-7.6.9-1.el7.x86_64

Regards, Fernando.


-----Mensaje original-----
De: Philippe Havard <[hidden email]>
Para: Fernando Ruza Rodriguez <[hidden email]>
Cc: [hidden email] <[hidden email]>
Asunto: Re: [Kea-users] Kea 1.6 with MySQL Cluster
Fecha: Fri, 26 Apr 2019 09:04:27 -0400

Not all version of ndb support foreign key. Wich version are you using?

On Friday, April 26, 2019, Fernando Ruza Rodriguez <[hidden email]> wrote:
Hi, I'm trying to setup kea 1.6 with MySQL NDB Cluster backend. Has someone experienced with them?

I have changed the "ENGINE" in all create tables statements with ENGINE=NDBCLUSTER in the script dhcpdb_create.mysql however when I run it I get the following errors, I think, when created the tables keadhcp.dhcp4_pool and keadhcp.dhcp6_pool for the foreign keys they have:

...

ERROR 1215 (HY000): Cannot add foreign key constraint
Query OK, 0 rows affected (0,46 sec)

Query OK, 0 rows affected (1,50 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (1,77 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,48 sec)

ERROR 1146 (42S02): Table 'keadhcp.dhcp4_pool' doesn't exist
Query OK, 0 rows affected (0,48 sec)

...

ERROR 1215 (HY000): Cannot add foreign key constraint
ERROR 1215 (HY000): Cannot add foreign key constraint
Query OK, 0 rows affected (1,65 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (1,36 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,57 sec)

ERROR 1146 (42S02): Table 'keadhcp.dhcp6_pool' doesn't exist
Query OK, 1 row affected (0,03 sec)
Rows matched: 1  Changed: 1  Warnings: 0


Thanks in advanced for any help.

Regards, Fernando.



_______________________________________________
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] Kea 1.6 with MySQL Cluster

Fernando Ruza Rodriguez
In the MySQL Management node I have:

ndb_mgm> show
Cluster Configuration
---------------------
[ndbd(NDB)] 3 node(s)
id=2 @192.168.100.6  (mysql-5.7.25 ndb-7.6.9, Nodegroup: 0, *)
id=3 @192.168.110.16  (mysql-5.7.25 ndb-7.6.9, Nodegroup: 0)
id=4 @192.168.120.26  (mysql-5.7.25 ndb-7.6.9, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.100.7  (mysql-5.7.25 ndb-7.6.9)

[mysqld(API)] 3 node(s)
id=5 @192.168.100.6  (mysql-5.7.25 ndb-7.6.9)
id=6 @192.168.110.16  (mysql-5.7.25 ndb-7.6.9)
id=7 @192.168.120.26  (mysql-5.7.25 ndb-7.6.9)


Regards, Fernando.


-----Mensaje original-----
De: Fernando Ruza Rodriguez <[hidden email]>
Para: [hidden email] <[hidden email]>
Asunto: Re: [Kea-users] Kea 1.6 with MySQL Cluster
Fecha: Fri, 26 Apr 2019 15:09:34 +0200

Sorry, I've installed:

mysql-cluster-community-server-7.6.9-1.el7.x86_64

Regards, Fernando.


-----Mensaje original-----
De: Philippe Havard <[hidden email]>
Para: Fernando Ruza Rodriguez <[hidden email]>
Cc: [hidden email] <[hidden email]>
Asunto: Re: [Kea-users] Kea 1.6 with MySQL Cluster
Fecha: Fri, 26 Apr 2019 09:04:27 -0400

Not all version of ndb support foreign key. Wich version are you using?

On Friday, April 26, 2019, Fernando Ruza Rodriguez <[hidden email]> wrote:
Hi, I'm trying to setup kea 1.6 with MySQL NDB Cluster backend. Has someone experienced with them?

I have changed the "ENGINE" in all create tables statements with ENGINE=NDBCLUSTER in the script dhcpdb_create.mysql however when I run it I get the following errors, I think, when created the tables keadhcp.dhcp4_pool and keadhcp.dhcp6_pool for the foreign keys they have:

...

ERROR 1215 (HY000): Cannot add foreign key constraint
Query OK, 0 rows affected (0,46 sec)

Query OK, 0 rows affected (1,50 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (1,77 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,48 sec)

ERROR 1146 (42S02): Table 'keadhcp.dhcp4_pool' doesn't exist
Query OK, 0 rows affected (0,48 sec)

...

ERROR 1215 (HY000): Cannot add foreign key constraint
ERROR 1215 (HY000): Cannot add foreign key constraint
Query OK, 0 rows affected (1,65 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (1,36 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,57 sec)

ERROR 1146 (42S02): Table 'keadhcp.dhcp6_pool' doesn't exist
Query OK, 1 row affected (0,03 sec)
Rows matched: 1  Changed: 1  Warnings: 0


Thanks in advanced for any help.

Regards, Fernando.


_______________________________________________
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] Kea 1.6 with MySQL Cluster

Fernando Ruza Rodriguez
In reply to this post by Fernando Ruza Rodriguez
Sorry, I said kea version 1.6 and I wanted to say: kea version 1.5. It is a restriction regarding foreign keys and on update cascade:

https://dev.mysql.com/doc/mysql-cluster-excerpt/5.7/en/mysql-cluster-limitations-syntax.html

Restrictions on foreign keys.  Support for foreign key constraints in NDB 7.5 is comparable to that provided by InnoDB, subject to the following restrictions:

  • ON UPDATE CASCADE is not supported when the reference is to the parent table's primary key.

    This is because an update of a primary key is implemented as a delete of the old row (containing the old primary key) plus an insert of the new row (with a new primary key). This is not visible to the NDB kernel, which views these two rows as being the same, and thus has no way of knowing that this update should be cascaded.

I have downloaded and installed kea version 1.4.0-P1 and replaced in mysql script the engine from INNODB to NDBCLUSTER and now the database is created correctly.

Thanks and regards,

Fernando. 


-----Mensaje original-----
De: Fernando Ruza Rodriguez <[hidden email]>
Para: [hidden email]
Asunto: [Kea-users] Kea 1.6 with MySQL Cluster
Fecha: Fri, 26 Apr 2019 14:55:19 +0200

Hi, I'm trying to setup kea 1.6 with MySQL NDB Cluster backend. Has someone experienced with them?

I have changed the "ENGINE" in all create tables statements with ENGINE=NDBCLUSTER in the script dhcpdb_create.mysql however when I run it I get the following errors, I think, when created the tables keadhcp.dhcp4_pool and keadhcp.dhcp6_pool for the foreign keys they have:

...

ERROR 1215 (HY000): Cannot add foreign key constraint
Query OK, 0 rows affected (0,46 sec)

Query OK, 0 rows affected (1,50 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (1,77 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,48 sec)

ERROR 1146 (42S02): Table 'keadhcp.dhcp4_pool' doesn't exist
Query OK, 0 rows affected (0,48 sec)

...

ERROR 1215 (HY000): Cannot add foreign key constraint
ERROR 1215 (HY000): Cannot add foreign key constraint
Query OK, 0 rows affected (1,65 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (1,36 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,57 sec)

ERROR 1146 (42S02): Table 'keadhcp.dhcp6_pool' doesn't exist
Query OK, 1 row affected (0,03 sec)
Rows matched: 1  Changed: 1  Warnings: 0


Thanks in advanced for any help.

Regards, Fernando.

_______________________________________________
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] Kea 1.5 with MySQL Cluster

Fernando Ruza Rodriguez
Hi again!

I've read in the kea 1.5.0 release notes: https://ftp.isc.org/isc/kea/1.5.0/Kea150ReleaseNotes.txt the following:

**Configuration Backend design** - The Configuration Backend feature is 
now planned for Kea 1.6.0. It will provide the ability to use a database as 
a source of configuration information for the Kea DHCP servers. Even though 
the Configuration Backend is not functional in the Kea 1.5.0 release, the 
design for this feature was created and some basic elements implementing 
this design are included in the current version. The most prominent change 
is the update of the MySQL schema to include new tables, constraints and 
indexes to be used by the Configuration Backend feature once it is 
implemented. These elements are currently unused, but they will be created 
in the existing database instances once the MySQL database is upgraded to 
the version supported by Kea 1.5.0 release. The design of the Configuration 
Backend is available at 
https://gitlab.isc.org/isc-projects/kea/wikis/designs/configuration-in-db-des
ign.

And I see in the "Kea Configuration Backend Design: https://gitlab.isc.org/isc-projects/kea/wikis/designs/configuration-in-db-design" that the both tables what I'm having problems with MySQL NDB cluster are for this Configuration Backend feature that it's not used by kea version 1.5.0 yet. So, Could I obviate these tables and keep engine to innodb in them and still use kea version 1.5.0 in MySQL NDB cluster ?? What do you think ??.

Thanks for any reply.

Regards, Fernando.


-----Mensaje original-----
De: Fernando Ruza Rodriguez <[hidden email]>
Para: [hidden email]
Asunto: Re: [Kea-users] Kea 1.6 with MySQL Cluster
Fecha: Mon, 29 Apr 2019 11:53:53 +0200

Sorry, I said kea version 1.6 and I wanted to say: kea version 1.5. It is a restriction regarding foreign keys and on update cascade:

https://dev.mysql.com/doc/mysql-cluster-excerpt/5.7/en/mysql-cluster-limitations-syntax.html

Restrictions on foreign keys.  Support for foreign key constraints in NDB 7.5 is comparable to that provided by InnoDB, subject to the following restrictions:

  • ON UPDATE CASCADE is not supported when the reference is to the parent table's primary key.

    This is because an update of a primary key is implemented as a delete of the old row (containing the old primary key) plus an insert of the new row (with a new primary key). This is not visible to the NDB kernel, which views these two rows as being the same, and thus has no way of knowing that this update should be cascaded.

I have downloaded and installed kea version 1.4.0-P1 and replaced in mysql script the engine from INNODB to NDBCLUSTER and now the database is created correctly.

Thanks and regards,

Fernando. 


-----Mensaje original-----
De: Fernando Ruza Rodriguez <[hidden email]>
Para: [hidden email]
Asunto: [Kea-users] Kea 1.6 with MySQL Cluster
Fecha: Fri, 26 Apr 2019 14:55:19 +0200

Hi, I'm trying to setup kea 1.6 with MySQL NDB Cluster backend. Has someone experienced with them?

I have changed the "ENGINE" in all create tables statements with ENGINE=NDBCLUSTER in the script dhcpdb_create.mysql however when I run it I get the following errors, I think, when created the tables keadhcp.dhcp4_pool and keadhcp.dhcp6_pool for the foreign keys they have:

...

ERROR 1215 (HY000): Cannot add foreign key constraint
Query OK, 0 rows affected (0,46 sec)

Query OK, 0 rows affected (1,50 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (1,77 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,48 sec)

ERROR 1146 (42S02): Table 'keadhcp.dhcp4_pool' doesn't exist
Query OK, 0 rows affected (0,48 sec)

...

ERROR 1215 (HY000): Cannot add foreign key constraint
ERROR 1215 (HY000): Cannot add foreign key constraint
Query OK, 0 rows affected (1,65 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (1,36 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0,57 sec)

ERROR 1146 (42S02): Table 'keadhcp.dhcp6_pool' doesn't exist
Query OK, 1 row affected (0,03 sec)
Rows matched: 1  Changed: 1  Warnings: 0


Thanks in advanced for any help.

Regards, Fernando.

_______________________________________________
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

_______________________________________________
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] Kea 1.5 with MySQL Cluster

Marcin Siodelski
Fernando,

As it is stated in the Kea 1.5.0 documentation, the tables you have
issues with are unused in this release. They will be used in Kea 1.6.0.
Therefore, as long as you're using Kea 1.5.0, I see no issue with using
the workaround you're proposing.

Please note that I've created a new Kea ticket:
https://gitlab.isc.org/isc-projects/kea/issues/593 to consider the code
and/or schema changes to better facilitate cases like yours and possibly
remove the UPDATE CASCADE, but that has to be discussed between the Kea
developers first.

Marcin Siodelski
DHCP Software Engineer,
ISC



On 29/04/2019 12:41, Fernando Ruza Rodriguez wrote:

> Hi again!
>
> I've read in the kea 1.5.0 release notes:
> https://ftp.isc.org/isc/kea/1.5.0/Kea150ReleaseNotes.txt the following:
>
> /**Configuration Backend design** - The Configuration Backend feature is /
> /now planned for Kea 1.6.0. It will provide the ability to use a
> database as /
> /a source of configuration information for the Kea DHCP servers. Even
> though /
> /the Configuration Backend is not functional in the Kea 1.5.0 release, the /
> /design for this feature was created and some basic elements implementing /
> /this design are included in the current version. The most prominent
> change /
> /is the update of the MySQL schema to include new tables, constraints and /
> /indexes to be used by the Configuration Backend feature once it is /
> /implemented. These elements are currently unused, but they will be
> created /
> /in the existing database instances once the MySQL database is upgraded to /
> /the version supported by Kea 1.5.0 release. The design of the
> Configuration /
> /Backend is available at /
> /https://gitlab.isc.org/isc-projects/kea/wikis/designs/configuration-in-db-des/
> /ign./
>
>
> And I see in the "Kea Configuration Backend Design:
> https://gitlab.isc.org/isc-projects/kea/wikis/designs/configuration-in-db-design"
> that the both tables what I'm having problems with MySQL NDB cluster are
> for this Configuration Backend feature that it's not used by kea version
> 1.5.0 yet. So, Could I obviate these tables and keep engine to innodb in
> them and still use kea version 1.5.0 in MySQL NDB cluster ?? What do you
> think ??.
>
> Thanks for any reply.
>
> Regards, Fernando.
>
>
> -----Mensaje original-----
> *De*: Fernando Ruza Rodriguez <[hidden email]
> <mailto:Fernando%20Ruza%20Rodriguez%20%[hidden email]%3e>>
> *Para*: [hidden email] <mailto:[hidden email]>
> *Asunto*: Re: [Kea-users] Kea 1.6 with MySQL Cluster
> *Fecha*: Mon, 29 Apr 2019 11:53:53 +0200
>
> Sorry, I said kea version 1.6 and I wanted to say: *kea version 1.5*. It
> is a restriction regarding foreign keys and on update cascade:
>
> https://dev.mysql.com/doc/mysql-cluster-excerpt/5.7/en/mysql-cluster-limitations-syntax.html
>
> *Restrictions on foreign keys. * Support for foreign key constraints in
> NDB 7.5 is comparable to that provided by InnoDB
> <https://dev.mysql.com/doc/refman/5.7/en/innodb-storage-engine.html>,
> subject to the following restrictions:
>
>   * ON UPDATE CASCADE is not supported when the reference is to the
>     parent table's primary key.
>
>     This is because an update of a primary key is implemented as a
>     delete of the old row (containing the old primary key) plus an
>     insert of the new row (with a new primary key). This is not visible
>     to the NDB kernel, which views these two rows as being the same, and
>     thus has no way of knowing that this update should be cascaded.
>
> I have downloaded and installed kea version 1.4.0-P1 and replaced in
> mysql script the engine from INNODB to NDBCLUSTER and now the database
> is created correctly.
>
> Thanks and regards,
>
> Fernando. 
>
>
> -----Mensaje original-----
> *De*: Fernando Ruza Rodriguez <[hidden email]
> <mailto:Fernando%20Ruza%20Rodriguez%20%[hidden email]%3e>>
> *Para*: [hidden email] <mailto:[hidden email]>
> *Asunto*: [Kea-users] Kea 1.6 with MySQL Cluster
> *Fecha*: Fri, 26 Apr 2019 14:55:19 +0200
>
> Hi, I'm trying to setup kea 1.6 with MySQL NDB Cluster backend. Has
> someone experienced with them?
>
> I have changed the "ENGINE" in all create tables statements with
> ENGINE=NDBCLUSTER in the script dhcpdb_create.mysql however when I run
> it I get the following errors, I think, when created the tables
> keadhcp.dhcp4_pool and keadhcp.dhcp6_pool for the foreign keys they have:
>
> ...
>
> ERROR 1215 (HY000): Cannot add foreign key constraint
> Query OK, 0 rows affected (0,46 sec)
>
> Query OK, 0 rows affected (1,50 sec)
> Records: 0  Duplicates: 0  Warnings: 0
>
> Query OK, 0 rows affected (1,77 sec)
> Records: 0  Duplicates: 0  Warnings: 0
>
> Query OK, 0 rows affected (0,48 sec)
>
> ERROR 1146 (42S02): Table 'keadhcp.dhcp4_pool' doesn't exist
> Query OK, 0 rows affected (0,48 sec)
>
> ...
>
> ERROR 1215 (HY000): Cannot add foreign key constraint
> ERROR 1215 (HY000): Cannot add foreign key constraint
> Query OK, 0 rows affected (1,65 sec)
> Records: 0  Duplicates: 0  Warnings: 0
>
> Query OK, 0 rows affected (1,36 sec)
> Records: 0  Duplicates: 0  Warnings: 0
>
> Query OK, 0 rows affected (0,57 sec)
>
> ERROR 1146 (42S02): Table 'keadhcp.dhcp6_pool' doesn't exist
> Query OK, 1 row affected (0,03 sec)
> Rows matched: 1  Changed: 1  Warnings: 0
>
>
> Thanks in advanced for any help.
>
> Regards, Fernando.
>
> _______________________________________________
> Kea-users mailing list
> [hidden email] <mailto:[hidden email]>
> https://lists.isc.org/mailman/listinfo/kea-users
> _______________________________________________
> Kea-users mailing list
> [hidden email] <mailto:[hidden email]>
> https://lists.isc.org/mailman/listinfo/kea-users
>
>
> _______________________________________________
> 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] Kea 1.5 with MySQL Cluster

Fernando Ruza Rodriguez
Many thanks, Marcin, for your answer. Meanwhile I downgraded to 1.4.0-P1 version and it works perfectly. I'll try 1.5.0 version with the workaround soon.

Regards, Fernando.

-----Mensaje original-----
De: Marcin Siodelski <[hidden email]>
Para: Fernando Ruza Rodriguez <[hidden email]>, [hidden email]
Asunto: Re: [Kea-users] Kea 1.5 with MySQL Cluster
Fecha: Mon, 6 May 2019 14:41:22 +0200

Fernando,

As it is stated in the Kea 1.5.0 documentation, the tables you have
issues with are unused in this release. They will be used in Kea 1.6.0.
Therefore, as long as you're using Kea 1.5.0, I see no issue with using
the workaround you're proposing.

Please note that I've created a new Kea ticket:
https://gitlab.isc.org/isc-projects/kea/issues/593 to consider the code
and/or schema changes to better facilitate cases like yours and possibly
remove the UPDATE CASCADE, but that has to be discussed between the Kea
developers first.

Marcin Siodelski
DHCP Software Engineer,
ISC



On 29/04/2019 12:41, Fernando Ruza Rodriguez wrote:
> Hi again!
> 
> I've read in the kea 1.5.0 release notes:
> https://ftp.isc.org/isc/kea/1.5.0/Kea150ReleaseNotes.txt the following:
> 
> /**Configuration Backend design** - The Configuration Backend feature is /
> /now planned for Kea 1.6.0. It will provide the ability to use a
> database as /
> /a source of configuration information for the Kea DHCP servers. Even
> though /
> /the Configuration Backend is not functional in the Kea 1.5.0 release, the /
> /design for this feature was created and some basic elements implementing /
> /this design are included in the current version. The most prominent
> change /
> /is the update of the MySQL schema to include new tables, constraints and /
> /indexes to be used by the Configuration Backend feature once it is /
> /implemented. These elements are currently unused, but they will be
> created /
> /in the existing database instances once the MySQL database is upgraded to /
> /the version supported by Kea 1.5.0 release. The design of the
> Configuration /
> /Backend is available at /
> /https://gitlab.isc.org/isc-projects/kea/wikis/designs/configuration-in-db-des/
> /ign./
> 
> 
> And I see in the "Kea Configuration Backend Design:
> https://gitlab.isc.org/isc-projects/kea/wikis/designs/configuration-in-db-design"
> that the both tables what I'm having problems with MySQL NDB cluster are
> for this Configuration Backend feature that it's not used by kea version
> 1.5.0 yet. So, Could I obviate these tables and keep engine to innodb in
> them and still use kea version 1.5.0 in MySQL NDB cluster ?? What do you
> think ??.
> 
> Thanks for any reply.
> 
> Regards, Fernando.
> 
> 
> -----Mensaje original-----
> *De*: Fernando Ruza Rodriguez <[hidden email]
> <[hidden email]%3e>>
> *Para*: [hidden email] <[hidden email]>
> *Asunto*: Re: [Kea-users] Kea 1.6 with MySQL Cluster
> *Fecha*: Mon, 29 Apr 2019 11:53:53 +0200
> 
> Sorry, I said kea version 1.6 and I wanted to say: *kea version 1.5*. It
> is a restriction regarding foreign keys and on update cascade:
> 
> https://dev.mysql.com/doc/mysql-cluster-excerpt/5.7/en/mysql-cluster-limitations-syntax.html
> 
> *Restrictions on foreign keys. * Support for foreign key constraints in
> NDB 7.5 is comparable to that provided by InnoDB
> <https://dev.mysql.com/doc/refman/5.7/en/innodb-storage-engine.html>,
> subject to the following restrictions:
> 
>   * ON UPDATE CASCADE is not supported when the reference is to the
>     parent table's primary key.
> 
>     This is because an update of a primary key is implemented as a
>     delete of the old row (containing the old primary key) plus an
>     insert of the new row (with a new primary key). This is not visible
>     to the NDB kernel, which views these two rows as being the same, and
>     thus has no way of knowing that this update should be cascaded.
> 
> I have downloaded and installed kea version 1.4.0-P1 and replaced in
> mysql script the engine from INNODB to NDBCLUSTER and now the database
> is created correctly.
> 
> Thanks and regards,
> 
> Fernando. 
> 
> 
> -----Mensaje original-----
> *De*: Fernando Ruza Rodriguez <[hidden email]
> <[hidden email]%3e>>
> *Para*: [hidden email] <[hidden email]>
> *Asunto*: [Kea-users] Kea 1.6 with MySQL Cluster
> *Fecha*: Fri, 26 Apr 2019 14:55:19 +0200
> 
> Hi, I'm trying to setup kea 1.6 with MySQL NDB Cluster backend. Has
> someone experienced with them?
> 
> I have changed the "ENGINE" in all create tables statements with
> ENGINE=NDBCLUSTER in the script dhcpdb_create.mysql however when I run
> it I get the following errors, I think, when created the tables
> keadhcp.dhcp4_pool and keadhcp.dhcp6_pool for the foreign keys they have:
> 
> ...
> 
> ERROR 1215 (HY000): Cannot add foreign key constraint
> Query OK, 0 rows affected (0,46 sec)
> 
> Query OK, 0 rows affected (1,50 sec)
> Records: 0  Duplicates: 0  Warnings: 0
> 
> Query OK, 0 rows affected (1,77 sec)
> Records: 0  Duplicates: 0  Warnings: 0
> 
> Query OK, 0 rows affected (0,48 sec)
> 
> ERROR 1146 (42S02): Table 'keadhcp.dhcp4_pool' doesn't exist
> Query OK, 0 rows affected (0,48 sec)
> 
> ...
> 
> ERROR 1215 (HY000): Cannot add foreign key constraint
> ERROR 1215 (HY000): Cannot add foreign key constraint
> Query OK, 0 rows affected (1,65 sec)
> Records: 0  Duplicates: 0  Warnings: 0
> 
> Query OK, 0 rows affected (1,36 sec)
> Records: 0  Duplicates: 0  Warnings: 0
> 
> Query OK, 0 rows affected (0,57 sec)
> 
> ERROR 1146 (42S02): Table 'keadhcp.dhcp6_pool' doesn't exist
> Query OK, 1 row affected (0,03 sec)
> Rows matched: 1  Changed: 1  Warnings: 0
> 
> 
> Thanks in advanced for any help.
> 
> Regards, Fernando.
> 
> _______________________________________________
> Kea-users mailing list
> [hidden email] <[hidden email]>
> https://lists.isc.org/mailman/listinfo/kea-users
> _______________________________________________
> Kea-users mailing list
> [hidden email] <[hidden email]>
> https://lists.isc.org/mailman/listinfo/kea-users
> 
> 
> _______________________________________________
> 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