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: Changing Web Options (Port Controls, Reasons, etc...)
(Jonathan Woodard)
2. Re: DB Schema Upgrade Error on NetDisco (Steven Xu)
3. Missing DNS name for re-discovered device. (Steven Xu)
4. Re: Missing DNS name for re-discovered device. (Oliver Gorwits)
5. Re: DB Schema Upgrade Error on NetDisco (Oliver Gorwits)
6. Re: Changing Web Options (Port Controls, Reasons, etc...)
(Oliver Gorwits)
--- Begin Message ---Thank you Oliver, I appreciate the reply. I was able to do everything below to fit our needs. I agree, it was not trivial. :-) I thought about posting the directions here, however, I did not because I feared it might not be a "correct" way. I did not want to lead anyone incorrectly. If anyone is interested in seeing how I did it, I would show but I do not want to cause more harm than good with poorly done "hacks" I don't believe the cookie was working, hence the reason for me to make the change. Thank you again for your time in this project... I can't begin to tell you how many times this has helped me. A random thought... Have you ever considered an API? I would love to be able to set this up and make calls to it from external sources. Granted I could just make the SQL queries too. :-) -----Original Message----- From: Oliver Gorwits [mailto:[email protected]] Sent: Monday, July 13, 2015 5:04 PM To: [email protected] Subject: Re: [Netdisco] Changing Web Options (Port Controls, Reasons, etc...) Hi Jonathan, On 2015-06-01 15:59, Jonathan Woodard wrote: > 1. Where/How do I set Port controls to always be selected. We have no > users that do not have this option and it is always an extra step to > enable this for port bouncing. This isn't exposed to configuration, but is stored within one of the Perl files in the app in a data structure. It *is* possible to override this, but it's not trivial. Let me know if you want to be led through it (might be worth the effort if you have many staff or a large installation). However once the user has visited the page and set the checkbox, it *should* be remembered in a cookie. Let me know if that isn't working (I can't guarantee a fix, as this stuff is tricky). > 2. How do I select a default reason? 90% of the changes is port > bouncing to reboot our Cisco Phones. I have added it in > deployment.yml, however, I would like to make this the default reason. Sadly there's nothing in the code to support this. You could register a feature request here (Create Ticket): https://sourceforge.net/p/netdisco/nd2-features/ > 3. We have a "Phone status" application that sends a URL in the > following format > > "http://X.X.X.X/search?tab=node&q=XXXXXXXXXXXX&stamps=on&daterange=&mac_format=IEEE" > . How can I change this so that the URL has port control enabled? > This > would save us another step. Add "c_admin=on" to the query string. > Thank you all again for a great application and supportive community! Thanks :) I hope this helps, a bit, regards, oliver. ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ Netdisco mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/netdisco-users
--- End Message ---
--- Begin Message --- Hi Oliver,
I found the SQL files and investigated further. I'm running Postgres 9.3 and migrated our old version of the database using pg_dump and psql. There were multiple issues with upgrading:
- A number of tables were being created even though they already existed; likely because our database was unversioned. Additionally, some create table statements for the same table appeared multiple times in different SQL upgrade files. When did Netdisco start using schema versions? We were running on Netdisco V0.93, but our database matched the database schema around version 25.
- A syntax error/typo " ALTER TABLE node ADD PRIMARY KEY key (mac, switch, port, vlan); " I'd like to push a fix for this. How can I do that?
- netdisco-db-deploy didn't like comments in the create table statements, indicated syntax error for those statements. I didn't have this problem when executing the upgrade files with psql.
- netdisco-db-deploy ignores and hides certain errors and skips the remainder of the SQL upgrade file if it isn't able to run one of the statements. I don't remember exactly what problems this caused for me.
Steven
-----Oliver Gorwits <[email protected]> wrote: -----To: <[email protected]>
From: Oliver Gorwits <[email protected]>
Date: 07/13/2015 05:42PM
Subject: Re: [Netdisco] DB Schema Upgrade Error on NetDisco
Hi Steven,
On 2015-05-27 20:52, Steven Xu wrote:
> I would like to find the sql statements used to upgrade the netdisco
> schema.
Sure, they're located at:
/home/netdisco/perl5/lib/perl5/App/Netdisco/DB/schema_versions/...
Each step is numbered and they're processed in order.
> I'm trying to upgrade a very old netdisco server to the latest
> version
> (< version 1). When I run netdisco-deploy, the database upgrade
> performed in netdisco-db-deploy gives the errors below.
What PostgreSQL version are you running? I wonder whether it's too old
for the syntax. I suggest upgrading to at least 8.4 and 9.1+ if you can.
regards,
oliver.
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Netdisco mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/netdisco-users
--- End Message ---
--- Begin Message --- Hi, I'm working upgrading from v0.93 to v2. I found that when I deleted a device from Netdisco and successfully discovered the device again, the DNS name does not appear in the Port Utilization report or in the Connected Devices column. Inspecting the database, the DNS column is unset for this device. There also does not seem to be any code that actually sets the DNS name for the device, so I suspect this problem would occur with new devices as well. Is this a bug? I'm using v2.032005.
Steven
--- End Message ---
--- Begin Message ---On 2015-07-17 17:24, Steven Xu wrote:Inspecting the database, the DNS column is unset for this device. There also does not seem to be anycode that actually sets the DNS name for the device, so I suspect this problem would occur with new devices as well. Is this a bug? I'm usingv2.032005.Yes this is a bug, just fixed in v2.032006 which is on CPAN now.Sorry about the bug, and also not being able to tell anyone it was fixed because this mail list service was down.regards, oliver.
--- End Message ---
--- Begin Message ---Hi Steven, On 2015-07-14 14:53, Steven Xu wrote:* A number of tables were being created even though they already existed; likely because our database was unversioned. Additionally, some create table statements for the same table appeared multiple times in different SQL upgrade files. When did Netdisco start using schema versions? We were running on Netdisco V0.93, but our database matched the database schema around version 25.Netdisco began using schema versions from release 2.x of the software. The schema deployment system needs to cope with many different versions of Netdisco pre-dating this (i.e. 0.x and 1.x), as well as some feature patches which were never released. Therefore there are many duplicates and each deployment statement happens in a transaction so that it can fail yet the complete schema deployment will still go ahead. Each schema version is also usually one SQL statement only, for similar reasons. The failure of any schema version step is not a problem.* A syntax error/typo " ALTER TABLE node ADD PRIMARY KEY KEY (mac, switch, port, vlan); " I'd like to push a fix for this. How can I do that?Many thanks for pointing this out. I've fixed it in the code repository myself, because sourceforge.net is down right now.* netdisco-db-deploy didn't like comments in the create tablestatements, indicated syntax error for those statements. I didn't havethis problem when executing the upgrade files with psql.Odd, I don't see these errors myself. Please would you provide some command output or shell log showing the error?* netdisco-db-deploy ignores and hides certain errors and skips the remainder of the SQL upgrade file if it isn't able to run one of thestatements. I don't remember exactly what problems this caused for me.This should not be the case. Please would you give an example so we can try to reproduce the problem?Many thanks for the feedback, regards, oliver.Steven -----Oliver Gorwits <[email protected]> wrote: ----- To: <[email protected]> From: Oliver Gorwits <[email protected]> Date: 07/13/2015 05:42PM Subject: Re: [Netdisco] DB Schema Upgrade Error on NetDisco Hi Steven, On 2015-05-27 20:52, Steven Xu wrote:I would like to find the sql statements used to upgrade the netdisco> schema. Sure, they're located at: /home/netdisco/perl5/lib/perl5/App/Netdisco/DB/schema_versions/... Each step is numbered and they're processed in order.I'm trying to upgrade a very old netdisco server to the latest> version(< version 1). When I run netdisco-deploy, the database upgrade> performed in netdisco-db-deploy gives the errors below.What PostgreSQL version are you running? I wonder whether it's too oldfor the syntax. I suggest upgrading to at least 8.4 and 9.1+ if you can. regards, oliver. ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support thatyou need to offload your IT needs and focus on growing your business.Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ [1] _______________________________________________ Netdisco mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/netdisco-users [2] Links: ------ [1] https://www.gigenetcloud.com/ [2] https://lists.sourceforge.net/lists/listinfo/netdisco-users
--- End Message ---
--- Begin Message ---On 2015-07-14 14:31, Jonathan Woodard wrote:A random thought... Have you ever considered an API? I would love to be able to set this up and make calls to it from external sources.Yes but we never found the time to implement it properly. You're not the first to ask :-).Partly this is because most of the data is access in the forms of reports - precanned SQL queries with parameters, rather than pulling rows of raw data from the tables.You can create such reports by configuration alone ... putting the SQL into your deployment.yml file and then a URL will be built that can access the data, even with bind parameters and basic sorting. The only issue is authenticating, which could either be skipped via configuration, or done if you have the right libraries.If this sounds interesting, I can provide pointers to the docs. regards, oliver.Granted I could just make the SQL queries too. :-) -----Original Message----- From: Oliver Gorwits [mailto:[email protected]] Sent: Monday, July 13, 2015 5:04 PM To: [email protected]Subject: Re: [Netdisco] Changing Web Options (Port Controls, Reasons, etc...)Hi Jonathan, On 2015-06-01 15:59, Jonathan Woodard wrote:1. Where/How do I set Port controls to always be selected. We have nousers that do not have this option and it is always an extra step to enable this for port bouncing.This isn't exposed to configuration, but is stored within one of the Perl files in the app in a data structure. It *is* possible tooverride this, but it's not trivial. Let me know if you want to be ledthrough it (might be worth the effort if you have many staff or a large installation). However once the user has visited the page and set the checkbox, it *should* be remembered in a cookie. Let me know if that isn't working (I can't guarantee a fix, as this stuff is tricky).2. How do I select a default reason? 90% of the changes is port bouncing to reboot our Cisco Phones. I have added it indeployment.yml, however, I would like to make this the default reason.Sadly there's nothing in the code to support this. You could register a feature request here (Create Ticket): https://sourceforge.net/p/netdisco/nd2-features/3. We have a "Phone status" application that sends a URL in the following format "http://X.X.X.X/search?tab=node&q=XXXXXXXXXXXX&stamps=on&daterange=&mac_format=IEEE" . How can I change this so that the URL has port control enabled? This would save us another step.Add "c_admin=on" to the query string.Thank you all again for a great application and supportive community!Thanks :) I hope this helps, a bit, regards, oliver. ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ Netdisco mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/netdisco-users ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ Netdisco mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/netdisco-users
--- End Message ---
------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/
_______________________________________________ Netdisco mailing list - Digest Mode [email protected] https://lists.sourceforge.net/lists/listinfo/netdisco-users
