Discussion:
[rancid] SSH process hangs using cron with Aruba devices
Simpson, Brett
2009-03-06 14:23:21 UTC
Permalink
I setup a custom expect based on the Cisco ones and can do a successful
backup of the Aruba devices. The only real different if I added some
extra filter to remove some unneeded lines. This works fine if I do it
manually while SSH'ed into the Rancid server but if I run it through
cron the ssh instances hang. I saw a number of posts on similar issues
but haven't had much luck in fixing. Any ideas?



Centos 5.2 i386

rancid-2.3.2a9



Thanks,

Brett
john heasley
2009-03-06 19:25:32 UTC
Permalink
Post by Simpson, Brett
I setup a custom expect based on the Cisco ones and can do a successful
backup of the Aruba devices. The only real different if I added some
extra filter to remove some unneeded lines. This works fine if I do it
manually while SSH'ed into the Rancid server but if I run it through
cron the ssh instances hang. I saw a number of posts on similar issues
but haven't had much luck in fixing. Any ideas?
TERM setting?
didnt apply expect patch from rancid web site?
other timing related issue in expect regexes?
Post by Simpson, Brett
Centos 5.2 i386
rancid-2.3.2a9
Thanks,
Brett
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Brett Simpson
2009-03-06 20:19:30 UTC
Permalink
Post by Simpson, Brett
Post by Simpson, Brett
I setup a custom expect based on the Cisco ones and can do a
successful
Post by Simpson, Brett
backup of the Aruba devices. The only real different if I added some
extra filter to remove some unneeded lines. This works fine if I do
it
Post by Simpson, Brett
manually while SSH'ed into the Rancid server but if I run it through
cron the ssh instances hang. I saw a number of posts on similar
issues
Post by Simpson, Brett
but haven't had much luck in fixing. Any ideas?
TERM setting?
When I SSH in manually it's TERM=xterm. For cron I put env in a script
and I can't see a TERM but I had tried doing TERM=xterm, TERM=vt100,
TERM=linux from a bash script and then execute rancid-run group but it
still hangs.
Post by Simpson, Brett
didnt apply expect patch from rancid web site?
No I didn't but I'm using the expect-5.43.0-5.1 rpm. Should I compile
the expect-5.40.1_hack2.tar.gz on the rancid website?
Post by Simpson, Brett
other timing related issue in expect regexes?
Don't think so. When I run them manually they work fine every time and
are quick.
Post by Simpson, Brett
Post by Simpson, Brett
Centos 5.2 i386
rancid-2.3.2a9
Thanks,
Brett
Matt Wilson
2009-04-13 18:00:59 UTC
Permalink
Hi-

Anyone out there successfully collecting from Aruba wireless
controllers? Would you be willing to post/share your "arubarancid" and
"arubalogin" scripts?

It looks like the topic of collecting from Aruba wireless controllers
pops up on the list from time to time, but when I did a google search
for "site:shrubbery.net aruba", I did not see any scripts or success
stories in the results.

Thanks-
Matt
--
Matt Wilson <***@northwestern.edu>
Network Software Engineer, IT Telecomm and Network Services
Northwestern University
Simpson, Brett
2009-04-13 19:04:12 UTC
Permalink
I wrote some but haven't been able to get them to work through cron. If
I manually run them they are ok. Haven't had a chance to work though
some of the troubleshooting items from John Heasley. Hope to have some
time this week to work on them again.

I have attached my copies of the ones I'm using which are slightly
modified from the cisco ones.

From John Heasley but haven't had a chance to do yet:
"looks like this this is confused by the terminal type. or, the
terminal length to be exact. try sending a cmd to disable the pager.
try setting ROWS and COLS in the environment from the rancid script."

-----Original Message-----
From: rancid-discuss-***@shrubbery.net
[mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Matt Wilson
Sent: Monday, April 13, 2009 2:01 PM
To: rancid-***@shrubbery.net
Subject: [rancid] Support for Aruba devices

Hi-

Anyone out there successfully collecting from Aruba wireless
controllers? Would you be willing to post/share your "arubarancid" and
"arubalogin" scripts?

It looks like the topic of collecting from Aruba wireless controllers
pops up on the list from time to time, but when I did a google search
for "site:shrubbery.net aruba", I did not see any scripts or success
stories in the results.

Thanks-
Matt
--
Matt Wilson <***@northwestern.edu>
Network Software Engineer, IT Telecomm and Network Services
Northwestern University
Andrew Brennan
2009-04-13 18:15:23 UTC
Permalink
I haven't done it, but one issue is that their encrypted strings change
between each run of "show configuration" even when the configuration is
unaltered.

andrew.
Post by Matt Wilson
Hi-
Anyone out there successfully collecting from Aruba wireless
controllers? Would you be willing to post/share your "arubarancid" and
"arubalogin" scripts?
It looks like the topic of collecting from Aruba wireless controllers
pops up on the list from time to time, but when I did a google search
for "site:shrubbery.net aruba", I did not see any scripts or success
stories in the results.
Thanks-
Matt
--
Network Software Engineer, IT Telecomm and Network Services
Northwestern University
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Elle Plato
2013-02-07 22:25:25 UTC
Permalink
Andrew,
Post by Andrew Brennan
I haven't done it, but one issue is that their encrypted strings change
between each run of "show configuration" even when the configuration is
unaltered.
I am hoping other people put pressure on Aruba to fix this, they change
encrypted strings, the location of items with ACLs, blank lines and more.

I use perl with expect.pm, and have a script replace the
keys with *****, and as long as I have the keys someplace else
for hardware replacements, this works well to avoid the constantly changing
diffs.

Today's fun is two devices, both running Version 6.1.3.6 and one prints
extra
blank lines in "show startup-config" and the other does not. I was hoping
the
rancid community would have seen this and had some insight, but if that is
the case, my google foo does not find it.

Is it really that hard to make the output of "show whatever" consistent?

I am not sure how hard it would be to write an arubalogin. I have screen
scraping code
in PERL with expect.pm and it is fairly easy to get running. I replace
.cloginrc with
a DevInfo.pm module that reads a config file. My scripts just use DevInfo,
and then
call a getMethod to get the username and password along with some device
specific
stuff like autoenable and sshver=1

($uname, $password, ConnectionMethod, $DevSpecificArgs) = getMethod($host);

If anyone has any insight into the extra lines, I am tormented and would
love to hear suggestions.

Sorry for the hijack, I just *really* wanted to +1 the issue of Aruba
changing config bits.

Elle
heasley
2013-02-08 06:30:49 UTC
Permalink
Post by Elle Plato
Andrew,
Post by Andrew Brennan
I haven't done it, but one issue is that their encrypted strings change
between each run of "show configuration" even when the configuration is
unaltered.
I am hoping other people put pressure on Aruba to fix this, they change
encrypted strings, the location of items with ACLs, blank lines and more.
I use perl with expect.pm, and have a script replace the
keys with *****, and as long as I have the keys someplace else
for hardware replacements, this works well to avoid the constantly changing
diffs.
Today's fun is two devices, both running Version 6.1.3.6 and one prints
extra
blank lines in "show startup-config" and the other does not. I was hoping
the
rancid community would have seen this and had some insight, but if that is
the case, my google foo does not find it.
there is code in the cisco module to compress comment lines of running
configs. you could use the same method to filter the extra blanks.
Elle Plato
2013-02-07 22:13:30 UTC
Permalink
This works fine if I do it manually while SSH’ed into the Rancid server
but if I run it through cron the ssh instances hang.
I don't run rancid, but I have some homegrown stuff I maintain that works
in a similar fashion.
In general I look for differences in the execution environment.
- Dump the environment to look for changes in the path, etc.
- If you are running as a different user, look for permissions issues.
- maybe you cannot find your .cloginrc or some executable you are shelling
out to.
- Non-interactive shells behave differently than interactive shells in
terms of sourcing dotfiles and more.
You can force them to be treated as interactive, but if you have
something expecting something on STDIN,
you are going to be waiting for a long time.

Have you tried enabled debugging using debug and exp_internal? It can be
real handy when expect is waiting on a pattern match, and you need to see
exactly what it is waiting on.



Elle
Loading...