Skip to content

junos.device.software not parsing version from filename correctly for EX2300 #694

@Yannik

Description

@Yannik

Issue Type

  • Bug Report

Module Name

junos.device.software

juniper.device collection and Python libraries version

juniper.device 1.0.6

ansible [core 2.16.11]
  python version = 3.12.6 (main, Sep  9 2024, 00:00:00) [GCC 13.3.1 20240522 (Red Hat 13.3.1-1)] (/usr/bin/python3)
  jinja version = 3.1.4
  libyaml = True

OS / Environment

Junos 23.4

Summary

junos.device.software expects the filename to start with one of these prefixes to actually parse the version string:

    JUNOS_PACKAGE_PREFIXES = ['jbundle', 'jinstall', 'junos-install',
                              'junos-srx', 'junos-vmhost-install', 'junos-vrr',
                              'vmx-bundle']

However, the EX2300 recommended release 23.4 package file is named junos-arm-32-23.4R2.13.tgz. Therefore the version is not extracted, causing firmware to be installed when it is already the current version.

Steps to reproduce

Download firmware for these switches from: https://support.juniper.net/support/downloads/?p=ex2300

and try to update to this firmware on a switch that already has the relevant firmware installed. (without explicitly specifying version parameter)

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