Send Netdot-devel mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://osl.uoregon.edu/mailman/listinfo/netdot-devel
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Netdot-devel digest..."
Today's Topics:
1. Re: [Netdot-users] Netdot 1.0.6 release (Kristof Van Doorsselaere)
2. [SCM] Netdot branch netdot-1.0 updated.
netdot-1.0.6-2-g9f737e7 ([email protected])
----------------------------------------------------------------------
Message: 1
Date: Fri, 25 Apr 2014 09:48:31 +0000
From: Kristof Van Doorsselaere <[email protected]>
Subject: Re: [Netdot-devel] [Netdot-users] Netdot 1.0.6 release
To: Patrick Landry <[email protected]>, Netdot-users
<[email protected]>
Cc: "[email protected]" <[email protected]>
Message-ID: <cf7ff6ff.211b7%[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
I ran into the same issue, I had to restore the db, first I forgot to drop
the db which cause another error (tables ASN already exist).
patrick?s fix solved my problem
Kristof Van Doorsselaere
On 18/04/14 01:02, "Patrick M. Landry" <[email protected]> wrote:
>I am upgrading from 1.0.4 running mysql. The "make install" generated the
>following error:
>
># cat upgrade/error.log
>DBD::mysql::db do failed: Cannot add or update a child row: a foreign key
>constraint fails (`netdot`.<result 2 when explaining filename
>'#sql-758_2'>, CONSTRAINT `fk_bgplocalas` FOREIGN KEY (`bgplocalas`)
>REFERENCES `asn` (`id`)) at ../lib/DBUTIL.pm line 592.
>ERROR while executing ALTER TABLE device ADD CONSTRAINT `fk_bgplocalas`
>FOREIGN KEY (`bgplocalas`) REFERENCES `asn` (`id`): DBD::mysql::db do
>failed: Cannot add or update a child row: a foreign key constraint fails
>(`netdot`.<result 2 when explaining filename '#sql-758_2'>, CONSTRAINT
>`fk_bgplocalas` FOREIGN KEY (`bgplocalas`) REFERENCES `asn` (`id`)) at
>../lib/DBUTIL.pm line 592.
>
>
>I believe this is because the device.bgplocalas field has not yet been
>populated when trying to add the foreign key contraint to the device
>table generating the foreign key error.
>
>The fix was to move the creation of the device.fk_bgplocalas key after
>the update statement which populates the device.bgplocalas field.
>
># diff -C 3 updatedb /var/tmp/updatedb
>*** updatedb 2014-04-11 08:38:28.000000000 -0500
>--- /var/tmp/updatedb 2014-04-17 17:41:47.071631814 -0500
>***************
>*** 208,219 ****
> push @statements, "INSERT INTO asn (number) SELECT DISTINCT bgplocalas
>FROM device WHERE bgplocalas IS NOT NULL;";
>
> push @statements, "ALTER TABLE device MODIFY bgplocalas bigint;";
>- push @statements, "ALTER TABLE device ADD CONSTRAINT `fk_bgplocalas`
>FOREIGN KEY (`bgplocalas`) ".
>- "REFERENCES `asn` (`id`);";
> push @statements, "CREATE INDEX bgplocalas ON device (bgplocalas);";
>
> push @statements, "UPDATE device,asn SET device.bgplocalas=asn.id
>WHERE device.bgplocalas=asn.number;";
>
> push @statements, "ALTER TABLE bgppeering ADD COLUMN contactlist
>bigint;";
> push @statements, "ALTER TABLE bgppeering ADD CONSTRAINT
>`fk_contactlist_bgppeering` FOREIGN KEY (`contactlist`) ".
> "REFERENCES `contactlist` (`id`);";
>--- 208,220 ----
> push @statements, "INSERT INTO asn (number) SELECT DISTINCT bgplocalas
>FROM device WHERE bgplocalas IS NOT NULL;";
>
> push @statements, "ALTER TABLE device MODIFY bgplocalas bigint;";
> push @statements, "CREATE INDEX bgplocalas ON device (bgplocalas);";
>
> push @statements, "UPDATE device,asn SET device.bgplocalas=asn.id
>WHERE device.bgplocalas=asn.number;";
>
>+ push @statements, "ALTER TABLE device ADD CONSTRAINT `fk_bgplocalas`
>FOREIGN KEY (`bgplocalas`) ".
>+ "REFERENCES `asn` (`id`);";
>+
> push @statements, "ALTER TABLE bgppeering ADD COLUMN contactlist
>bigint;";
> push @statements, "ALTER TABLE bgppeering ADD CONSTRAINT
>`fk_contactlist_bgppeering` FOREIGN KEY (`contactlist`) ".
> "REFERENCES `contactlist` (`id`);";
>
>
>--
>patrick
>
>Patrick Landry
>University of Louisiana at Lafayette
>Director, University Computer Support Services
>
------------------------------
Message: 2
Date: Fri, 25 Apr 2014 11:59:24 -0700
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
netdot-1.0.6-2-g9f737e7
To: [email protected]
Message-ID: <[email protected]>
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Netdot".
The branch, netdot-1.0 has been updated
via 9f737e719222de9438f141bd42f4b81895956499 (commit)
from aa120dabd4388dd225add8a477a0193d6fb3a521 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9f737e719222de9438f141bd42f4b81895956499
Author: Carlos Vicente <[email protected]>
Date: Fri Apr 25 14:59:09 2014 -0400
Fixed bug in rest/host when updating ethernet address of host given the
Ipblock id
diff --git a/htdocs/rest/host b/htdocs/rest/host
index 8ea64e1..fa363ec 100644
--- a/htdocs/rest/host
+++ b/htdocs/rest/host
@@ -221,7 +221,7 @@ if ( $rest->{request}->method eq 'GET' ){
if ( $ethernet || $duid ){
my %args;
$args{duid} = $duid if $duid;
- $args{ethernet} = $ethernet if ( $ethernet && !$args{duid} );
+ $args{physaddr} = $ethernet if ( $ethernet && !$args{duid} );
if ( my $host = $ipb->dhcp_scopes->first ){
# Edit the MAC on this existing scope
-----------------------------------------------------------------------
Summary of changes:
htdocs/rest/host | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Netdot
------------------------------
_______________________________________________
Netdot-devel mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-devel
End of Netdot-devel Digest, Vol 85, Issue 15
********************************************