napalm-automation / napalm-nxos

Apache License 2.0
9 stars 21 forks source link

_delete_file hangs and fail to delete file #88

Closed targuan closed 7 years ago

targuan commented 7 years ago

Description of Issue/Question

All call to _delete_file may hang due to the switch asking for a confirmation. The error returned by the switch is discarded but the file is not deleted.

Did you follow the steps from https://github.com/napalm-automation/napalm#faq

[X] Yes [ ] No

Setup

napalm-nxos version

(Paste verbatim output from pip freeze | grep napalm-nxos between quotes below)

napalm-nxos==0.5.2

NX-OS version

(Paste verbatim output from show version | json between quotes below)

  "kickstart_ver_str": "7.0(3)I5(2)",

Steps to Reproduce the Issue

When discard_config is called, the deletion of the file may hang due to NXOS prompting for a confirmation (even via NXAPI)

Error Traceback

(Paste the complete traceback of the exception between quotes below) No traceback, but the following output is returned by the switch

[{u'command': u'delete hostname.conf', u'jsonrpc': u'2.0', u'id': 1, u'error': {u'message': u'Request timeout', u'code': -32009, u'data': {u'msg': u'\nDo you want to delete "/hostname.conf" ? (yes/no/abort)   [y] \n'}}}]