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: Upgrade to 2.042010 fails when running
      ~/bin/netdisco-deploy ([email protected])
   2. Re: Upgrade to 2.042010 fails when running
      ~/bin/netdisco-deploy (Scott Harrison)
   3. Re: docker build of netdisco (William Bathurst)
--- Begin Message ---
Upgrade is in the works but I don't want to screw anything up in the 
migration so am going slow.  Could you provide the syntax necessary to go 
back to 2.042008 on my current server?  Also, is there documentation or 
suggestion for moving to a new CentOS 7 (or newer) server?  We utilize the 
RANCID export for switch configuration archiving.  Thank you.


-- 
Ted Buchanan
Computer/Network Analyst - Vincennes University
[email protected]



From:   "Oliver Gorwits" <[email protected]>
To:     [email protected]
Cc:     "[email protected]" 
<[email protected]>
Date:   06/21/2019 08:28 AM
Subject:        Re: [Netdisco] Upgrade to 2.042010 fails when running 
~/bin/netdisco-deploy



Hi Ted

Many thanks. I think the upgrade is using SQL dialect not supported by 
PostgreSQL 8.4. 

Yes, we say in the docs that we support back to 8.4 but I admit as it’s a 
pretty old version it’s not well tested. We can look into that. 

There is no adverse effect as you see. The update fixes a case in the map 
where some links were shown in error on some systems only. 

If you cannot upgrade, then sit tight and we’ll try to make a patch to fix 
in the future. I would plan for the upgrade if you can as newer pg is way 
better and also in time we’ll have to drop 8.4 support due to its age. 

Oliver. 

On Fri, 21 Jun 2019 at 13:22, <[email protected]> wrote:
I have the same problem and it appeared first when attempting to upgrade 
to 2.04209.  System information:  pretty much stock CentOS 6 with EPEL 
repository.
App::Netdisco   2.42.8
SNMP::Info      3.68
DB Schema       57
PostgreSQL      8.4.20
Perl            5.10.1

Everything but the Neighbors map seems to work.  The Neighbors map worked 
prior to the upgrade attempt.

May I take the opportunity to say thanks to you for this piece of 
software.  It is very helpful for sysadmins.


-- 
Ted Buchanan




From:   "Oliver Gorwits" <[email protected]>
To:     "Scott Harrison" <[email protected]>
Cc:     "[email protected]" 
<[email protected]>
Date:   06/21/2019 04:08 AM
Subject:        Re: [Netdisco] Upgrade to 2.042010 fails when running 
~/bin/netdisco-deploy



Hi Scott, sorry to hear this. Can you let us know what version of 
PostgreSQL you’re running?

Thanks,
Oliver. 

On Thu, 20 Jun 2019 at 23:54, Scott Harrison <[email protected]> 
wrote:
I just upgraded to 2.042010 and while the upgrade ran without errors I got 

the following error when running netdisco-deploy.

Has anyone run into this and already solved it?  

[netdisco@netdisco01 ~]$ ~/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 of the above in place? [y/N]: y

Would you like to deploy the database schema? [y/N]: y
DB schema update complete.
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st 
execute failed: ERROR:  syntax error at or near "ORDER"
LINE 5:              array_agg(dp.port ORDER BY dp.port) AS left_por...
                                       ^ [for Statement "INSERT INTO 
statistics ( day, device_count, device_ip_count, device_link_count, 
device_port_count, device_port_up_count, ip_active_count, ip_table_count, 
netdisco_ver, node_active_count, node_table_count, perl_ver, pg_ver, 
schema_ver, snmpinfo_ver) VALUES ( ?, (SELECT COUNT( * ) FROM device me), 
(SELECT COUNT( * ) FROM device_ip me), (SELECT COALESCE( SUM( aggports ), 
0 ) FROM (  WITH BothWays AS
    ( SELECT dp.ip AS left_ip,
             ld.dns AS left_dns,
             ld.name AS left_name,
             array_agg(dp.port ORDER BY dp.port) AS left_port,
             array_agg(dp.name ORDER BY dp.name) AS left_descr,

             count(dpp.*) AS aggports,
             sum(COALESCE(dpp.raw_speed, 0)) AS aggspeed,

             di.ip AS right_ip,
             rd.dns AS right_dns,
             rd.name AS right_name,
             array_agg(dp.remote_port ORDER BY dp.remote_port) AS 
right_port,
             array_agg(dp2.name ORDER BY dp2.name) AS right_descr

     FROM device_port dp

     LEFT OUTER JOIN device_port_properties dpp ON (
        (dp.ip = dpp.ip) AND (dp.port = dpp.port)
        AND (dp.type IS NULL
             OR dp.type !~* 
'^(53|ieee8023adLag|propVirtual|l2vlan|l3ipvlan|135|136|137)$')
        AND (dp.is_master = 'false'
             OR dp.slave_of IS NOT NULL) )

     INNER JOIN device ld ON dp.ip = ld.ip
     INNER JOIN device_ip di ON dp.remote_ip = di.alias
     INNER JOIN device rd ON di.ip = rd.ip

     LEFT OUTER JOIN device_port dp2 ON (di.ip = dp2.ip
                                         AND ((dp.remote_port = dp2.port)
                                              OR (dp.remote_port = 
dp2.name)
                                              OR (dp.remote_port = 
dp2.descr)))

     WHERE dp.remote_port IS NOT NULL
       AND dp.port !~* 'vlan'
       AND (dp.descr IS NULL OR dp.descr !~* 'vlan')

     GROUP BY left_ip,
              left_dns,
              left_name,
              right_ip,
              right_dns,
              right_name )

  SELECT *
  FROM BothWays b
  WHERE NOT EXISTS
      ( SELECT *
       FROM BothWays b2
       WHERE b2.right_ip = b.left_ip
         AND b2.right_port = b.left_port
         AND b2.left_ip < b.left_ip )
  ORDER BY aggspeed DESC, 1, 2
) me), (SELECT COUNT( * ) FROM device_port me), (SELECT COUNT( * ) FROM 
device_port me WHERE ( up = ? )), (SELECT COUNT( * ) FROM (SELECT me.ip 
FROM node_ip me WHERE ( active ) GROUP BY me.ip) me), (SELECT COUNT( * ) 
FROM node_ip me), ?, (SELECT COUNT( * ) FROM (SELECT me.mac FROM node me 
WHERE ( active ) GROUP BY me.mac) me), (SELECT COUNT( * ) FROM node me), 
?, ?, ?, ? )" with ParamValues: 1='2019-06-20', 2='up', 3='2.42.10', 
4='5.10.1', 5='8.4.20', 6='58', 7='3.68'] at 
/home/netdisco/perl5/lib/perl5/App/Netdisco/Util/Statistics.pm line 42
Updating statistics... [netdisco@netdisco01 ~]$
_______________________________________________
Netdisco mailing list
[email protected]
https://sourceforge.net/p/netdisco/mailman/netdisco-users/
_______________________________________________
Netdisco mailing list
[email protected]
https://sourceforge.net/p/netdisco/mailman/netdisco-users/

_______________________________________________
Netdisco mailing list
[email protected]
https://sourceforge.net/p/netdisco/mailman/netdisco-users/



--- End Message ---
--- Begin Message ---
We're running postgres (PostgreSQL) 8.4.20 on CentOS release 6.10 (Final) on 
CentOS release 6.10 (Final).

--- End Message ---
--- Begin Message ---
Hi Nick,

I checked and there were no lingering containers. I also made sure to purge everything before running. It looks to me it isn't mounting volumes to the /home/netdisco directories.

Regards,
Bill

On 6/19/2019 9:28 AM, Nick Nauwelaerts wrote:

i'm not a docker guy, but this seems very familiar to https://github.com/netdisco/netdisco-docker/issues/17

seems somewhere there's some remnants of old containers in your setup.

// nick

*From:*William Bathurst [mailto:[email protected]]
*Sent:* Wednesday, June 19, 2019 10:02
*To:* [email protected]
*Subject:* [Netdisco] docker build of netdisco

I received the follow errors when running docker-compose up:

netdisco-web_1         | error: cannot find Netdisco config at /home/netdisco/perl5/lib/perl5/auto/share/dist/App-Netdisco/environments/deployment.yml or /home/netdisco/environments/deployment.yml

Attempting to create directory /home/netdisco/perl5

netdisco-web_1         | error: cannot find Netdisco config at /home/netdisco/perl5/lib/perl5/auto/share/dist/App-Netdisco/environments/deployment.yml

I also noted that it isn't mounting volumes in /home/netdisco directories. Are these supposed to be Docker Bind Volumes?

Also, how would I get it to use localhost instead of docker generated IP. For example:

         Gateway": "172.19.0.1",
         "IPAddress": "172.19.0.2"

The following is the software versions I am using:


Docker version 18.09.6, build 481bc77

docker-compose version 1.21.0, build 5920eb0
Ubuntu 18.04.2 LTS

The following steps have been done in advance:

|sudo groupadd netdisco -g 901|
|sudo useradd -u 901 -p x -g netdisco netdisco|
|mkdir -p netdisco/{logs,config,nd-site-local}|
|sudo chown -R netdisco:netdisco netdisco|

I am using the example docker-compose file:

version: '2.3'
services:
  netdisco-postgresql:
    image: netdisco/netdisco:latest-postgresql
    volumes:
      - "./netdisco/pgdata:/var/lib/postgresql/data"
#    build:
#      context: netdisco-postgresqllib/
#  netdisco-base:
#    image: netdisco/netdisco:latest-base
#    build:
#      context: netdisco-base
#    scale: 0
  netdisco-backend:
    image: netdisco/netdisco:latest-backend
    volumes:
      - "./netdisco/nd-site-local:/home/netdisco/nd-site-local"
      - "./netdisco/config:/home/netdisco/environments"
      - "./netdisco/logs:/home/netdisco/logs"
    environment:
      NETDISCO_DOMAIN:  discover
      NETDISCO_DB_HOST: netdisco-postgresql
    depends_on:
      - netdisco-postgresql
#    build:
#      context: netdisco-backend
  netdisco-web:
    image: netdisco/netdisco:latest-web
    volumes:
      - "./netdisco/nd-site-local:/home/netdisco/nd-site-local"
      - "./netdisco/config:/home/netdisco/environments"
      - "./netdisco/logs:/home/netdisco/logs"
    environment:
      NETDISCO_DOMAIN:  discover
      NETDISCO_DB_HOST: netdisco-postgresql
    ports:
      - "5000:5000"
    depends_on:
      - netdisco-postgresql
#    build:
#      context: netdisco-web
#networks:
#  default:
#    enable_ipv6: true


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

/Volg Aquafin op Facebook <https://www.facebook.com/AquafinNV> | Twitter <https://twitter.com/aquafinnv> | YouTube <http://www.youtube.com/channel/UCk_4P5BJ-MtEEDCkCsR_KqQ?feature=mhee> | LinkedIN <http://www.linkedin.com/company/aquafin/products> | Instagram <https://www.instagram.com/aquafin_nv/> /

In het kader van de uitoefening van onze taken verzamelen we bij Aquafin persoonsgegevens. Hoe we omgaan met deze gegevens en wat de rechten van de betrokkenen zijn, kan je nalezen in onze privacy policy <https://www.aquafin.be/nl-be/privacy-policy>.

P Denk aan het milieu. Druk deze mail niet onnodig af.

--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
[email protected]
https://lists.sourceforge.net/lists/listinfo/netdisco-users

Reply via email to