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: delete device/node & jobqueue/device_skip (Oliver Gorwits)
--- Begin Message ---
Hi Nick
You should be able to ignore these entries in the job queue and admin
table. Netdisco will try to poll the devices a few times, but then
eventually mark them as inaccessible and skip over. It's best, I think, to
let Netdisco do that (which is the design of the system) rather than poke
around too much. There should be no performance impact.
However, do let us know if you think there is a performance impact, or if
there is some issue other than cosmetic that these entries are causing. At
the end of the day, yes, discover_no and discover_no_type are the way to
go, if you know in advance what you want to filter.
You can also simply empty the admin table ("delete from admin") and restart
the backend. It's a bit brutal but Netdisco will be fine with that :-).
regards,
oliver.
On Fri, 14 Dec 2018 at 02:02, Nick Nauwelaerts <[email protected]>
wrote:
> heya,
>
> perhaps i'm just not seeing it, but how do you get rid of unwanted devices
> in the admin and/or device_skip tables? the catch is however that the
> device i want to delete has not been discovered and as such isn't know in
> the device table.
>
>
>
>
>
> i have 2 specific cases.
>
>
>
>
>
>
>
> #1: device is discovered somehow, most likely lldp or cdp, but not managed
> by us & we have no access either.
>
>
>
>
>
> netdisco-do delete -d 10.75.5.61
>
> [15168] 2018-12-14 01:02:26 info App::Netdisco version 2.039033 loaded.
>
> [15168] 2018-12-14 01:02:26 info delete: error - Don't know device:
> 10.75.5.61
>
>
>
>
>
> netdisco-do psql -e "SELECT ip FROM public.device WHERE ip = '10.75.5.61'"
>
> [15214] 2018-12-14 01:09:11 info App::Netdisco version 2.039033 loaded.
>
> [15214] 2018-12-14 01:09:11 info psql: started at Fri Dec 14 02:09:11
> 2018
>
> ip
>
> ----
>
> (0 rows)
>
>
>
>
>
> netdisco-do psql -e "SELECT * FROM public.device_skip WHERE device =
> '10.75.5.61'"
>
> [15251] 2018-12-14 01:10:41 info App::Netdisco version 2.039033 loaded.
>
> [15251] 2018-12-14 01:10:41 info psql: started at Fri Dec 14 02:10:41
> 2018
>
> backend | device | actionset | deferrals |
> last_defer
>
>
> ---------------------+------------+-----------+-----------+----------------------------
>
> xxx.aquafin.be | 10.75.5.61 | {} | 9 | 2018-12-12
> 11:14:41.206275
>
> (1 row)
>
>
>
>
>
> netdisco-do psql -e "SELECT
> ip,port,remote_ip,remote_port,remote_type,remote_id FROM public.device_port
> WHERE remote_ip = '10.75.5.61'"
>
> [15540] 2018-12-14 01:34:06 info App::Netdisco version 2.039033 loaded.
>
> [15540] 2018-12-14 01:34:07 info psql: started at Fri Dec 14 02:34:07
> 2018
>
> ip | port | remote_ip | remote_port | remote_type | remote_id
>
> ----+------+-----------+-------------+-------------+-----------
>
> (0 rows)
>
>
>
>
>
> i think i ended up with in the following way: device 10.75.5.61 is
> discovered through cdp or lldp, but snmp access to the device was not
> working. i edited my configuration to add the device (well, the whole ip
> range) to devices_no. i might have cleared my complete job queue as well,
> but not sure of that.
>
>
>
>
>
>
>
>
>
>
>
> the same goes for devices that just refuse to be discovered. it seems they
> keep hanging around in admin (as queued) & device_skip without any way to
> get rid of them, they dont show up in the webinterface jobqueue for some
> reason and they're not present in the device table so they refuse to be
> acted on. the only way i can see to get rid of them is deleting directly in
> the database.
>
>
>
>
>
> #2 device that is managed by us but which we don't want/need to discover.
> in this specific case, cisco ata boxes (voip to pots converters)
>
>
>
> netdisco-do delete -d 10.98.59.110
>
> [15428] 2018-12-14 01:26:34 info App::Netdisco version 2.039033 loaded.
>
> [15428] 2018-12-14 01:26:35 info delete: error - Don't know device:
> 10.98.59.110
>
>
>
>
>
> netdisco-do psql -e "select
> job,entered,started,device,action,subaction,status,username,device_key from
> public.admin WHERE device = '10.98.59.110';"
>
> [15446] 2018-12-14 01:27:44 info App::Netdisco version 2.039033 loaded.
>
> [15446] 2018-12-14 01:27:44 info psql: started at Fri Dec 14 02:27:44
> 2018
>
> job | entered | started | device | action |
> subaction | status | username | device_key
>
>
> --------+---------------------------+---------+--------------+----------+------------+--------+----------+-----------------
>
> 115172 | 2018-12-13 11:06:17.53291 | | 10.98.59.110 | discover |
> with-nodes | queued | | ATAc40acb4d4632
>
>
>
>
>
> netdisco-do psql -e "SELECT device,actionset,deferrals,last_defer FROM
> public.device_skip WHERE device = '10.98.59.110'"
>
> [15466] 2018-12-14 01:28:36 info App::Netdisco version 2.039033 loaded.
>
> [15466] 2018-12-14 01:28:36 info psql: started at Fri Dec 14 02:28:36
> 2018
>
> device | actionset | deferrals | last_defer
>
> --------------+-----------+-----------+----------------------------
>
> 10.98.59.110 | {} | 10 | 2018-12-14 00:42:23.006163
>
>
>
>
>
> netdisco-do psql -e "SELECT
> ip,port,remote_ip,remote_port,remote_type,remote_id FROM public.device_port
> WHERE remote_ip = '10.98.59.110'"
>
> [15546] 2018-12-14 01:34:31 info App::Netdisco version 2.039033 loaded.
>
> [15546] 2018-12-14 01:34:31 info psql: started at Fri Dec 14 02:34:31
> 2018
>
> ip | port | remote_ip | remote_port | remote_type
> | remote_id
>
>
> --------------+------+--------------+-------------------+---------------+-----------------
>
> 10.98.59.200 | fa2 | 10.98.59.110 | 50:6f:72:74:20:31 | Cisco ATA 187 |
> ATAc40acb4d4632
>
>
>
>
>
>
>
> i added these devices to discover_no_type as 'Cisco ATA' do prefer to
> still have them in my inventory but they dont need to be discovered.
>
>
>
>
>
>
>
>
>
>
>
>
>
> anyway, the actual question: how can i get them out of my jobqueue &
> device_skip table? i have around 60 devices like this which are stuck in
> limbo.
>
>
>
>
>
>
>
> is an additional command for netdisco-do the way to go for this?
>
> or perhaps let Util/Device.pm cope with it instead in the existing delete
> path?
>
>
>
>
>
> sub delete_device {
>
> my ($ip, $archive, $log) = @_;
>
>
>
> ->>> just blindly delete from admin & device_skip here, then continue with
> the deletion code that's alrdy there. and take into account that if an ip
> is found in admin and/or device_skip it can be a succes; so you dont roll
> back the database.
>
>
>
> my $device = get_device($ip) or return 0;
>
> return 0 if not $device->in_storage;
>
>
>
>
>
>
>
> very related to https://github.com/netdisco/netdisco/issues/466 ; but
> that ticket also has other strange stuff going on, such as jobs that are
> queued multiple times & strange times for pollerperformance.
>
>
>
>
>
> (open question remains what to do if the device also has entries in node,
> node_ip etc.. leave those alone or delete as well. i'm leaning to just
> leave them)
>
>
>
>
>
> anyway, thx in advance for reading through this all.
>
>
>
> // nick
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------
>
> *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> *
>
> 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.
> _______________________________________________
> Netdisco mailing list
> [email protected]
> https://sourceforge.net/p/netdisco/mailman/netdisco-users/
--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
[email protected]
https://lists.sourceforge.net/lists/listinfo/netdisco-users