cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1972
Views
1
Helpful
7
Replies

NSO how to manage/configure files on cisco-iosxr devices

victorwsg@gmail.com
Cisco Employee
Cisco Employee

Hey guys,

I am working on embedded event manager policy configuration on cisco-iosxr devices via NSO:

1. scp a NSO hosted local file in Tcl to target iosxr devices, and this Tcl file may be changed for particular devices for certain configuration changes.

2. register the Tcl script file as a EEM policy as long as the its updates.

Currently I got issue with CLI cmd of scp-to:

ncsadmin@ncs#  devices device SJC02-WXLB-PE01 scp-to local-file /root/tt.log remote-file disk0a:/tt.log

Error: SJC02-WXLB-PE01: Remote SCP exit status: 255

Anyone help me on it!

meanwhile, base on above the 2nd requirement, any suggestion on this model? should we use service or just action to register the Tcl script.

Thanks in advance.

7 Replies 7

Akira Iwamoto
Cisco Employee
Cisco Employee

Check devel.log for the details to see what is failing.

It has the detailed progress status of scp.

Command & response:

ncsadmin@ncs# devices device SJC02-WXLB-PE01 scp-to local-file /root/tt.log remote-file disk0a:/tt.log

Error: SJC02-WXLB-PE01: Remote SCP exit status: 255

==> audit.log <==

<INFO> 8-May-2018::05:56:30.077 nso-master ncs[22268]: audit user: ncsadmin/35 CLI 'devices device SJC02-WXLB-PE01 scp-to local-file /root/tt.log remote-file disk0a:/tt.log'

==> devel.log <==

<INFO> 8-May-2018::05:56:30.081 nso-master ncs[22268]: ncs scp: device SJC02-WXLB-PE01: Connecting to 10.100.60.170 port 22

<INFO> 8-May-2018::05:56:30.548 nso-master ncs[22268]: ncs scp: device SJC02-WXLB-PE01: Connection established

<INFO> 8-May-2018::05:56:30.548 nso-master ncs[22268]: ncs scp: device SJC02-WXLB-PE01: Sending command: scp -tp disk0a:

<INFO> 8-May-2018::05:56:30.680 nso-master ncs[22268]: ncs scp: device SJC02-WXLB-PE01: Sending file timestamps: 1525697067 0 1525697070 0

<INFO> 8-May-2018::05:56:30.682 nso-master ncs[22268]: ncs scp: device SJC02-WXLB-PE01: Sending file modes: 0600 4 tt.log

<INFO> 8-May-2018::05:56:30.683 nso-master ncs[22268]: ncs scp: device SJC02-WXLB-PE01: Sending file: tt.log

==> audit.log <==

<INFO> 8-May-2018::05:56:30.775 nso-master ncs[22268]: audit user: ncsadmin/35 CLI aborted

Not sure why CLI was aborted.

Figured out the cause.

What's your NSO version? Try on NSO 4.5.2 / 4.6 without preserve option.

NSO 4.5.2 / NSO 4.6 has below fix.

----

  - ncs: As some devices does not support the 'scp -p' flag this is now made

    optional in the scp-to/scp-from actions. The added preserve parameter

    preserves modification times, access times, and modes from the original

    file.

----

I can see the same error with XRv when preserve option is given on NSO 4.5.2.

Thank you Akira.

We are heavy on NSO 4.3.1, and are planning to estimate the upgrade, but maybe a lot work for the upgrade.


Currently we have a urgent task to manage the EEM scripts, could we have a hot fix or workaround to remove this preserve option?


Thank you again.

Hi,

NSO 4.3.7 has that fix, so upgrading to the latest 4.3.x (which is 4.3.8 now) is the best, I would think.

I'm not from development team, and you need to raise a TAC case to ask if you really need a special patch for it.

(Personally I don't think patches will be released to 4.3.1 though as you have fixed version already)

Thanks,

Akira

Sorry, I am not familiar with TAC, could you help raise a TAC case or share me how to raise it?

By the way, any guide and potential issue for the 2 type of upgrades from 4.3.1 to 4.3.8 and 4.6?

Hi,

As talked on chat, try with tac@cisco.com.

I can't give the detailed diff between 4.3.1/4.3.8 and 4.3.1/4.6. Refer CHANGES file to see what is changed from 4.3.1.

Regards,

Akira