os-net-config should validate and report NIC mappings

Bug #1713137 reported by Dan Sneddon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-net-config
Fix Released
Medium
Dan Sneddon
tripleo-validations
New
Undecided
Dan Sneddon

Bug Description

os-net-config reports NIC mapping, but only if you run in debug mode. Furthermore, the mapping output is not easily parsed for use in scripts. This is causing serious issues when troubleshooting or writing validations.

os-net-config should contain an option for returning the exact mapping, and it should return an easily consumable JSON or dict. For example, -i or --interfaces could return a mapping of the numeric NICs to real NIC name. This will make it possible to determine whether a mapping file is working correctly, or whether the desired mapped NICs are down (in which case they will not be mapped correctly).

Dan Sneddon (dsneddon)
Changed in os-net-config:
assignee: nobody → Dan Sneddon (dsneddon)
importance: Undecided → Medium
status: New → In Progress
Changed in tripleo-validations:
assignee: nobody → Dan Sneddon (dsneddon)
Dan Sneddon (dsneddon)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-net-config (master)

Reviewed: https://review.openstack.org/383516
Committed: https://git.openstack.org/cgit/openstack/os-net-config/commit/?id=ebc1c1bc8047a3fad3f9195807b62c7d38f5768a
Submitter: Jenkins
Branch: master

commit ebc1c1bc8047a3fad3f9195807b62c7d38f5768a
Author: Dan Sneddon <email address hidden>
Date: Thu Oct 6 17:54:45 2016 -0700

    Add NIC Mapping Reporting Feature

    The -i or --interfaces flag will print out a dict of the NIC
    mappings if no interfaces are specified, or it will print a
    list of the real interface names that match the interfaces
    given. If a real interface name is given, it will be returned
    in the list without translation only if it is live.

    It has always been technically possible to map an interface
    using an alias that matches an inactive real interface. This
    change preserves that functionality, but will prevent mapping
    using the name of an active interface. A warning will be
    printed if an alias matches an inactive inteface.

    Also change _is_active_nic and _mapped_nics to public functions
    since they are called outside of utils.

    Change-Id: I74af5391165e10f04800ea05e4204a7d1f74f526
    Closes-bug: 1713137

Changed in os-net-config:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-net-config 8.0.0

This issue was fixed in the openstack/os-net-config 8.0.0 release.

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.