OpenNetAdmin

Track. Automate. Configure.

Home About Features Community Develop
Download this project as a tar.gz file

problem diff'ing configs

tmyoungjr

17-04-2009 11:12:47

i've uploaded configs to a single host (3 configs to be exact)

the upload seems to go fine
i see three configs under said host in the GUI

i attempt to view a config or diff the configs and i get nothing. by nothing i mean the GUI exists - theres an obvious place where the config should be shown but it is not.

i have debug cranked up to 6 and am watching it as i make the request - but there are no errors or failures that i'm seeing. any thoughts would be nice.

Matt

17-04-2009 12:41:20

Hmm.. quite interesting.

First off, I would try to do a "dcm.pl -r config_display" to see if the config will show up there with what you expect.

When you have it in the GUI and you click the magnifying glass it should display the config file itself. It should have a blue box that gives info on that configuration. Do you see that blue box and no config? or no blue box at all either?

Since there is no GUI (as you found based on the bug you opened) to maintain the config types, you would only have "IOS_CONFIG" and "IOS_VERSION" as an option unless you manually created your own. Its possible when you added the configuration that there was a problem with the config type??

I also assume that you DO see the configuration entries in the list but just nothing when you try to view/diff it?

Nothing really solid yet to suggest other than the CLI display method. Keep feeding me other details that you notice..

tmyoungjr

17-04-2009 13:33:50

Hmm.. quite interesting.

First off, I would try to do a "dcm.pl -r config_display" to see if the config will show up there with what you expect.


yep sure does, here's an example :

[tyoung@host dcm-v1.17]$ dcm.pl -r config_display config=1
Use of uninitialized value in numeric eq (==) at /usr/lib/perl5/vendor_perl/5.8.8/IO/Socket/SSL.pm line 1185.
CONFIG TEXT RECORD (1 of 1)
id 1
configuration_type_id 1
host_id 26 (atl.7606.1.globalinx.com)
md5_checksum 6dbb622cdd73e9992156b04468c518de
config_body
!
! Last configuration change at 08:41:25 EDT Thu Mar 26 2009 by tmyoungjr
! NVRAM config last updated at 08:41:27 EDT Thu Mar 26 2009 by tmyoungjr

....cut most of config

end
ctime 2009-04-17 16:36:20
etime 0000-00-00 00:00:00
config_type_name IOS_CONFIG


When you have it in the GUI and you click the magnifying glass it should display the config file itself. It should have a blue box that gives info on that configuration. Do you see that blue box and no config? or no blue box at all either?


when i click that magnifying glass i get a workspace with a loading type image - that never goes away.

Since there is no GUI (as you found based on the bug you opened) to maintain the config types, you would only have "IOS_CONFIG" and "IOS_VERSION" as an option unless you manually created your own. Its possible when you added the configuration that there was a problem with the config type??

as you see above its IOS_CONFIG and in the gui list it shows the same.

I also assume that you DO see the configuration entries in the list but just nothing when you try to view/diff it?

correct

Nothing really solid yet to suggest other than the CLI display method. Keep feeding me other details that you notice..

tmyoungjr

21-04-2009 14:00:17

any thoughts here matt?

Matt

21-04-2009 14:14:40

Not a dang clue.. been pre-occupied with some things so I've honestly not put all 5 of my brain cells on the task.

I've been unable to recreate the same issue. It is possible I have fixed this since my last release. Since it has been WAY to long since I've put out a release, I plan on doing one this weekend. Hopefully that will fix your problem.

In the mean time, when I run into issues where there is no obvious error message on screen or in logs I will do the following.

From a cli try to execute the code and see if there are some sort of php errors being logged. (if you dont already have a php error log generated, it might be good to have one on but thats usually best for development work.) In this case I would try this command:

php /opt/ona/www/winc/display_config_text.inc.php

If it goes to a prompt then thats not the problem.. If it spits out an error, it should say the line number that has the issue.

Lets see where that gets us.....................

tmyoungjr

21-04-2009 14:20:06

[tyoung@ipplan ~]$ php /opt/ona/www/winc/display_config_text.inc.php
PHP Notice: Undefined variable: window_name in /opt/ona/www/winc/display_config_text.inc.php on line 6
PHP Notice: Undefined variable: window_name in /opt/ona/www/winc/display_config_text.inc.php on line 7
PHP Notice: Undefined index: host_id in /opt/ona/www/winc/display_config_text.inc.php on line 7
[tyoung@ipplan ~]$



buncha notices. usually not problematic - depending on when those get defined its not a big deal (usually happens after a submit button or the like). but again it really depends on the process flow

Matt

21-04-2009 14:24:31

hmm, no errors there.. those notices are normal.

Not sure what the heck it is.. I'd say lets try the new release that I'm building and see if that fixes it. If not, I'll dig in deeper.

tmyoungjr

22-04-2009 06:24:35

So the updated file didn't cut it either. I'll look forward to the next release and in the meantime keep working on a way to backup my routers automagically :) (at least until you release some of the fun utilities mentioned in the docs!)

tmyoungjr

28-04-2009 07:26:30

so - using the most current release from Matt,

I can now view and diff my configs without problem. it is possible that there were escape characters killing the config view in the current stable release version - i cannot test that at the moment.

Matt

28-04-2009 08:42:58

Well I have confirmed the problem is real CTRL-C characters. Now I just need to get a workable solution. I think I have a plan on it, just need to test.

Basically I'm going to store the file as is in the database. My configs already have CTRL-M on each line so that is not an issue. I'll just clean out the CTRL-C stuff before I try to print it via the browser. Should fix the issue.