Skip to content

junos_install_os fails to execute on a SRX320 #227

@epydd

Description

@epydd

When trying to upgrade a SRX320, an exception is raised:

An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
  File "/tmp/ansible_tZXJlA/ansible_module_junos_install_os.py", line 307, in <module>
    main()
  File "/tmp/ansible_tZXJlA/ansible_module_junos_install_os.py", line 292, in main
    results = junos_install_os(module, dev)
  File "/tmp/ansible_tZXJlA/ansible_module_junos_install_os.py", line 221, in junos_install_os
    ok = sw.install(package, **sw_args)
  File "/usr/lib/python2.7/site-packages/jnpr/junos/utils/sw.py", line 684, in install
    **kwargs)
  File "/usr/lib/python2.7/site-packages/jnpr/junos/utils/sw.py", line 181, in pkgadd
    return self._parse_pkgadd_response(rsp)
  File "/usr/lib/python2.7/site-packages/jnpr/junos/utils/sw.py", line 219, in _parse_pkgadd_response
    rc = int(got.findtext('package-result').strip())
AttributeError: 'NoneType' object has no attribute 'strip'

Heres the playbook:

- name: Generating configuration Files
  hosts: "E0"
  gather_facts: no
  connection: local
  roles:
    - Juniper.junos
  tasks:

    - name: Checking Conectivity
      wait_for:
        host: "{{ inventory_hostname }}"
        port: 830
        timeout: 5
    
    - name: "UPGRADE - Install Junos OS package"
      junos_install_os:
        logfile: "{{ inventory_hostname }}.log"
        host: "{{ inventory_hostname }}"
        version: "15.1X49-D75.5"
        package: "/var/ftp/junos-srxsme-15.1X49-D75.5-domestic.tgz"
        no_copy: true
        reboot: true
        reboot_pause: 0

Current version on SRX320:

root@E0> show version
Hostname: E0
Model: srx320
Junos: 15.1X49-D80.4
JUNOS Software Release [15.1X49-D80.4]

Package name:
junos-srxsme-15.1X49-D75.5-domestic.tgz

Im using:
junos-eznc (2.1.2.dev1)
Juniper.junos, 1.4.0

A previous error junos_get_facts prevented this opretaion to conclude on SRX320, but unfortunatly it does not seem to be the only problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions