From 76f8ec961c0d710251f0374edacb44a806219503 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Wed, 13 Mar 2019 22:21:22 +0000 Subject: [PATCH 1/4] add rc9000 to latest change --- Changes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 2d68984a..10750c17 100644 --- a/Changes +++ b/Changes @@ -3,10 +3,10 @@ [NEW FEATURES] * netdisco-sshcollector no longer required - the functionality (arpnip via - ssh) will be run within netdisco's core schedule + ssh) will be run within netdisco's core schedule (rc9000 and ollyg) * get_credentials replaces get_community and accepts any device_auth stanza - in JSON format + in JSON format (ollyg) 2.040007 - 2019-03-06 From 9b39d1e452825b10c989cdb6ea60ef8d75315946 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Wed, 13 Mar 2019 22:23:02 +0000 Subject: [PATCH 2/4] rename CLI Transport to SSH --- lib/App/Netdisco/Transport/{CLI.pm => SSH.pm} | 6 +++--- lib/App/Netdisco/Worker/Plugin/Arpnip/Nodes.pm | 4 ++-- share/config.yml | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) rename lib/App/Netdisco/Transport/{CLI.pm => SSH.pm} (94%) diff --git a/lib/App/Netdisco/Transport/CLI.pm b/lib/App/Netdisco/Transport/SSH.pm similarity index 94% rename from lib/App/Netdisco/Transport/CLI.pm rename to lib/App/Netdisco/Transport/SSH.pm index 6f865c7b..64190858 100644 --- a/lib/App/Netdisco/Transport/CLI.pm +++ b/lib/App/Netdisco/Transport/SSH.pm @@ -1,4 +1,4 @@ -package App::Netdisco::Transport::CLI; +package App::Netdisco::Transport::SSH; use Dancer qw/:syntax :script/; @@ -11,14 +11,14 @@ use base 'Dancer::Object::Singleton'; =head1 NAME -App::Netdisco::Transport::CLI +App::Netdisco::Transport::SSH =head1 DESCRIPTION Returns an object which has an active SSH connection which can be used for some actions such as arpnip. - my $cli = App::Netdisco::Transport::CLI->session_for( ... ); + my $cli = App::Netdisco::Transport::SSH->session_for( ... ); =cut diff --git a/lib/App/Netdisco/Worker/Plugin/Arpnip/Nodes.pm b/lib/App/Netdisco/Worker/Plugin/Arpnip/Nodes.pm index 3ac3c307..e303f0dc 100644 --- a/lib/App/Netdisco/Worker/Plugin/Arpnip/Nodes.pm +++ b/lib/App/Netdisco/Worker/Plugin/Arpnip/Nodes.pm @@ -3,7 +3,7 @@ package App::Netdisco::Worker::Plugin::Arpnip::Nodes; use Dancer ':syntax'; use App::Netdisco::Worker::Plugin; use aliased 'App::Netdisco::Worker::Status'; -use App::Netdisco::Transport::CLI (); +use App::Netdisco::Transport::SSH (); use App::Netdisco::Transport::SNMP (); use App::Netdisco::Util::Node qw/check_mac store_arp/; use App::Netdisco::Util::FastResolver 'hostnames_resolve_async'; @@ -67,7 +67,7 @@ register_worker({ phase => 'main', driver => 'cli' }, sub { my ($job, $workerconf) = @_; my $device = $job->device; - my $cli = App::Netdisco::Transport::CLI->session_for($device) + my $cli = App::Netdisco::Transport::SSH->session_for($device) or return Status->defer("arpnip failed: could not SSH connect to $device"); # should be both v4 and v6 diff --git a/share/config.yml b/share/config.yml index 5422e4ea..9ff5906b 100644 --- a/share/config.yml +++ b/share/config.yml @@ -415,7 +415,6 @@ worker_plugins: - 'Vlan::Core' extra_worker_plugins: [] -# - Discover::ConfigBackup::CLI driver_priority: restconf: 500 From b6028685e27a659c47bedefb76c339c36f4930a2 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Wed, 13 Mar 2019 22:38:24 +0000 Subject: [PATCH 3/4] update docs to specify curl and postgresql packages --- lib/App/Netdisco.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/App/Netdisco.pm b/lib/App/Netdisco.pm index 8f53e14e..26e56217 100644 --- a/lib/App/Netdisco.pm +++ b/lib/App/Netdisco.pm @@ -70,16 +70,19 @@ L. =head1 Dependencies Netdisco has several Perl library dependencies which will be automatically -installed. However it's I recommended that you first install -L, L, and a compiler using your operating system packages. +installed. However it's required that you first install the following +operating system packages: On Ubuntu/Debian: - root:~# apt-get install libdbd-pg-perl libsnmp-perl libssl-dev libio-socket-ssl-perl build-essential + root:~# apt-get install libdbd-pg-perl libsnmp-perl libssl-dev libio-socket-ssl-perl curl postgresql build-essential On Fedora/Red-Hat: - root:~# yum install perl-core perl-DBD-Pg net-snmp-perl net-snmp-devel openssl-devel make automake gcc + root:~# yum install perl-core perl-DBD-Pg net-snmp-perl net-snmp-devel openssl-devel curl postgresql-server postgresql-contrib make automake gcc + root:~# postgresql-setup initdb + root:~# systemctl start postgresql + root:~# systemctl enable postgresql On BSD systems please see L. From 154db22ac09b727781c49b4a49737a9fb644aefc Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Wed, 13 Mar 2019 22:54:51 +0000 Subject: [PATCH 4/4] direct link to pg_hba.conf fix --- lib/App/Netdisco.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/App/Netdisco.pm b/lib/App/Netdisco.pm index 26e56217..2cce1691 100644 --- a/lib/App/Netdisco.pm +++ b/lib/App/Netdisco.pm @@ -57,9 +57,9 @@ L are =back We have several other pages with tips for -L, +L, L, -L, +L, and L. You can also speak to someone in the C<#netdisco@freenode> IRC channel, or on @@ -107,9 +107,11 @@ application: postgres:~$ createdb -O netdisco netdisco -The default PostgreSQL configuration isn't well tuned for modern server -hardware. We strongly recommend that you use the C Python program to -auto-tune your C file: +You may wish to L +so that local connections are working. The default PostgreSQL configuration +also needs tuning for modern server hardware. We recommend that you use the +C Python program to auto-tune your C file: =over 4