Re: [j-nsp] Centralized scripts and copying to redundant routing-engines..
http://www.juniper.net/techpubs/software/junos/junos103/junos-xml-ref-oper/html/summary-oper-request107.html#2093716 You can write a script that will do it for you automatically You can copy files between the REs from the CLI... From: Chris Evans To: juniper-nsp@puck.nether.net Sent: Thu, September 9, 2010 8:31:55 PM Subject: [j-nsp] Centralized scripts and copying to redundant routing-engines.. I have a question, hopefully someone has an answer.. I have setup centralized stored commit scripts, however I'm running into issues with devices (EX and MX) that have redundant routing-engines. The files have to be on both RE's to successfully commit as I use commit sync. How do I get the files on both RE's when using a central server?? The documentation says this: "If a platform has dual Routing Engines, you need to refresh the commit scripts on both Routing Engines. The commit synchronize command does not refresh the commit scripts between Routing Engines." That is a very vague statement and gives no options on how to do it.. Also the backup RE has no connectivity to the network, only the primary does.. So how am I supposed to copy the files over? Thanks Chris ___ juniper-nsp mailing list juniper-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/juniper-nsp ___ juniper-nsp mailing list juniper-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/juniper-nsp
Re: [j-nsp] Centralized scripts and copying to redundant routing-engines..
On Thu, Sep 09, 2010 at 09:31:55PM -0400, Chris Evans wrote: > I have a question, hopefully someone has an answer.. > > I have setup centralized stored commit scripts, however I'm running > into issues with devices (EX and MX) that have redundant > routing-engines. The files have to be on both RE's to successfully > commit as I use commit sync. How do I get the files on both RE's when > using a central server?? I've begged and pleaded for an automatic commit script sync feature (the same way you can configure an automatic config sync on commit with "system commit synchronize") since day 1, but there seems to be some kind of philosophical opposition to it that I don't understand. :) You can, of course, script it. :) I've just never gotten around to doing it (so far down my list of broken Juniper crap it's not even funny :(), but it'd be pretty simple. Somthing like this. var $other-re = { if (jcs:sysctl("hw.re.slotid", "i") == 0) { expr "re1"; else { expr "re0"; } } var $cs_delete = { { $other-re _ ":/var/db/scripts/commit/*"; } } var $cs_copy = { { "/var/db/scripts/commit/*" $other-re _ ":/var/db/scripts/commit"; } } jcs:invoke($cs_delete); jcs:invoke($cs_copy); You want to use the delete to handle cases where you don't have permission to modify the file, for example if you've ever upgraded scripts as "root" instead of a standard tacacs user, etc. -- Richard A Steenbergenhttp://www.e-gerbil.net/ras GPG Key ID: 0xF8B12CBC (7535 7F59 8204 ED1F CC1C 53AF 4C41 5ECA F8B1 2CBC) ___ juniper-nsp mailing list juniper-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/juniper-nsp
Re: [j-nsp] Centralized scripts and copying to redundant routing-engines..
> Date: Thu, 9 Sep 2010 21:31:55 -0400 > From: Chris Evans > Sender: juniper-nsp-boun...@puck.nether.net > > I have a question, hopefully someone has an answer.. > > > I have setup centralized stored commit scripts, however I'm running into > issues with devices (EX and MX) that have redundant routing-engines. The > files have to be on both RE's to successfully commit as I use commit sync. > How do I get the files on both RE's when using a central server?? > > > The documentation says this: "If a platform has dual Routing Engines, you > need to refresh the commit scripts on both Routing Engines. The commit > synchronize command does not refresh the commit scripts between Routing > Engines." > > > That is a very vague statement and gives no options on how to do it.. Also > the backup RE has no connectivity to the network, only the primary does.. So > how am I supposed to copy the files over? scp the scripts to the master RE and then tell that RE to copy them to the backup RE. scp -i private-key-file script u...@router:/path ssh -xai private-key-file u...@router copy /path/script reX:/path Note! You will need to check on the current master to know what to replace the 'X' with. ssh -xai private-key-file u...@router show chassis routing-engine 0 | grep "Current state" -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: ober...@es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751 ___ juniper-nsp mailing list juniper-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/juniper-nsp
Re: [j-nsp] Centralized scripts and copying to redundant routing-engines..
After I sent this I just remembered how to copy files between EX devices.. Use 'fpc#" instead of "re#".. So I'm going to come out and say this as I'm irritated.. Scripts are used to automate tasks, I can configure a centralized server for the active RE, yet I have to manually copy it to the backup RE.. What a sham. 10 Devices, this would be easy to manage, but thousands?? Come on! I've sent my SE a request to research how Juniper recommends this, if there is no elegant solution I'm putting in an ER to just get something like rsync setup to replicate the directories. On Thu, Sep 9, 2010 at 10:27 PM, Kevin Oberman wrote: > > Date: Thu, 9 Sep 2010 21:31:55 -0400 > > From: Chris Evans > > Sender: juniper-nsp-boun...@puck.nether.net > > > > I have a question, hopefully someone has an answer.. > > > > > > I have setup centralized stored commit scripts, however I'm running into > > issues with devices (EX and MX) that have redundant routing-engines. The > > files have to be on both RE's to successfully commit as I use commit > sync. > > How do I get the files on both RE's when using a central server?? > > > > > > The documentation says this: "If a platform has dual Routing Engines, you > > need to refresh the commit scripts on both Routing Engines. The commit > > synchronize command does not refresh the commit scripts between Routing > > Engines." > > > > > > That is a very vague statement and gives no options on how to do it.. > Also > > the backup RE has no connectivity to the network, only the primary does.. > So > > how am I supposed to copy the files over? > > scp the scripts to the master RE and then tell that RE to copy them to > the backup RE. > > scp -i private-key-file script u...@router:/path > ssh -xai private-key-file u...@router copy /path/script reX:/path > > Note! You will need to check on the current master to know what to > replace the 'X' with. > ssh -xai private-key-file u...@router show chassis routing-engine 0 | > grep "Current state" > -- > R. Kevin Oberman, Network Engineer > Energy Sciences Network (ESnet) > Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) > E-mail: ober...@es.net Phone: +1 510 486-8634 > Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751 > ___ juniper-nsp mailing list juniper-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/juniper-nsp
Re: [j-nsp] Centralized scripts and copying to redundant routing-engines..
On Sep 9, 2010, at 9:31 PM, Chris Evans wrote: > I have a question, hopefully someone has an answer.. > > > I have setup centralized stored commit scripts, however I'm running into > issues with devices (EX and MX) that have redundant routing-engines. The > files have to be on both RE's to successfully commit as I use commit sync. > How do I get the files on both RE's when using a central server?? Likely some sort of automation w/ jlogin from rancid would help you. > The documentation says this: "If a platform has dual Routing Engines, you > need to refresh the commit scripts on both Routing Engines. The commit > synchronize command does not refresh the commit scripts between Routing > Engines." > That is a very vague statement and gives no options on how to do it.. Also > the backup RE has no connectivity to the network, only the primary does.. So > how am I supposed to copy the files over? You can copy files locally between REs either at the CLI or in the shell. ja...@router-re0> file copy /var/log/messages re1:/tmp/bar {master} ja...@router-re0> file list re1:/tmp/bar re1: -- /tmp/bar {master} ja...@router-re0> file list re1:/tmp re1: -- /tmp: .clnpkg.LCK .pkg.LCK .snap/ bar ___ juniper-nsp mailing list juniper-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/juniper-nsp
[j-nsp] Centralized scripts and copying to redundant routing-engines..
I have a question, hopefully someone has an answer.. I have setup centralized stored commit scripts, however I'm running into issues with devices (EX and MX) that have redundant routing-engines. The files have to be on both RE's to successfully commit as I use commit sync. How do I get the files on both RE's when using a central server?? The documentation says this: "If a platform has dual Routing Engines, you need to refresh the commit scripts on both Routing Engines. The commit synchronize command does not refresh the commit scripts between Routing Engines." That is a very vague statement and gives no options on how to do it.. Also the backup RE has no connectivity to the network, only the primary does.. So how am I supposed to copy the files over? Thanks Chris ___ juniper-nsp mailing list juniper-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/juniper-nsp