Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

poap.py script execution fails during POAP without any detail #31

Open
jean-christophe-manciot opened this issue Jul 19, 2017 · 2 comments

Comments

@jean-christophe-manciot

last poap.py version Jun 9 11:21
Target node: NX-OSv 9k 7.0.3.I6.1

Following the official guidelines, I made the following modifications to the script:

options = {
   "username": "tftp",
   "password": "tftp",
   "hostname": "172.21.0.1",
   "transfer_protocol": "tftp",
   "mode": "raw",
   "config_path": "NX-OSv-9k/7.0.3.16.1"
   "target_image_path": "NX-OSv-9k/7.0.3.16.1"
   "target_system_image": "nxos.7.0.3.I6.1.bin",
   "user_app_path": "NX-OSv-9k/7.0.3.16.1"
   "source_config_file": "poap.cfg"
}

To make sure they are not dismissed, I also performed the following modifications:
modifications to original poap py

I also recomputed the checksum.
During the POAP phase, the NX-OSv 9k is able to get all its DHCP parameters, downloads the poap.py and says that an error occurred during execution without further explanation.
Some details would be very helpful.

@jean-christophe-manciot jean-christophe-manciot changed the title poap.py script fails with no details poap.py script execution fails during POAP without any detail Jul 19, 2017
@justme-justus
Copy link

TFTP is broken with the current version. TFTP does not need username and password. But the script will attempt to download the files via "copy tftp://username:password@server/file local_file". I tested that constellation in lab today. Will post a fix.

@justme-justus
Copy link

justme-justus commented Jul 3, 2018

*** poap_original.py	2018-07-03 15:32:41.240670676 +0200
--- poap_nexus_script.py	2018-07-03 16:08:31.395067399 +0200
***************
*** 834,841 ****
          else:
              # Add the destination path
              copy_cmd = "terminal dont-ask ; terminal password %s ; " % password
!             copy_cmd += "copy %s://%s@%s%s %s vrf %s" % (
!                 protocol, user, host, source, copy_tmp, vrf)
              poap_log("Command is : %s" % copy_cmd)
              try:
                  cli(copy_cmd)
--- 837,856 ----
          else:
              # Add the destination path
              copy_cmd = "terminal dont-ask ; terminal password %s ; " % password
!             # 07/03/2018: fix for TFTP by bestjejust@github:
!             # do not post credentials if using TFTP
!             # global set
!             # "target_image_path": "/",
!             # "config_path": "/",
!             # "user_app_path": "/",
!             # if your files are in root directory
! 
!             if options["transfer_protocol"] == "tftp":
!                copy_cmd += "copy %s://%s%s %s vrf %s" % (
!                    protocol, host, source, copy_tmp, vrf)
!             else:
!                copy_cmd += "copy %s://%s@%s%s %s vrf %s" % (
!                    protocol, user, host, source, copy_tmp, vrf)
              poap_log("Command is : %s" % copy_cmd)
              try:
                  cli(copy_cmd)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants