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

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/netdisco-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 netdisco-users digest..."
Today's Topics:

   1. Re: Trashing the DB to start again (Andy Ruhl)
   2. Re: Trashing the DB to start again (Hans Erasmus)
   3. Re: Multiple interfaces on routers (Hans Erasmus)
--- Begin Message ---
On Wed, Dec 13, 2017 at 7:41 PM, Sanjeev Gupta <[email protected]> wrote:
> (top posting, sorry).
>
> This should work:
>
> Drop the netdisco database from postgresql
> Recreate:
>
> postgres:~$ createdb -O netdisco netdisco
>
> Intialise the new database:
>
> ~/bin/netdisco-deploy
>

I would rename it (log in with netdisco-do psql):

ALTER DATABASE name RENAME TO new_name

Then create the database again as stated above. When you're really
sure you don't want the old database, drop it:

DROP DATABASE name (<--- Make sure you drop the renamed one and not
the "netdisco" one)

Andy



--- End Message ---
--- Begin Message ---
Thank you guys. I am not familiar with prostgre or netdisco (yet) so I
wanted the safest way to do it. Thanks for all the help!

Regards

Hans

On Thu, 14 Dec 2017 at 18:50 Andy Ruhl <[email protected]> wrote:

> On Wed, Dec 13, 2017 at 7:41 PM, Sanjeev Gupta <[email protected]> wrote:
> > (top posting, sorry).
> >
> > This should work:
> >
> > Drop the netdisco database from postgresql
> > Recreate:
> >
> > postgres:~$ createdb -O netdisco netdisco
> >
> > Intialise the new database:
> >
> > ~/bin/netdisco-deploy
> >
>
> I would rename it (log in with netdisco-do psql):
>
> ALTER DATABASE name RENAME TO new_name
>
> Then create the database again as stated above. When you're really
> sure you don't want the old database, drop it:
>
> DROP DATABASE name (<--- Make sure you drop the renamed one and not
> the "netdisco" one)
>
> Andy
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Netdisco mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/netdisco-users
>

--- End Message ---
--- Begin Message ---
Hi Oliver

I started running a discover all job, which will take about a week. But I
can already see that the duplicate devices has decreased during this
discovery and we are on day 1. So I will keep you posted as we go along but
thus far all looks good.  Thanks for the trouble you guys are having
updating the code and helping us out.

Regards

Hans

On Wed, 13 Dec 2017 at 20:17 Hans Erasmus <[email protected]> wrote:

> HI Oliver
>
> So here is the output:
>
> [netdisco@v-netdisco-tst-lnx1 ~]$ bin/localenv cpanm
> https://cpan.metacpan.org/authors/id/O/OL/OLIVER/App-Netdisco-2.036012_003.tar.gz
> --> Working on
> https://cpan.metacpan.org/authors/id/O/OL/OLIVER/App-Netdisco-2.036012_003.tar.gz
> Fetching
> https://cpan.metacpan.org/authors/id/O/OL/OLIVER/App-Netdisco-2.036012_003.tar.gz
> ... OK
> Configuring App-Netdisco-2.036012_003 ... OK
> ==> Found dependencies: aliased, Plack::Handler::Twiggy,
> Plack::Middleware::Debug, Env::Path, SNMP::Info
> --> Working on aliased
> Fetching http://www.cpan.org/authors/id/E/ET/ETHER/aliased-0.34.tar.gz
> ... OK
> Configuring aliased-0.34 ... OK
> Building and testing aliased-0.34 ... OK
> Successfully installed aliased-0.34
> --> Working on Plack::Handler::Twiggy
> Fetching http://www.cpan.org/authors/id/M/MI/MIYAGAWA/Twiggy-0.1025.tar.gz
> ... OK
> Configuring Twiggy-0.1025 ... OK
> ==> Found dependencies: Test::Requires
> --> Working on Test::Requires
> Fetching
> http://www.cpan.org/authors/id/T/TO/TOKUHIROM/Test-Requires-0.10.tar.gz
> ... OK
> Configuring Test-Requires-0.10 ... OK
> Building and testing Test-Requires-0.10 ... OK
> Successfully installed Test-Requires-0.10
> Building and testing Twiggy-0.1025 ... OK
> Successfully installed Twiggy-0.1025
> --> Working on Plack::Middleware::Debug
> Fetching
> http://www.cpan.org/authors/id/M/MI/MIYAGAWA/Plack-Middleware-Debug-0.16.tar.gz
> ... OK
> Configuring Plack-Middleware-Debug-0.16 ... OK
> ==> Found dependencies: Text::MicroTemplate
> --> Working on Text::MicroTemplate
> Fetching
> http://www.cpan.org/authors/id/K/KA/KAZUHO/Text-MicroTemplate-0.24.tar.gz
> ... OK
> Configuring Text-MicroTemplate-0.24 ... OK
> Building and testing Text-MicroTemplate-0.24 ... OK
> Successfully installed Text-MicroTemplate-0.24
> Building and testing Plack-Middleware-Debug-0.16 ... OK
> Successfully installed Plack-Middleware-Debug-0.16
> --> Working on Env::Path
> Fetching http://www.cpan.org/authors/id/D/DS/DSB/Env-Path-0.19.tar.gz ...
> OK
> Configuring Env-Path-0.19 ... OK
> Building and testing Env-Path-0.19 ... OK
> Successfully installed Env-Path-0.19
> --> Working on SNMP::Info
> Fetching http://www.cpan.org/authors/id/O/OL/OLIVER/SNMP-Info-3.38.tar.gz
> ... OK
> Configuring SNMP-Info-3.38 ... OK
> Building and testing SNMP-Info-3.38 ... OK
> Successfully installed SNMP-Info-3.38 (upgraded from 3.37)
> Building and testing App-Netdisco-2.036012_003 ... OK
> Successfully installed App-Netdisco-2.036012_003
> 8 distributions installed
> [netdisco@v-netdisco-tst-lnx1 ~]$
> [netdisco@v-netdisco-tst-lnx1 ~]$
> [netdisco@v-netdisco-tst-lnx1 ~]$
> [netdisco@v-netdisco-tst-lnx1 ~]$
> [netdisco@v-netdisco-tst-lnx1 ~]$ bin/netdisco-
> netdisco-backend        netdisco-backend-fg     netdisco-daemon
>  netdisco-daemon-fg      netdisco-db-deploy      netdisco-deploy
>  netdisco-do             netdisco-rancid-export  netdisco-sshcollector
>  netdisco-web            netdisco-web-fg
> [netdisco@v-netdisco-tst-lnx1 ~]$ bin/netdisco-deploy
> This is the Netdisco II deployment script.
>
> Before we continue, the following prerequisites must be in place:
>  * Database added to PostgreSQL for Netdisco
>  * User added to PostgreSQL with rights to the Netdisco Database
>  * "~/environments/deployment.yml" file configured with Database
> dsn/user/pass
>  * A full backup of any existing Netdisco database data
>  * Internet access (for OUIs and MIBs)
>
> You will be asked to confirm all changes to your system.
>
> So, is all the above in place? [y/N]: y
>
> Would you like to deploy the database schema? [y/N]: y
> DBIx::Class::Schema::Versioned::_on_connect(): Versions out of sync. This
> is 45, your database contains version 44, please call upgrade on your
> Schema. at /home/netdisco/perl5/lib/perl5/DBICx/Sugar.pm line 95
> DBIx::Class::Schema::Versioned::upgrade_single_step(): DB version (44) is
> lower than the schema version (45). Attempting upgrade.
> DB schema update complete.
>
> Download and update vendor MAC prefixes (OUI data)? [y/N]: y
> OUI update complete.
>
> Download and update MIB files? [y/N]: y
> MIBs update complete.
> [netdisco@v-netdisco-tst-lnx1 ~]$
> [netdisco@v-netdisco-tst-lnx1 ~]$
> [netdisco@v-netdisco-tst-lnx1 ~]$
> [netdisco@v-netdisco-tst-lnx1 ~]$
> [netdisco@v-netdisco-tst-lnx1 ~]$ bin/netdisco-daemon
> netdisco-daemon     netdisco-daemon-fg
> [netdisco@v-netdisco-tst-lnx1 ~]$ bin/netdisco-daemon ?
> Error: undefined action ?.  Must be called with an action:
> [start|stop|restart|reload|status|foreground|show_warnings|get_init_file|help]
> at /home/netdisco/perl5/lib/perl5/Daemon/Control.pm line 690.
> [netdisco@v-netdisco-tst-lnx1 ~]$ bin/netdisco-daemon --help
> Syntax: /home/netdisco/perl5/bin/netdisco-backend
> [start|stop|restart|reload|status|foreground|show_warnings|get_init_file|help]
>
> [netdisco@v-netdisco-tst-lnx1 ~]$ bin/netdisco-daemon status
> Netdisco Backend                                              [Running]
> [netdisco@v-netdisco-tst-lnx1 ~]$
> [netdisco@v-netdisco-tst-lnx1 ~]$
> [netdisco@v-netdisco-tst-lnx1 ~]$
> [netdisco@v-netdisco-tst-lnx1 ~]$ bin/netdisco-daemon restart
> Netdisco Backend                                              [Stopped]
> config watcher: watching /home/netdisco/environments for updates.
> Netdisco Backend                                              [Started]
> [netdisco@v-netdisco-tst-lnx1 ~]$
>
> Running the Admin > Duplicate devices, I see 328 Entries, so it seems to
> work quite well.  Question, do you have an idea for delete all button? :-)
>
> Thanks again for this!
>
> Regards
>
> Hans
>
> On Sat, 9 Dec 2017 at 21:00 Hans Erasmus <[email protected]> wrote:
>
>> Hi Oliver
>>
>> Will do so on Monday. Thanks for letting me know. I will be submitting
>> the feature request for a Ruijie class probably withon a month or so.
>>
>> Will try this and let you know!
>>
>> Thanks again!
>> Have a nice weekend
>>
>>
>> Hans
>>
>> On Sat, 09 Dec 2017, 14:31 Oliver Gorwits, <[email protected]> wrote:
>>
>>> Hi Hans
>>>
>>> We have a new version of Netdisco on CPAN in "development/testing"
>>> release status which has significantly rewritten device discovery and
>>> deduplication code. If you would like to try it out:
>>>
>>> ~netdisco/bin/localenv cpanm
>>>
>>> https://cpan.metacpan.org/authors/id/O/OL/OLIVER/App-Netdisco-2.036012_003.tar.gz
>>>
>>> You should also run ~netdisco/bin/netdisco-deploy after, to update the
>>> DB schema, and then restart the backend daemon.
>>>
>>> Either remove all devices or remove duplicate devices through the Admin
>>> menu report "Duplicate Devices". Then future discover jobs will
>>> hopefully not throw up duplicates!
>>>
>>> Do let me know how you get on.
>>>
>>> regards,
>>> oliver.
>>>
>>> On 2017-08-22 08:26, Hans Erasmus wrote:
>>> > Oh and I should add, where this thing is really showing is in the
>>> > Network Maps (drawing of device).  It will show that one router has
>>> > 40 connections to the USR-BB, where in fact, it will only have one.
>>> >
>>> > Regards
>>> > Hans
>>> >
>>> > On Tue, 22 Aug 2017 at 09:22 Hans Erasmus <[email protected]>
>>> > wrote:
>>> >
>>> >> Hi Oliver
>>> >>
>>> >> No need to apologise.  This is something one of our guru's has been
>>> >> seeing for the past 10 years, and his fix was to assign a type of
>>> >> primary key to the device once it is discovered. I will get more
>>> >> detail on it and post it if you are interested.  So the behaviour
>>> >> is not new, and therefore not surprising.  It is just way out of my
>>> >> league to even try and attempt a fix for this.
>>> >>
>>> >>>  Please can you tell me what the Duplicate Devices report (in the
>>> >> Adminmenu) shows? Are all the duplicates listed there?
>>> >>
>>> >> Well, I see a lot of duplicates on this list (293 to be exact but
>>> >> the discovery is still running) like our PC LAB routers which have
>>> >> multiple interfaces with multiple subnets connected to it.  For
>>> >> instance:
>>> >>
>>> >> 1 x /27 containing the Switch IP segment (SW MGMT)
>>> >> 1 x /24 containing the LAB PC segment (End Users)
>>> >> 1 x /31 containing the Uplinks to the User Backbone
>>> >> 1 or 2 (sometimes more) /30 interconnects between LAB routers to
>>> >> ensure redundancy (multiple paths).
>>> >>
>>> >>>  Also, can you let me know why you think "practically" this is
>>> >> happening?
>>> >>
>>> >> Well, in layman's terms, what happens is that as Netdisco goes
>>> >> through the network whilst discovering, it will come across an IP
>>> >> of say 1.1.1.1 on  a router.  This IP could possibly be the
>>> >> gateway for 1.1.1.0/24 [3]. Now, taking the example above, let say
>>> >> this /24 is the end-user segment.  This same router could possibly
>>> >> contain, like in our case, a different routed segment to service the
>>> >> switch segment. Let call this 1.1.2.0/27 [4]. So the router must
>>> >> have 1.1.2.1 configured as the gateway so the switches knows where
>>> >> to go.
>>> >> Only using these two segments as an example, we can clearly see that
>>> >> one router could contain two different network segments and act as a
>>> >> Gateway for both, and the one segment will not necessarily know
>>> >> about the other.  This helps in containing outages created by loops
>>> >> etc. btw. In the eyes of Netdisco, these are two totally different
>>> >> devices, as these two segments do not overlap, or are not part of
>>> >> one another in any shape or form. And these two segments could have
>>> >> been physically living across campus from each other. So Netdisco
>>> >> (and any other discoverer worth it's salt) would handle these
>>> >> segments separately.  It will add 1.1.1.1 as a device, and add
>>> >> 1.1.2.1 as a device. But in reality, it is the same device. So maybe
>>> >> netdisco could, when it discovers a new segment, first inspect
>>> >> whether anything on that segment has been found on any of the
>>> >> already discovered device's address tables, and only append the list
>>> >> on that discovered device, not add a new device, I don't know? Just
>>> >> throwing out ideas here.
>>> >>
>>> >> To answer your last question, no, we do not make use of any VRF's.
>>> >>
>>> >> Sorry if this explanation is not explanatory enough.
>>> >>
>>> >> Regards
>>> >>
>>> >> Hans
>>> >>
>>> >> On Tue, 22 Aug 2017 at 08:44 Oliver Gorwits <[email protected]> wrote:
>>> >>
>>> >>> Hi Hans
>>> >>>
>>> >>> On 2017-08-22 06:40, Hans Erasmus wrote:
>>> >>>> When a router comes up that has more than one interface (our
>>> >>> user
>>> >>>> backbone has 40 x /31's), netdisco will list that device as
>>> >>> discovered
>>> >>>> 40 times.
>>> >>>
>>> >>> We have started to look at this issue, but are being cautious in
>>> >>> automatically de-duplicating in case there are scenarios where
>>> >>> multiple
>>> >>> devices should remain.
>>> >>>
>>> >>> Please can you tell me what the Duplicate Devices report (in the
>>> >>> Admin
>>> >>> menu) shows? Are all the duplicates listed there?
>>> >>>
>>> >>> Also, can you let me know why you think "practically" this is
>>> >>> happening?
>>> >>>
>>> >>> Finally, are you using VRFs?
>>> >>>
>>> >>> Many thanks, and apologies for the hassle this is causing.
>>> >>>
>>> >>> regards,
>>> >>> oliver.
>>> >>>
>>> >>>> Is there any way (a script perhaps) in which we can tell
>>> >>>> netdisco that it is the same device all along?  Maybe have
>>> >>> some sort
>>> >>>> of intelligent "check" whether the device discovered has the
>>> >>> same name
>>> >>>> or any other details as any of the devices in the list already,
>>> >>> and
>>> >>>> then flag it and ignore it from there?  Just a thought.
>>> >>>>
>>> >>>> Regards
>>> >>>>
>>> >>>> Hans
>>> >>>>
>>> >>>
>>> >>
>>> >
>>> ------------------------------------------------------------------------------
>>> >>>> Check out the vibrant tech community on one of the world's most
>>> >>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot [1]
>>> >>>>
>>> >>>> _______________________________________________
>>> >>>> Netdisco mailing list
>>> >>>> [email protected]
>>> >>>> https://lists.sourceforge.net/lists/listinfo/netdisco-users [2]
>>> >>>
>>> >>>
>>> >>
>>> >
>>> ------------------------------------------------------------------------------
>>> >>> Check out the vibrant tech community on one of the world's most
>>> >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot [1]
>>> >>> _______________________________________________
>>> >>> Netdisco mailing list
>>> >>> [email protected]
>>> >>> https://lists.sourceforge.net/lists/listinfo/netdisco-users [2]
>>> >
>>> >
>>> > Links:
>>> > ------
>>> > [1] http://sdm.link/slashdot
>>> > [2] https://lists.sourceforge.net/lists/listinfo/netdisco-users
>>> > [3] http://1.1.1.0/24
>>> > [4] http://1.1.2.0/27
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Netdisco mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/netdisco-users
>>>
>>

--- End Message ---
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Netdisco mailing list - Digest Mode
[email protected]
https://lists.sourceforge.net/lists/listinfo/netdisco-users

Reply via email to