DM: product model fetch fails for 16.1 junos

Bug #1694826 reported by amit surana
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R4.0
Fix Committed
Critical
Suresh Balineni
Trunk
Fix Committed
Critical
Suresh Balineni

Bug Description

DM reads the following form the physical router:

                pname = res.xpath('//software-information/product-name')[0].text
                pmodel = res.xpath('//software-information/product-model')[0].text
                ele = res.xpath("//software-information/package-information"
                                "[name='junos-version']")[0]

The junos-version fetch is failing for 16.1.

In 14.1:

<rpc-reply xmlns:junos="http://xml.juniper.net/junos/14.2R6/junos">
    <software-information>
        <host-name>h1droid</host-name>
        <product-model>mx480</product-model>
        <product-name>mx480</product-name>
        <package-information>
            <name>junos-version</name>
            <comment>Junos: 14.2R6.5</comment>

In 16.1:

<rpc-reply xmlns:junos="http://xml.juniper.net/junos/16.1R1/junos">
    <software-information>
        <host-name>OVSMX104</host-name>
        <product-model>mx104</product-model>
        <product-name>mx104</product-name>
        <junos-version>16.1R1.4</junos-version>

DM should handle both cases.

Also, fail gracefully and handle the exception if model/name/junos fetch fails (instead of crashing trying to access these attributes).

Revision history for this message
kratna (kratna) wrote :

This issue was found in VISA-POC test bed

Contrail-build 4.0.0.0.12

OpenStack Newton

Ubuntu 16.0.4.2

Jeba Paulaiyan (jebap)
tags: added: blocker
tags: added: config
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.0

Review in progress for https://review.opencontrail.org/32342
Submitter: Suresh Balineni (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/32342
Committed: http://github.com/Juniper/contrail-controller/commit/b0b795171789210a062afbdf28b4f17bb3e658f1
Submitter: Zuul (<email address hidden>)
Branch: R4.0

commit b0b795171789210a062afbdf28b4f17bb3e658f1
Author: sbalineni <email address hidden>
Date: Wed May 31 22:28:27 2017 -0700

[DM]: Fix for gracefully handling device fetch of version info

Mx returned software information format is changed from 14.1 to 16.1,
this fix handles both cases.

In 14.1:

<rpc-reply xmlns:junos="http://xml.juniper.net/junos/14.2R6/junos">
<software-information>
<host-name>h1droid</host-name>
<product-model>mx480</product-model>
<product-name>mx480</product-name>
<package-information>
<name>junos-version</name>
<comment>Junos: 14.2R6.5</comment>

In 16.1:

<rpc-reply xmlns:junos="http://xml.juniper.net/junos/16.1R1/junos">
<software-information>
<host-name>OVSMX104</host-name>
<product-model>mx104</product-model>
<product-name>mx104</product-name>
<junos-version>16.1R1.4</junos-version>

Closes-Bug: #1694826

Change-Id: I91bd9cfb2c1ca3a75560412a48994648a5a943e1

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/32641
Submitter: Suresh Balineni (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/32641
Committed: http://github.com/Juniper/contrail-controller/commit/ef702ac9d626397895f7c73e755d7a32cd25599e
Submitter: Zuul (<email address hidden>)
Branch: master

commit ef702ac9d626397895f7c73e755d7a32cd25599e
Author: sbalineni <email address hidden>
Date: Wed Jun 7 14:54:55 2017 -0700

[DM]: Backporting 4.0 fixes to master

- Post 4.0, DM code got re-factored, plugin model introduced.
- Manual patching was required for following fixes.

Change-Id: I6447e53c3ae824a93d227396d075ab6c75c4ac49
Closes-Bug: #1689743
Closes-Bug: #1689738
Closes-Bug: #1688752
Closes-Bug: #1691539
Closes-Bug: #1694826

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.