os-net-config should validate and report NIC mappings
Bug #1713137 reported by
Dan Sneddon
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).
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) |
description: | updated |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/383516 /git.openstack. org/cgit/ openstack/ os-net- config/ commit/ ?id=ebc1c1bc804 7a3fad3f9195807 b62c7d38f5768a
Committed: https:/
Submitter: Jenkins
Branch: master
commit ebc1c1bc8047a3f ad3f9195807b62c 7d38f5768a
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: I74af5391165e10 f04800ea05e4204 a7d1f74f526
Closes-bug: 1713137