Send Netdot-users mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://osl.uoregon.edu/mailman/listinfo/netdot-users
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-users digest..."


Today's Topics:

   1. Re: Foundry VRF and VLAN Issues (Vincent Magnin)
   2. Re: Database issues. (Michael T. Voity)
   3. Re: Database issues. (Carlos Vicente)


----------------------------------------------------------------------

Message: 1
Date: Thu, 21 Aug 2014 14:18:06 +0000
From: Vincent Magnin <[email protected]>
Subject: Re: [Netdot-users] Foundry VRF and VLAN Issues
To: [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes

Hi Vasco,


"Tonack, Vasco" <[email protected]> a ?crit?:

> Hello Guys,
>
> I freshly installed netdot 1.0.6 on a debian server. One of my major  
> Problems is the Discovery of Foundry NetIron MLX Devices. When  
> discovering a foundry mlx device via snmp (also tried to disable the  
> arp discovery through cli) I ran into the issue that neither vlans  
> nor vrf ARP Entries are discovered.

Which software version of MLX are you using? I did not notice any  
issue on my site (using 5.4f firmware).

Maybe you can try this fix to solve a parsing issue:
> https://github.com/vink78/Netdot/commit/87fbcb7067f836613057aaf9c0e482513ceb5898



> Another problem is the hardcoded vrf information in the cli discovery
> script for foundry devices. If I understood the source code correctly
> the idea is to hardcode the vrf names directly into the script.

Yes, it's hardcoded and it's even commented. When I wrote  
FoundryIW.pm, I did not find how to implement VRF  "cleanly". On my  
site, it works well (just uncomment and addapt line 157 for your needs).

If you use RHEL7, it seems that line 109 on  
lib/Netdot/Model/Device/CLI.pm is no more needed.

Regards,

Vincent
-- 
------------------------------------------------------------------------
Vincent Magnin                                    [email protected]
Responsable Reseau et Telecom                           +41 21 692 22 48
UNIL, Centre Informatique, Batiment Amphimax
1015 Lausanne, Switzerland



------------------------------

Message: 2
Date: Thu, 21 Aug 2014 10:53:56 -0400
From: "Michael T. Voity" <[email protected]>
Subject: Re: [Netdot-users] Database issues.
To: Carlos Vicente <[email protected]>
Cc: "[email protected]" <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="windows-1252"

Carlos,

Thanks for your reply!

Here is the information you requested -

Please see the attached file.

Ideas?

-Mike

Michael T. Voity
Network Engineer
University of Vermont
(802) 656-8112

On 8/20/2014 10:14 AM, Carlos Vicente wrote:
> Michael,
>
> The rotate option in prune_db is supposed to re-create the fwtable and 
> fwtableentry for you. If that is not happening, that?s where your problem is.
>
> Can you try running it in debug mode, and post back the results? Also, show 
> your  list of tables before and after, etc. Any relevant info that can help 
> figure this out.
>
> Best,
>
> cv
>
> On Aug 18, 2014, at 3:42 PM, Michael T. Voity <[email protected]> wrote:
>
>> Every week when 'prune_db.pl' runs it deletes the 'fwtableentry' table
>> when it goes to do a rotate.   When this happens I can not search for
>> mac address.
>>
>> To recreate the table I do:

-------------- next part --------------
?mysql> show tables;
+-----------------------+
| Tables_in_netdot      |
+-----------------------+
| accessright           |
| arpcache              |
| arpcacheentry         |
| asset                 |
| audit                 |
| availability          |
| backbonecable         |
| backbonecable_history |
| bgppeering            |
| cablestrand           |
| cablestrand_history   |
| cabletype             |
| circuit               |
| circuit_history       |
| circuitstatus         |
| circuittype           |
| closet                |
| closetpicture         |
| contact               |
| contact_history       |
| contactlist           |
| contacttype           |
| datacache             |
| device                |
| device_history        |
| deviceattr            |
| deviceattrname        |
| devicecontacts        |
| devicemodule          |
| dhcpattr              |
| dhcpattrname          |
| dhcpscope             |
| dhcpscopetype         |
| dhcpscopeuse          |
| entity                |
| entity_history        |
| entityrole            |
| entitysite            |
| entitytype            |
| fibertype             |
| floor                 |
| floorpicture          |
| fwtable               |
| fwtableentry          |
| groupright            |
| horizontalcable       |
| hostaudit             |
| interface             |
| interface_history     |
| interfacevlan         |
| ipblock               |
| ipblockattr           |
| ipblockattrname       |
| ipblockstatus         |
| ipservice             |
| maintcontract         |
| monitorstatus         |
| oui                   |
| person                |
| person_history        |
| physaddr              |
| physaddrattr          |
| physaddrattrname      |
| product               |
| product_history       |
| producttype           |
| room                  |
| rr                    |
| rraddr                |
| rrcname               |
| rrds                  |
| rrhinfo               |
| rrloc                 |
| rrmx                  |
| rrnaptr               |
| rrns                  |
| rrptr                 |
| rrsrv                 |
| rrtxt                 |
| savedqueries          |
| schemainfo            |
| service               |
| site                  |
| site_history          |
| sitelink              |
| sitelink_history      |
| sitepicture           |
| sitesubnet            |
| splice                |
| stpinstance           |
| strandstatus          |
| subnetzone            |
| userright             |
| usertype              |
| vlan                  |
| vlangroup             |
| vlangroup_history     |
| zone                  |
| zonealias             |
+-----------------------+
99 rows in set (0.00 sec)

mysql> exit
Bye
[root@intermapper bin]# ./prune_db.pl -F -A -d 7 -r -g     
DEBUG - NUM_DAYS(7) ago was : 2014-08-14 10:50:14
DEBUG: init: dbi:mysql:dbname=netdot;host=localhost;mysql_local_infile=1
DEBUG: Connected successfully
DEBUG - DROP TABLE fwtableentry
DEBUG - DROP TABLE fwtable
DEBUG - CREATE TABLE `fwtable` (
  `device` bigint(20) DEFAULT NULL,
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `tstamp` timestamp NOT NULL DEFAULT '1970-01-02 00:00:01',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
DEBUG - CREATE TABLE `fwtableentry` (
  `fwtable` bigint(20) NOT NULL,
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `interface` bigint(20) NOT NULL,
  `physaddr` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FWTableEntry1` (`fwtable`),
  KEY `FWTableEntry2` (`interface`),
  KEY `FWTableEntry3` (`physaddr`),
  CONSTRAINT `fk_fwtable` FOREIGN KEY (`fwtable`) REFERENCES `fwtable` (`id`),
  CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) REFERENCES `interface` 
(`id`),
  CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES `physaddr` 
(`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
DBD::mysql::db do failed: Can't create table 'netdot.fwtableentry' (errno: 150) 
at ./prune_db.pl line 355.
Error rotating tables fwtableentry, fwtable. Changes not commited: 
DBD::mysql::db do failed: Can't create table 'netdot.fwtableentry' (errno: 150) 
at ./prune_db.pl line 355.

[root@intermapper bin]# mysql -u root netdot
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9919
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show tables;
+-----------------------+
| Tables_in_netdot      |
+-----------------------+
| accessright           |
| arpcache              |
| arpcacheentry         |
| asset                 |
| audit                 |
| availability          |
| backbonecable         |
| backbonecable_history |
| bgppeering            |
| cablestrand           |
| cablestrand_history   |
| cabletype             |
| circuit               |
| circuit_history       |
| circuitstatus         |
| circuittype           |
| closet                |
| closetpicture         |
| contact               |
| contact_history       |
| contactlist           |
| contacttype           |
| datacache             |
| device                |
| device_history        |
| deviceattr            |
| deviceattrname        |
| devicecontacts        |
| devicemodule          |
| dhcpattr              |
| dhcpattrname          |
| dhcpscope             |
| dhcpscopetype         |
| dhcpscopeuse          |
| entity                |
| entity_history        |
| entityrole            |
| entitysite            |
| entitytype            |
| fibertype             |
| floor                 |
| floorpicture          |
| fwtable               |
| groupright            |
| horizontalcable       |
| hostaudit             |
| interface             |
| interface_history     |
| interfacevlan         |
| ipblock               |
| ipblockattr           |
| ipblockattrname       |
| ipblockstatus         |
| ipservice             |
| maintcontract         |
| monitorstatus         |
| oui                   |
| person                |
| person_history        |
| physaddr              |
| physaddrattr          |
| physaddrattrname      |
| product               |
| product_history       |
| producttype           |
| room                  |
| rr                    |
| rraddr                |
| rrcname               |
| rrds                  |
| rrhinfo               |
| rrloc                 |
| rrmx                  |
| rrnaptr               |
| rrns                  |
| rrptr                 |
| rrsrv                 |
| rrtxt                 |
| savedqueries          |
| schemainfo            |
| service               |
| site                  |
| site_history          |
| sitelink              |
| sitelink_history      |
| sitepicture           |
| sitesubnet            |
| splice                |
| stpinstance           |
| strandstatus          |
| subnetzone            |
| userright             |
| usertype              |
| vlan                  |
| vlangroup             |
| vlangroup_history     |
| zone                  |
| zonealias             |
+-----------------------+
98 rows in set (0.00 sec)


------------------------------

Message: 3
Date: Thu, 21 Aug 2014 11:13:58 -0400
From: Carlos Vicente <[email protected]>
Subject: Re: [Netdot-users] Database issues.
To: "Michael T. Voity" <[email protected]>
Cc: "[email protected]" <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252

Michael,

So the script cannot create the fwtableentry table:

DBD::mysql::db do failed: Can't create table 'netdot.fwtableentry' (errno: 150) 
at ./prune_db.pl line 355.
Error rotating tables fwtableentry, fwtable. Changes not commited: 
DBD::mysql::db do failed: Can't create table 'netdot.fwtableentry' (errno: 150) 
at ./prune_db.pl line 355.

>From the mysql manual:

"Cannot create table. If the error message refers to error 150, table creation 
failed because a foreign key constraint was not correctly formed. If the error 
message refers to error ?1, table creation probably failed because the table 
includes a column name that matched the name of an internal InnoDB table.?

Looking at the foreign keys in the definition, I don?t see anything wrong, but 
I noticed:

DEBUG - CREATE TABLE `fwtable` (
  `device` bigint(20) DEFAULT NULL,
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `tstamp` timestamp NOT NULL DEFAULT '1970-01-02 00:00:01',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8     <<<<------



ENGINE=MyISAM ????

Because prune_db learns the create statement out of the ?show create table? 
output, it seems that at some point you created fwtable as a MyISAM table, 
instead of INNODB.

Try pasting this into the mysql client:

CREATE TABLE `fwtable` (
  `device` bigint NOT NULL,
  `id` bigint NOT NULL auto_increment,
  `tstamp` timestamp NOT NULL DEFAULT '1970-01-02 00:00:01',
  UNIQUE INDEX `fwtable1` (`device`, `tstamp`),
  INDEX `FWTable2` (`device`),
  INDEX `FWTable3` (`tstamp`),
  PRIMARY KEY (`id`),
  CONSTRAINT `fk_device_5` FOREIGN KEY (`device`) REFERENCES `device` (`id`)
) ENGINE=InnoDB;
CREATE TABLE `fwtableentry` (
  `fwtable` bigint NOT NULL,
  `id` bigint NOT NULL auto_increment,
  `interface` bigint NOT NULL,
  `physaddr` bigint NOT NULL,
  INDEX `FWTableEntry1` (`fwtable`),
  INDEX `FWTableEntry2` (`interface`),
  INDEX `FWTableEntry3` (`physaddr`),
  PRIMARY KEY (`id`),
  CONSTRAINT `fk_fwtable` FOREIGN KEY (`fwtable`) REFERENCES `fwtable` (`id`),
  CONSTRAINT `fk_interface_1` FOREIGN KEY (`interface`) REFERENCES `interface` 
(`id`),
  CONSTRAINT `fk_physaddr_3` FOREIGN KEY (`physaddr`) REFERENCES `physaddr` 
(`id`)
) ENGINE=InnoDB;


And then run prune_db again to see if it runs correctly.

Best,

cv




On Aug 21, 2014, at 10:53 AM, Michael T. Voity <[email protected]> wrote:

> Carlos,
> 
> Thanks for your reply!
> 
> Here is the information you requested -
> 
> Please see the attached file.
> 
> Ideas?
> 
> -Mike
> 
> Michael T. Voity
> Network Engineer
> University of Vermont
> (802) 656-8112
> 
> On 8/20/2014 10:14 AM, Carlos Vicente wrote:
>> Michael,
>> 
>> The rotate option in prune_db is supposed to re-create the fwtable and 
>> fwtableentry for you. If that is not happening, that?s where your problem is.
>> 
>> Can you try running it in debug mode, and post back the results? Also, show 
>> your  list of tables before and after, etc. Any relevant info that can help 
>> figure this out.
>> 
>> Best,
>> 
>> cv
>> 
>> On Aug 18, 2014, at 3:42 PM, Michael T. Voity <[email protected]> wrote:
>> 
>>> Every week when 'prune_db.pl' runs it deletes the 'fwtableentry' table
>>> when it goes to do a rotate.   When this happens I can not search for
>>> mac address.
>>> 
>>> To recreate the table I do:
> 
> <netdot-prune-db-debug.txt>




------------------------------

_______________________________________________
Netdot-users mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-users


End of Netdot-users Digest, Vol 69, Issue 6
*******************************************

Reply via email to