Send netdisco-users mailing list submissions to
        netdisco-users@lists.sourceforge.net

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
        netdisco-users-requ...@lists.sourceforge.net

You can reach the person managing the list at
        netdisco-users-ow...@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of netdisco-users digest..."
Today's Topics:

   1. Re: OUI with long field (Dean, Barry)
--- Begin Message ---
I found the problem. I have a custom view I created in the database that 
references the OUI column.

netdisco=> ALTER TABLE node ALTER COLUMN oui TYPE varchar(9);
ERROR:  cannot alter type of a column used by a view or rule
DETAIL:  rule _RETURN on view cisco_usage_12mons depends on column "oui"

I will need to delete and recreate this view then I shall be able to alter the 
column.

Thanks
Barry Dean
Network Analyst Team Leader

From: Oliver Gorwits <oli...@cpan.org>
Sent: Monday, December 11, 2023 12:02 PM
To: Dean, Barry <b.d...@liverpool.ac.uk>
Cc: netdisco-users@lists.sourceforge.net
Subject: Re: [Netdisco] OUI with long field


Caution: This email originated from outside of the University. Do not click 
links or open attachments unless you recognise the source of this email and 
know the content is safe. Check sender address, hover over URLs and don't open 
suspicious email attachments.
Hi again Barry

I wonder if the schema update didn't work properly, as the oui field of the 
node table should be varchar(9) not varchar(8) as in the error.

You could manually run this in psql: ALTER TABLE node ALTER COLUMN oui TYPE 
varchar(9);

Or you can redeploy the whole schema which is safe to do on top of an existing 
database (well, I hope you have backups anyway!):

~netdisco/bin/netdisco-db-deploy --redeploy-all

You can then re-run netdisco-deploy and the import OUI should work (or run 
~netdisco/bin/ieee-oui-import directly).

Do let me know how you get on,

regards
Oliver.

On Mon, 11 Dec 2023 at 11:48, Dean, Barry 
<b...@liverpool.ac.uk<mailto:b...@liverpool.ac.uk>> wrote:
I was upgrading to 2.71.0 (happened upgrading to 2.71.1 as well). I always use 
all the steps in the “Upgrading from 2.x” section of 
https://metacpan.org/pod/App::Netdisco

I was using netdisco-deploy, full transcript: (2.71.0 to 2.71.1 upgrade).

netdisco@netdisco:~$ ~/bin/localenv cpanm --notest App::Netdisco
--> Working on App::Netdisco
Fetching 
http://www.cpan.org/authors/id/O/OL/OLIVER/App-Netdisco-2.071001.tar.gz ... OK
Configuring App-Netdisco-2.071001 ... OK
Building App-Netdisco-2.071001 ... OK
Successfully installed App-Netdisco-2.071001 (upgraded from 2.071000)
1 distribution installed

netdisco@netdisco:~$ ln -sf ~/perl5/bin/{localenv,netdisco-*} ~/bin/

netdisco@netdisco:~$ ~/bin/netdisco-deploy
This is the Netdisco 2 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)

If you are upgrading Netdisco 2 read the release notes:
https://github.com/netdisco/netdisco/wiki/Release-Notes
There you will find required and incompatible changes
which are not covered by this script.

You will be asked to confirm all changes to your system.

So, is all of the above in place? [y/N]: y

Would you like to deploy the database schema? [y/N]: y
DB schema update complete.
Updating statistics... done.

Download and update vendor MAC prefixes (OUI data)? [y/N]: y
Updating OUI... {UNKNOWN}: DBI Exception: DBD::Pg::db do failed: ERROR:  value 
too long for type character varying(8) at 
/usr/local/netdisco/perl5/bin/ieee-oui-import line 114

netdisco@netdisco:~$ ~/bin/netdisco-deploy
This is the Netdisco 2 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)

If you are upgrading Netdisco 2 read the release notes:
https://github.com/netdisco/netdisco/wiki/Release-Notes
There you will find required and incompatible changes
which are not covered by this script.

You will be asked to confirm all changes to your system.

So, is all of the above in place? [y/N]: y

Would you like to deploy the database schema? [y/N]: N

Download and update vendor MAC prefixes (OUI data)? [y/N]: N

Download and update MIB files? [y/N]: y
MIBs update complete.
netdisco@netdisco:~$ ~/bin/netdisco-web restart
Netdisco Web                                                  [Stopped]
Netdisco Web                                                  [Started]
config watcher: watching /usr/local/netdisco/environments for updates.
netdisco@netdisco:~$
netdisco@netdisco:~$ ~/bin/netdisco-backend restart
Netdisco Backend                                              [Stopped]
Netdisco Backend                                              [Started]
config watcher: watching /usr/local/netdisco/environments for updates.

Thanks
Barry Dean
Network Analyst Team Leader

From: Oliver Gorwits <oli...@cpan.org<mailto:oli...@cpan.org>>
Sent: Monday, December 11, 2023 11:29 AM
To: Dean, Barry <b.d...@liverpool.ac.uk<mailto:b.d...@liverpool.ac.uk>>
Cc: 
netdisco-users@lists.sourceforge.net<mailto:netdisco-users@lists.sourceforge.net>
Subject: Re: [Netdisco] OUI with long field


Caution: This email originated from outside of the University. Do not click 
links or open attachments unless you recognise the source of this email and 
know the content is safe. Check sender address, hover over URLs and don't open 
suspicious email attachments.
Hi Barry

Did you update Netdisco but not run all the netdisco-deploy steps and not 
restart backend(s)?

There was a re-engineering of the OUI handling a few releases ago. Could be a 
bug but just checking. Be sure to run all deploy steps, both schema and OUI 
download.

regards
Oliver.

On Mon, 11 Dec 2023 at 11:26, Dean, Barry 
<b...@liverpool.ac.uk<mailto:b...@liverpool.ac.uk>> wrote:
I am getting this error when updating the OUI database:

Download and update vendor MAC prefixes (OUI data)? [y/N]: y
Updating OUI... {UNKNOWN}: DBI Exception: DBD::Pg::db do failed: ERROR:  value 
too long for type character varying(8) at 
/usr/local/netdisco/perl5/bin/ieee-oui-import line 114


Barry Dean
Network Team, University of Liverpool



_______________________________________________
Netdisco mailing list
netdisco-users@lists.sourceforge.net<mailto:netdisco-users@lists.sourceforge.net>
https://sourceforge.net/p/netdisco/mailman/netdisco-users/

--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
netdisco-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/netdisco-users

Reply via email to