19 Commits

Author SHA1 Message Date
Bob Fournier
6e3f28d720 Bring up VLAN interfaces and include in introspection report
Add the ability to bring up VLAN interfaces and include them in the
introspection report.  A new configuration field is added -
``ipa-enable-vlan-interfaces``, which defines either the VLAN interface
to enable, the interface to use, or 'all' - which indicates all
interfaces.  If the particular VLAN is not provided, IPA will
use the lldp info for the interface to determine which VLANs should
be enabled.

Change-Id: Icb4f66a02b298b4d165ebb58134cd31029e535cc
Story: 2008298
Task: 41183
2020-11-20 10:17:00 -05:00
Brad P. Crochet
7b3469ee0f Get the hostname of the introspected host
This will retrieve the hostname of the host being introspected, and
return it as part of the introspection data.

Change-Id: I54084251e1b0f3a40fe5ac760b2a7e45199c9fdb
Story: #2005867
Task: #33674
2019-06-12 13:00:21 +00:00
zhengyong
561be77303 Collect IPv6 address during introspection
This patch adds support to retrieve IPv6 address.

A new field ``ipv6_address`` is added to NetworkInterface
and store the assigned IPv6 address (if any).

Co-Authored-By: Kaifeng Wang <kaifeng.w@gmail.com>
Change-Id: Ia527a5aa48e3daf66d2be190e43935b38b3bd6f9
Closes-Bug: #1744064
Story: #1744064
Task: #11604
2018-07-24 09:22:40 +08:00
Moshe Levi
7631902ec7 mlnx hardware_manager: get mac address using netifaces
Change-Id: I62e4ca6afb0f8a256ddf9bbc48225fbb96f9e817
2018-03-11 12:50:08 +02:00
Sam Betts
b536fbba61 [LLDP] Skip NICs that say they are ready but are unreadable.
While listening for LLDP packets, if one of the sockets marks itself as
ready to read then our code will try to read data from that socket, but
if something goes wrong while reading that data then it causes IPA to
raise out of the loop skipping any other of the other NICs which might
have worked. This patch adds code to catch and LOG any exception that is
raised while we are trying to read data from one of the sockets so that
we can proceed to process all the NICs.

Change-Id: I8546097f5ae23755a5fdb448902007a2d823b7bf
Closes-Bug: #1665025
2017-11-28 17:25:43 +00:00
Derek Higgins
b4e41e2dd2 Agent: Listen for connections on both IPv4 and IPv6 ports
Allow connections if deploying over a IPv6 network.

Change-Id: Ied2f6be4aa4d1a70524df1df3506e596f6926e5b
Closes-Bug: #1650539
2017-01-19 15:24:11 +00:00
Derek Higgins
9f5f664080 Advertise the correct address when using IPv6
Parse the output of "ip route get $IP" taking
IPv6 into consideration. Also wrap the IP address
in square brackets if it is IPv6.

Change-Id: Ifc44e5aa3c5b814b6ceba04461bb68fe1d75c22b
Closes-Bug: #1650533
2017-01-11 11:00:56 +00:00
Moshe Levi
1bdcd4449f Add a new Hardware Manager for Mellanox NICs
This patch add Mellanox Manager to support Mellanox
InfiniBand NICs.

It adds client_id to the NetworkInterface for the
InfiniBand network interface.

The Mellanox Manager provides it own implementation of
get_interface_info. The mlnx get_interface_info generate
InfiniBand MAC and client-id from the InfiniBand network
interface address.

Closes-Bug: #1532534

Change-Id: I4e7f7649a1bdeaa3ee99b2748037b0f37fea486c
2016-11-22 15:46:12 +01:00
Moshe Levi
966db1c18c Dispatched out network interface info to all hardware managers
This patch dispatches out the network_interface_info
to allow vendor hardware managers to plug the spacific
implementation. It also move neworking releated methods
form hardware to netutils
Related-Bug: #1532534

Change-Id: Idcd25c4753c009b5ba70bea97ee4eb83391a77a9
2016-11-17 13:08:03 +02:00
Dmitry Tantsur
b864a8c566 Fix several errors in LLDP handling code
* Stop silencing exceptions in raw socket context manager
* Correctly handle receiving packages with odd size and too small ones
* Fix a unit test that was testing nothing due to bad mocking

Change-Id: Ic8626d10618f52d50667d2698f34a92f5dcac33e
Closes-Bug: #1640238
2016-11-09 15:02:54 +01:00
Robert Li
9e4b769055 Build socket list right before select call
This will make sure the socket list and the interface list are
always in sync, and the select call is on the right list of
sockets.

Co-Authored-By: Dmitry Tantsur <dtantsur@redhat.com>
Closes-Bug: #1533892
Change-Id: Id6710f4648203b7d476a2a16ea647224baca1bb9
2016-08-17 16:35:07 +02:00
Sam Betts
95e1e4e35a Consolidate IPA configuration into a config module
This patch moves the IPA oslo configs out of the agent cmd into their
own module so that it is safe to import them from other places in the
application without causing circular imports.

Change-Id: I100792bd0d1f369763afaa6f93e144e9967c3048
2016-05-31 15:24:23 +01:00
ZhiQiang Fan
9e75ba5460 Use oslo.log instead of original logging
We are using oslo.log now, but some of the modules still use logging.
We should use oslo.log to keep consistency, besides, oslo.log can
provide fine wrapper for OpenStack projects.

Change-Id: Ibe57e503b88b39e284a9e4b11a1886cd4e8d4ccf
2015-10-24 03:22:36 -06:00
Lucas Alvares Gomes
06eed473fb Add Python3 support
This patch add Python 3 support for IPA. We still need to enable it on
gate to avoid code breaking the support from sneaking in.

Partial-Bug: #1474896
Depends-On: I5a774eaa8d978f4d50faca4dc1b03a87fb194ce2
Change-Id: If47c0797b63d2914b3c47aba62ec5201301b6c33
2015-07-15 17:12:08 +01:00
Lucas Alvares Gomes
c6cd3a8190 Move _get_agent_params() to a common place
The function _get_agent_params() parse the parameters passed to the agent
via kernel cmdline or vmedia. Other parts of the code needs to access
these parameters as well, so this patch is moving _get_agent_params()
and the related functions to a common place (utils.py).

Change-Id: I860f84d1d13511fff56d4aa56358ee597a9760d5
2015-03-10 17:43:17 +00:00
Josh Gachnang
65fe55a81f Fix incorrect IPA log message
Change-Id: I520250287ae64495604e575b13a11481d03b79b2
2015-03-03 12:54:35 -08:00
jiangfei
7d1cc976cd use oslo_config replace oslo.config
oslo.conifg 1.6.0 has moved its namespace from old
oslo.config to oslo_config

requirements has updated to oslo.conifg 1.6.0

Change-Id: I16b8dc680f8a7697b7fbbd888f5162d924b4c0fe
2015-02-07 14:09:44 +08:00
Josh Gachnang
88c2bca93c Fix missing string format symbol
Change-Id: I94ec7299a5c918b3569e1e6f64a9bfa0c70d28d4
2014-12-15 16:40:35 -08:00
Jim Rollenhagen
15aaa03833 Use LLDP to get switch port mapping
Provides a function to listen for LLDP packets on the network.
Listens on one or all of the network interfaces, and then parses the found
packets.

Change-Id: I1545a41f46cd0916aab9c43ce036865454fa66e0
Co-Authored-By: Josh Gachnang <josh@pcsforeducation.com>
2014-12-09 11:59:00 -08:00