Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: nsp: juniper
Unit-ID's revisited / accessing committed configuration
 

Index | Next | Previous | View Flat


benny+usenet at amorsen

Apr 26, 2012, 5:53 AM


Views: 431
Permalink
Unit-ID's revisited / accessing committed configuration

Is it possible to somehow get the committed configuration as it looked
after commit-scripts were applied? I do not want the commit-scripts
re-run, I simply want to fetch the configuration as it was after all
scripts were run and the commit succeeded.

To explain why I need to do this, it is necessary to go back to the unit
ID problem I posted about earlier.

To reiterate, the challenge is to generate unit ID's for a bunch of
q-in-q interfaces like this:

unit 5239 {
encapsulation vlan-ccc;
vlan-tags outer 1559 inner 3;
input-vlan-map pop-pop;
output-vlan-map push-push;
}

I solved it, or so I thought, by keeping all configuration in
apply-macros, like this:

apply-macro eompls-1001089 {
inner 3;
interface ge-1/0/4;
outer 1559;
}

which then generates the above q-in-q interface as a transient-change.
The unit ID is simply the position of the apply-macro in the
configuration file + 5000, so this particular apply-macro happens to be
the 239th apply-macro.

It all works really well, in general. Except I had not considered what
happens if you remove an apply-macro. All is well if you remove the last
apply-macro, but if you happen to remove one of the first ones, every
interface below changes unit ID. The MX80 was less than happy about
hundreds of interfaces being torn down and rebuilt...

At this point it is tempting to give up on that design and "simply" add a
unit ID to the provisioning database and to the apply-macro. Keeping
them consistent is no fun at all.

However, I would like to give the dynamic ID's one more chance. If it is
possible to find out which unit ID the previous commit used for a
particular apply-macro, I can then reuse that unit ID. Since all the
changes my commit script does are transient, this seems to be a
challenging task.

Any help is really appreciated!


/Benny

_______________________________________________
juniper-nsp mailing list juniper-nsp [at] puck
https://puck.nether.net/mailman/listinfo/juniper-nsp

Subject User Time
Unit-ID's revisited / accessing committed configuration benny+usenet at amorsen Apr 26, 2012, 5:53 AM
    Re: Unit-ID's revisited / accessing committed configuration jackson.tim at gmail Apr 26, 2012, 5:59 AM
    Re: Unit-ID's revisited / accessing committed configuration benny+usenet at amorsen Apr 26, 2012, 6:30 AM
        Re: Unit-ID's revisited / accessing committed configuration ccall at juniper Apr 26, 2012, 10:20 AM
    Re: Unit-ID's revisited / accessing committed configuration benny+usenet at amorsen Apr 26, 2012, 1:07 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.