Mailing List Archive

stopping command from being run
Hello,

We are running 3.7

I seem to be having difficulty in getting the command “show dir /all” to stop be executed with my nexus switches.

I have edited the ‘nxrancid’ and the ‘nxos.pm’ without success.

Ideas?

-Mike

--
Michael T. Voity
Network Engineer
University of Vermont
Re: stopping command from being run [ In reply to ]
Hello,

Anyone have an idea that they can point me in a direction?

Thanks,

-Mike


--
Michael T. Voity
Network Engineer
University of Vermont


From: Rancid-discuss <rancid-discuss-bounces@shrubbery.net> On Behalf Of Michael T. Voity
Sent: Friday, June 22, 2018 12:05 PM
To: rancid-discuss@shrubbery.net
Subject: [rancid] stopping command from being run

Hello, 
 
We are running 3.7
 
I seem to be having difficulty in getting the command “show dir /all” to stop be executed with my nexus switches.
 
I have edited the  ‘nxrancid’  and the ‘nxos.pm’  without success.
 
Ideas?

-Mike

--
Michael T. Voity
Network Engineer
University of Vermont

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: stopping command from being run [ In reply to ]
Hi Mike. I am running 3.7 also, in my case on RHEL7 with git. I am very happy with it.

As I understand it, editing the perl modules to try to change commands issued to devices is a very wrong approach; it means you can't easily upgrade and your installation will be weird and difficult to get advice for online. so I strongly recommend you carefully revert any such changes you made.

The files rancid.types.base (base types, do not edit) and rancid.types.conf (site custom device types) determine what commands are run for specific devices.

So for example: on my Cisco Nexus 9Ks, I did not want to run the "show logflash" command, so I copied the "cisco-nx" device type from /etc/rancid/rancid.types.base to /etc/rancid/rancid.types.conf under the new device type name "cisco-nx9k" and removed the command I did not want.

This is how I did it, if you are OK with old-school unixisms...

cd /etc/rancid
gawk 'BEGIN{FS=";";OFS=FS;printf "\n# Same as cisco-nx from /etc/rancid/rancid.types.base but\n# removing troublesome dir logflash command\n\n"};/dir logflash:$/{next};/^cisco-nx/{gsub(/cisco-nx/,"cisco-nx9k");print}' rancid.types.base >>rancid.types.conf

If you're not gawky :) I recommend you do it by hand instead of the way I did it. (Mad props to the maintainer of the FSF's GNU awk, Aharon Robbins!)

Once you've defined the new device type, in your router.db file you use the newly defined name instead of cisco-nx and you're all set.

--Charlie

________________________________________
From: Rancid-discuss [rancid-discuss-bounces@shrubbery.net] on behalf of Michael T. Voity [mvoity@uvm.edu]
Sent: Monday, June 25, 2018 10:10 AM
To: rancid-discuss@shrubbery.net
Subject: Re: [rancid] stopping command from being run

Hello,

Anyone have an idea that they can point me in a direction?

Thanks,

-Mike


--
Michael T. Voity
Network Engineer
University of Vermont


From: Rancid-discuss <rancid-discuss-bounces@shrubbery.net> On Behalf Of Michael T. Voity
Sent: Friday, June 22, 2018 12:05 PM
To: rancid-discuss@shrubbery.net
Subject: [rancid] stopping command from being run

Hello,

We are running 3.7

I seem to be having difficulty in getting the command ?show dir /all? to stop be executed with my nexus switches.

I have edited the ?nxrancid? and the ?nxos.pm? without success.

Ideas?

-Mike

--
------------------ CONFIDENTIALITY NOTICE ---------------

This message, including any attachments, is for the sole use of the
intended recipient(s) and may contain privileged confidential information
protected by law. Any unauthorized review, use, disclosure or distribution
of this message is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of this message.

------------------ CONFIDENTIALITY NOTICE ---------------

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: stopping command from being run [ In reply to ]
Mon, Jun 25, 2018 at 02:10:56PM +0000, Michael T. Voity:
> Hello,
>
> Anyone have an idea that they can point me in a direction?
>
> Thanks,
>
> -Mike
>
>
> --
> Michael T. Voity
> Network Engineer
> University of Vermont
>
>
> From: Rancid-discuss <rancid-discuss-bounces@shrubbery.net> On Behalf Of Michael T. Voity
> Sent: Friday, June 22, 2018 12:05 PM
> To: rancid-discuss@shrubbery.net
> Subject: [rancid] stopping command from being run
>
> Hello, 
>  
> We are running 3.7
>  
> I seem to be having difficulty in getting the command “show dir /all” to stop be executed with my nexus switches.
>  
> I have edited the  ‘nxrancid’  and the ‘nxos.pm’  without success.
>  
> Ideas?
>

rancid.types.conf(5)

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: stopping command from being run [ In reply to ]
Charles and Heasley,

Thanks for pointing me in the right direction. I am all set now!

Thanks!

-Mike




--
Michael T. Voity
Network Engineer
The University of Vermont

-----Original Message-----
From: Charles T. Brooks <Charles.Brooks@hbcs.org>
Sent: Monday, June 25, 2018 10:46 AM
To: Michael T. Voity <mvoity@uvm.edu>; rancid-discuss@shrubbery.net
Subject: RE: stopping command from being run

Hi Mike. I am running 3.7 also, in my case on RHEL7 with git. I am very happy with it.

As I understand it, editing the perl modules to try to change commands issued to devices is a very wrong approach; it means you can't easily upgrade and your installation will be weird and difficult to get advice for online. so I strongly recommend you carefully revert any such changes you made.

The files rancid.types.base (base types, do not edit) and rancid.types.conf (site custom device types) determine what commands are run for specific devices.

So for example: on my Cisco Nexus 9Ks, I did not want to run the "show logflash" command, so I copied the "cisco-nx" device type from /etc/rancid/rancid.types.base to /etc/rancid/rancid.types.conf under the new device type name "cisco-nx9k" and removed the command I did not want.

This is how I did it, if you are OK with old-school unixisms...

cd /etc/rancid
gawk 'BEGIN{FS=";";OFS=FS;printf "\n# Same as cisco-nx from /etc/rancid/rancid.types.base but\n# removing troublesome dir logflash command\n\n"};/dir logflash:$/{next};/^cisco-nx/{gsub(/cisco-nx/,"cisco-nx9k");print}' rancid.types.base >>rancid.types.conf

If you're not gawky :) I recommend you do it by hand instead of the way I did it. (Mad props to the maintainer of the FSF's GNU awk, Aharon Robbins!)

Once you've defined the new device type, in your router.db file you use the newly defined name instead of cisco-nx and you're all set.

--Charlie

________________________________________
From: Rancid-discuss [rancid-discuss-bounces@shrubbery.net] on behalf of Michael T. Voity [mvoity@uvm.edu]
Sent: Monday, June 25, 2018 10:10 AM
To: rancid-discuss@shrubbery.net
Subject: Re: [rancid] stopping command from being run

Hello,

Anyone have an idea that they can point me in a direction?

Thanks,

-Mike


--
Michael T. Voity
Network Engineer
University of Vermont


From: Rancid-discuss <rancid-discuss-bounces@shrubbery.net> On Behalf Of Michael T. Voity
Sent: Friday, June 22, 2018 12:05 PM
To: rancid-discuss@shrubbery.net
Subject: [rancid] stopping command from being run

Hello,

We are running 3.7

I seem to be having difficulty in getting the command "show dir /all" to stop be executed with my nexus switches.

I have edited the 'nxrancid' and the 'nxos.pm' without success.

Ideas?

-Mike

--
------------------ CONFIDENTIALITY NOTICE ---------------

This message, including any attachments, is for the sole use of the intended recipient(s) and may contain privileged confidential information protected by law. Any unauthorized review, use, disclosure or distribution of this message is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of this message.

------------------ CONFIDENTIALITY NOTICE ---------------

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: stopping command from being run [ In reply to ]
Thank you very much for your insight. The 9ks have been bugging me for a
long time with the little of use flash log and now it's gone thanks to you.
But I added the cisco-nx9k to rancid.types.base and did not modify
rancid.types.conf and just changed the type in the db file and the miracle
happened!

-----Original Message-----
From: Rancid-discuss <rancid-discuss-bounces@shrubbery.net> On Behalf Of
Charles T. Brooks
Sent: Monday, June 25, 2018 5:46 PM
To: Michael T. Voity <mvoity@uvm.edu>; rancid-discuss@shrubbery.net
Subject: Re: [rancid] stopping command from being run

Hi Mike. I am running 3.7 also, in my case on RHEL7 with git. I am very
happy with it.

As I understand it, editing the perl modules to try to change commands
issued to devices is a very wrong approach; it means you can't easily
upgrade and your installation will be weird and difficult to get advice for
online. so I strongly recommend you carefully revert any such changes you
made.

The files rancid.types.base (base types, do not edit) and rancid.types.conf
(site custom device types) determine what commands are run for specific
devices.

So for example: on my Cisco Nexus 9Ks, I did not want to run the "show
logflash" command, so I copied the "cisco-nx" device type from
/etc/rancid/rancid.types.base to /etc/rancid/rancid.types.conf under the new
device type name "cisco-nx9k" and removed the command I did not want.

This is how I did it, if you are OK with old-school unixisms...

cd /etc/rancid
gawk 'BEGIN{FS=";";OFS=FS;printf "\n# Same as cisco-nx from
/etc/rancid/rancid.types.base but\n# removing troublesome dir logflash
command\n\n"};/dir
logflash:$/{next};/^cisco-nx/{gsub(/cisco-nx/,"cisco-nx9k");print}'
rancid.types.base >>rancid.types.conf

If you're not gawky :) I recommend you do it by hand instead of the way I
did it. (Mad props to the maintainer of the FSF's GNU awk, Aharon Robbins!)

Once you've defined the new device type, in your router.db file you use the
newly defined name instead of cisco-nx and you're all set.

--Charlie

________________________________________
From: Rancid-discuss [rancid-discuss-bounces@shrubbery.net] on behalf of
Michael T. Voity [mvoity@uvm.edu]
Sent: Monday, June 25, 2018 10:10 AM
To: rancid-discuss@shrubbery.net
Subject: Re: [rancid] stopping command from being run

Hello,

Anyone have an idea that they can point me in a direction?

Thanks,

-Mike


--
Michael T. Voity
Network Engineer
University of Vermont


From: Rancid-discuss <rancid-discuss-bounces@shrubbery.net> On Behalf Of
Michael T. Voity
Sent: Friday, June 22, 2018 12:05 PM
To: rancid-discuss@shrubbery.net
Subject: [rancid] stopping command from being run

Hello,

We are running 3.7

I seem to be having difficulty in getting the command "show dir /all" to
stop be executed with my nexus switches.

I have edited the 'nxrancid' and the 'nxos.pm' without success.

Ideas?

-Mike

--
------------------ CONFIDENTIALITY NOTICE ---------------

This message, including any attachments, is for the sole use of the
intended recipient(s) and may contain privileged confidential information
protected by law. Any unauthorized review, use, disclosure or distribution
of this message is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of this message.

------------------ CONFIDENTIALITY NOTICE ---------------

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: stopping command from being run [ In reply to ]
Wed, Jun 27, 2018 at 03:35:59PM +0300, Vacheslav:
> Thank you very much for your insight. The 9ks have been bugging me for a
> long time with the little of use flash log and now it's gone thanks to you.
> But I added the cisco-nx9k to rancid.types.base and did not modify
> rancid.types.conf and just changed the type in the db file and the miracle
> happened!

Charles suggested that you edit the .conf, because the next upgrade/install
will overwrite the .base but not the .conf.

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: stopping command from being run [ In reply to ]
Well I didn't figure out how to edit the .conf, so I'll just reedit IT on
upgrade :)

-----Original Message-----
From: heasley <heas@shrubbery.net>
Sent: Wednesday, June 27, 2018 5:33 PM
To: Vacheslav <m_zouhairy@skno.by>
Cc: 'Charles T. Brooks' <Charles.Brooks@hbcs.org>; 'Michael T. Voity'
<mvoity@uvm.edu>; rancid-discuss@shrubbery.net
Subject: Re: [rancid] stopping command from being run

Wed, Jun 27, 2018 at 03:35:59PM +0300, Vacheslav:
> Thank you very much for your insight. The 9ks have been bugging me for
> a long time with the little of use flash log and now it's gone thanks to
you.
> But I added the cisco-nx9k to rancid.types.base and did not modify
> rancid.types.conf and just changed the type in the db file and the
> miracle happened!

Charles suggested that you edit the .conf, because the next upgrade/install
will overwrite the .base but not the .conf.


_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: stopping command from being run [ In reply to ]
Thu, Jun 28, 2018 at 08:48:07AM +0300, Vacheslav:
> Well I didn't figure out how to edit the .conf, so I'll just reedit IT on
> upgrade :)

vi? emacs? ed? sed?

its the same format as .base and in the same directory.

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss