On Fri, Feb 11, 2022 at 5:58 PM Jon Lewis <jlewis@lewis.org> wrote:
On Fri, 11 Feb 2022, Lyndon Nerenberg (VE7TFX/VE6BBM) wrote:

> On an EX4300 switch running JunOS 14.1 let's imagine I typed
>
>       config
>       delete interfaces
>
> before coming to my senses.  How am I supposed to back out of that
> mess?  For the life of me, after a week of reading the 3000 page
> reference manual, and endless DuckDuckGoing, I cannot see a simple
> way of just abandoning the commit.  I've got to be missing something
> stunningly obvious here because it's unthinkable that this functionality
> doesn't exist.  Help?!?

What would you say if I told you a coworker once did exactly that, and did
commit and-quit...and it had to be fixed by another coworker getting to it
via OOB console and doing the rollback?  :)

top [not necessary in your case, if you never left top]
rollback 0
quit

Also, get into the habit of never doing a commit without first doing
top
show | compare
so you can see what your change is actually doing to the whole config.

My muscle memory includes:
{ some changes }
top
show | compare
commit confirmed 5
{flip over the little electronic egg timer thingie that lives next to my keyboard, so that it beeps after 3 minutes...wait... wait... press enter a few times to make sure I haven't screwed myself...}
commit

If I skip the egg timer, then I *will* forget, and it will automatically roll back. One of my largest annoyances with the Juniper CLI (other than the fact that it won't format large numbers into a human readable format in things like 'monitor interface traffic') is that it beeps the terminal *after* it times out the commit. 

Gee, thanks for letting me know you just blew away all of my changes... couldn't you have done that 1 minute before automatically reverting?!!!


W




i.e. if you did a show | compare at the top of the config and saw the
entire interfaces section of the config was "removed" in the resulting
config diff, you probably wouldn't commit.

----------------------------------------------------------------------
  Jon Lewis, MCP :)           |  I route
  StackPath, Sr. Neteng       |  therefore you are
_________ http://www.lewis.org/~jlewis/pgp for PGP public key_________
--
Perhaps they really do strive for incomprehensibility in their specs.
After all, when the liturgy was in Latin, the laity knew their place.
-- Michael Padlipsky