Skip to content

Conversation

@sjtiantang
Copy link
Contributor

proposed bug fix for issue: #1368

proposed bug fix for issue: Juniper#1368
@chidanandpujar
Copy link
Collaborator

Fix works fine

root@masterhost:~# cat sw_install.py 
from jnpr.junos import Device
from xml.etree import ElementTree as etree
from pprint import pprint
from jnpr.junos.utils.sw import SW
#import logging
#logging.basicConfig( level=logging.DEBUG)
 
dev = Device(host='xyz', user='xyz', password='xyz', gather_facts=False, port=22, huge_tree=True)
dev.open()
 
def myprogress(dev, report):
        print("host: {}, report: {}".format( dev.hostname, report))
pkg = "xyz.tgz"
sw = SW(dev)
ok, msg = sw.install(package=pkg,
                     validate=False,
                     remote_path='/var/tmp',
                     progress=myprogress,
                     no_copy=True,
                     force_host=False,
                     reboot=False,
                     issu=False,
                     nssu = False,
                     cleanfs=False,
                     vmhost=False,
                     force_copy=False,
                     timeout=8000)
if ok:
   #sw.reboot()
   print("Pass")

<partial logs attached for referrence>

root@masterhost:~# vi sw_install.py 
root@masterhost:~# python3 sw_install.py 
host: systest-ex43mp-p1c-02, report: request-package-checks-pending-install rpc is not supported on given device
host: systest-ex43mp-p1c-02, report: validating software against current config, please be patient ...
host: systest-ex43mp-p1c-02, report: installing software on VC member: 1 ... please be patient ...
host: systest-ex43mp-p1c-02, report: software pkgadd package-result: 0
Output: 

[Mar 28 02:51:10]: Checking pending install on fpc1

Host OS upgrade staged. Reboot the system to complete installation!

Install completed
host: systest-ex43mp-p1c-02, report: installing software on VC member: 2 ... please be patient ...
host: systest-ex43mp-p1c-02, report: software pkgadd package-result: 0
Output: 

[Mar 28 03:00:49]: Checking pending install on fpc2


Host OS upgrade staged. Reboot the system to complete installation!

Install completed
host: systest-ex43mp-p1c-02, report: installing software on VC member: 0 ... please be patient ...
host: systest-ex43mp-p1c-02, report: software pkgadd package-result: 0

Host OS upgrade staged. Reboot the system to complete installation!

Install completed

Pass

@chidanandpujar chidanandpujar merged commit 133abda into Juniper:master Mar 28, 2025
7 checks passed
@chidanandpujar chidanandpujar added this to the 2.7.4 milestone Apr 9, 2025
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

Successfully merging this pull request may close these issues.

2 participants