Discussion:
[rancid] "End of run not found" troubleshooting
Sam Munzani
2007-10-18 19:53:28 UTC
Permalink
Team,

I am troubleshooting a "End of run not found" message in the log. The
device type is 6509 switch running IOS. When I run "clogin device-name"
it works fine and puts me on the box. However when rancid runs, I get
"End of run not found"

After reading through /opt/rancid/bin/rancid file, I discovered
following piece of code. Can somebody help me understand this RegEx?
if (/^(: +)?end$/) {
$found_end = 1;
return(1);
}

Is it looking for :end or something else? If it looks for ":end" on a
line shouldn't regex be "/^:end$/"? Last few lines on my device config
is as below.
ntp clock-period 17180035
ntp server xx.xx.xx.xx prefer
end

corp-rtr-1#


LOG file info:
corp-rtr-01: missed cmd(s): dir /all slavedisk2:,dir /all
sec-slot2:,show diag,dir /all sec-nvram:,dir /all sec-bootflash:,show
spe version,di
r /all slaveslot2:,dir /all slaveslot0:,dir /all sec-slot1:,dir /all
slavenvram:,dir /all sec-disk2:,dir /all slavesup-bootflash:,dir /all
sec-disk0:,dir
/all slavedisk1:,show module,show controllers,show diagbus,dir /all
slavedisk0:,dir /all sec-slot0:,dir /all sec-disk1:,write term,show vtp
status,dir /
all sup-microcode:,show vlan,dir /all slavebootflash:,show controllers
cbus,dir /all slaveslot1:,show running-config,show c7200
corp-rtr-01: End of run not found

Thanks in advance,
Sam
Mike Ashcraft
2007-10-18 20:30:20 UTC
Permalink
Sam,

/^(: +)?end$/ translates to:

Line starting with an optional (colon followed by one or more spaces)
followed by the string 'end' with the 'd' being the last character on
the line.

So this matches any of the following lines:

end
: end
: end
: end

I don't see this regex as your problem.

Mike

-----Original Message-----
From: rancid-discuss-***@shrubbery.net
[mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Sam Munzani
Sent: Thursday, October 18, 2007 1:53 PM
To: rancid-***@shrubbery.net
Subject: [rancid] "End of run not found" troubleshooting

Team,

I am troubleshooting a "End of run not found" message in the log. The
device type is 6509 switch running IOS. When I run "clogin device-name"
it works fine and puts me on the box. However when rancid runs, I get
"End of run not found"

After reading through /opt/rancid/bin/rancid file, I discovered
following piece of code. Can somebody help me understand this RegEx?
if (/^(: +)?end$/) {
$found_end = 1;
return(1);
}

Is it looking for :end or something else? If it looks for ":end" on a
line shouldn't regex be "/^:end$/"? Last few lines on my device config
is as below.
ntp clock-period 17180035
ntp server xx.xx.xx.xx prefer
end

corp-rtr-1#


LOG file info:
corp-rtr-01: missed cmd(s): dir /all slavedisk2:,dir /all
sec-slot2:,show diag,dir /all sec-nvram:,dir /all sec-bootflash:,show
spe version,di
r /all slaveslot2:,dir /all slaveslot0:,dir /all sec-slot1:,dir /all
slavenvram:,dir /all sec-disk2:,dir /all slavesup-bootflash:,dir /all
sec-disk0:,dir
/all slavedisk1:,show module,show controllers,show diagbus,dir /all
slavedisk0:,dir /all sec-slot0:,dir /all sec-disk1:,write term,show vtp
status,dir /
all sup-microcode:,show vlan,dir /all slavebootflash:,show controllers
cbus,dir /all slaveslot1:,show running-config,show c7200
corp-rtr-01: End of run not found

Thanks in advance,
Sam
Sam Munzani
2007-10-18 20:47:47 UTC
Permalink
Any suggestions on how should I start my troubleshooting? Any debug
flags etc.

Thanks,
Sam
Post by Mike Ashcraft
Sam,
Line starting with an optional (colon followed by one or more spaces)
followed by the string 'end' with the 'd' being the last character on
the line.
end
: end
: end
: end
I don't see this regex as your problem.
Mike
-----Original Message-----
Sent: Thursday, October 18, 2007 1:53 PM
Subject: [rancid] "End of run not found" troubleshooting
Team,
I am troubleshooting a "End of run not found" message in the log. The
device type is 6509 switch running IOS. When I run "clogin device-name"
it works fine and puts me on the box. However when rancid runs, I get
"End of run not found"
After reading through /opt/rancid/bin/rancid file, I discovered
following piece of code. Can somebody help me understand this RegEx?
if (/^(: +)?end$/) {
$found_end = 1;
return(1);
}
Is it looking for :end or something else? If it looks for ":end" on a
line shouldn't regex be "/^:end$/"? Last few lines on my device config
is as below.
ntp clock-period 17180035
ntp server xx.xx.xx.xx prefer
end
corp-rtr-1#
corp-rtr-01: missed cmd(s): dir /all slavedisk2:,dir /all
sec-slot2:,show diag,dir /all sec-nvram:,dir /all sec-bootflash:,show
spe version,di
r /all slaveslot2:,dir /all slaveslot0:,dir /all sec-slot1:,dir /all
slavenvram:,dir /all sec-disk2:,dir /all slavesup-bootflash:,dir /all
sec-disk0:,dir
/all slavedisk1:,show module,show controllers,show diagbus,dir /all
slavedisk0:,dir /all sec-slot0:,dir /all sec-disk1:,write term,show vtp
status,dir /
all sup-microcode:,show vlan,dir /all slavebootflash:,show controllers
cbus,dir /all slaveslot1:,show running-config,show c7200
corp-rtr-01: End of run not found
Thanks in advance,
Sam
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Aaron Smith
2007-10-18 21:27:10 UTC
Permalink
Post by Sam Munzani
Any suggestions on how should I start my troubleshooting? Any debug
flags etc.
I had a similar problem when grabbing configs off Catalyst 4006 devices
running CatOS. If you look at the last lines in cat5rancid (or rancid),
you see:

# check for completeness
if (scalar(%commands) || !$clean_run || !$found_end) {
if (scalar(%commands)) {
printf(STDOUT "$host: missed cmd(s): %s\n", join(',', keys(%
commands)));
printf(STDERR "$host: missed cmd(s): %s\n", join(',', keys(%
commands))) if ($debug);
}
if (!$clean_run || !$found_end) {
print STDOUT "$host: End of run not found\n";
print STDERR "$host: End of run not found\n" if ($debug);
system("/usr/bin/tail -1 $host.new");
}
unlink "$host.new" if (! $debug);
}

I recommend you print out the value of $clean_run and $found_end. That
tells you which is causing the problem. In my case, it was $clean_run.
For some reason it wasn't seeing the completed "exit" command, and thus
wouldn't back up the config. Until I get time to dig in further and
find the root cause, I inserted these lines before the code block above:

# I don't care if it sees "exit"
$clean_run = 1;

Works for now, maybe forever.
--
@@ron Smith
IT Infrastructure
BYU Idaho
john heasley
2007-10-18 22:34:20 UTC
Permalink
Post by Aaron Smith
I had a similar problem when grabbing configs off Catalyst 4006 devices
running CatOS. If you look at the last lines in cat5rancid (or rancid),
# check for completeness
if (scalar(%commands) || !$clean_run || !$found_end) {
if (scalar(%commands)) {
printf(STDOUT "$host: missed cmd(s): %s\n", join(',', keys(%
commands)));
printf(STDERR "$host: missed cmd(s): %s\n", join(',', keys(%
commands))) if ($debug);
}
if (!$clean_run || !$found_end) {
print STDOUT "$host: End of run not found\n";
print STDERR "$host: End of run not found\n" if ($debug);
system("/usr/bin/tail -1 $host.new");
}
unlink "$host.new" if (! $debug);
}
I recommend you print out the value of $clean_run and $found_end. That
tells you which is causing the problem. In my case, it was $clean_run.
For some reason it wasn't seeing the completed "exit" command, and thus
wouldn't back up the config. Until I get time to dig in further and
# I don't care if it sees "exit"
$clean_run = 1;
It looks for all these tag for a reason; to ensure that everything is
collected. truncation can occur, and without these it will commit
incomplete configurations to the repository.

re: your exit problem specifically; that is an catOS bug, which I believe
is largely worked-around by a patch someone offered. try 2.3.2a7.
Sam Munzani
2007-10-19 00:21:09 UTC
Permalink
That's what I have. I have 182 of these devices. 181 of them are working
fine. Only one of them is giving me the grief. I am inclined to think
there is something goofy for this device only but not obvious.

Thanks,
Sam
You should configure your IOS 6500 as a "cisco", not a "cat5". see
router.db(5).
Post by Sam Munzani
Team,
I am troubleshooting a "End of run not found" message in the log. The
device type is 6509 switch running IOS. When I run "clogin device-name"
it works fine and puts me on the box. However when rancid runs, I get
"End of run not found"
After reading through /opt/rancid/bin/rancid file, I discovered
following piece of code. Can somebody help me understand this RegEx?
if (/^(: +)?end$/) {
$found_end = 1;
return(1);
}
Is it looking for :end or something else? If it looks for ":end" on a
line shouldn't regex be "/^:end$/"? Last few lines on my device config
is as below.
ntp clock-period 17180035
ntp server xx.xx.xx.xx prefer
end
corp-rtr-1#
corp-rtr-01: missed cmd(s): dir /all slavedisk2:,dir /all
sec-slot2:,show diag,dir /all sec-nvram:,dir /all sec-bootflash:,show
spe version,di
r /all slaveslot2:,dir /all slaveslot0:,dir /all sec-slot1:,dir /all
slavenvram:,dir /all sec-disk2:,dir /all slavesup-bootflash:,dir /all
sec-disk0:,dir
/all slavedisk1:,show module,show controllers,show diagbus,dir /all
slavedisk0:,dir /all sec-slot0:,dir /all sec-disk1:,write term,show vtp
status,dir /
all sup-microcode:,show vlan,dir /all slavebootflash:,show controllers
cbus,dir /all slaveslot1:,show running-config,show c7200
corp-rtr-01: End of run not found
Thanks in advance,
Sam
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Loading...