f7e080c8bfeae354b4ca17e41663f8b84c4e7e1a
Commit Graph

1087 Commits

This Branch
This Branch
All Branches
Author SHA1 Message Date
Szymon Borkowski
f7e080c8bf Add PCI devices collector to inspector
Adds a new collector, which gathers list of PCI devices.
Each entry is a dictionary containing 2 keys:
- vendor-id
- product-id
Such information can then be used by the inspector to distinguish
appropriate PCI devices.
Change-Id: Id7521d66410e7d408d7eada692b6123e769ce084
Partial-Bug: #1580893 
2016年06月24日 14:50:58 +02:00
Jenkins
0c5a1cfd56 Merge "Replace assertRaisesRegexp with assertRaisesRegex" 2016年06月23日 11:25:08 +00:00
Jenkins
7231485d85 Merge "Support LLDP data as part of interfaces in inventory" 2016年06月22日 19:10:48 +00:00
Sam Betts
a7f0af722f Support LLDP data as part of interfaces in inventory
To support multi-tenant networking in Ironic we need to be able to
discover not just the NICs a baremetal machine has but also the physical
connectivity to switches in the network.
This patch collects LLDP (Link Layer Discovery Protocol) data as part of
the list interfaces stage of the generic hardware manager. This
information can then be processed by the ironic inspector to populate
the local link information on each ironic port.
The processing done on this data in ironic python agent is limited, this
is to allow for server side processing hooks to process as much or as
little of the data as they want. This is to allow for multi-vendor
environments that might use different parts of the LLDP packet to use a
generic ramdisk and configure the processing server side using inspector
plugins.
Reserved fields switch_port_descr and switch_chassis_descr have been
deprecated for removal in Ocata in favor of passing the whole packet.
Change-Id: Idae9b1ede1797029da1bd521501b121957ca1f1a
Partial-Bug: #1526403 
2016年06月22日 18:26:04 +01:00
Jenkins
9c7c5b55ad Merge "tox: Update flake8 to ignore tinyipa imagebuild folders" 2016年06月22日 15:43:56 +00:00
Moshe Levi
992b875dc8 tox: Update flake8 to ignore tinyipa imagebuild folders
This prevents the pep8 to check python files that are
in the tinyipa tinyipabuild and tinyipafinal folders
Change-Id: Ieea899d618d5225403ceafae60359d5cb4d9c6c5
2016年06月22日 15:31:13 +00:00
Lucas Alvares Gomes
45e10805d8 Fix functional tests
The functional tests in IPA were broken because the configuration
options weren't loaded prior to starting the service. This patch does
now register the configuration option at the base class.
Closes-Bug: #1595145
Change-Id: Iaaa16fddd093075e7f995fb82ad3abb64e8e5794
2016年06月22日 12:24:23 +01:00
Jenkins
99a053f654 Merge "Add configuration options for DISK_WAIT" 2016年06月22日 02:29:46 +00:00
Moshe Levi
1ef8c32de0 Replace assertRaisesRegexp with assertRaisesRegex
This patch replace assertRaisesRegexp with
assertRaisesRegex which is deprecated in python3
https://docs.python.org/3.2/library/unittest.html
Also it update the base tests to be oslotest
BaseTestCase for python2.7 and python3 compatibility
Change-Id: I02571946f0643247e208d98dc91ea78cd9d351ee
2016年06月22日 00:47:37 +00:00
OpenStack Proposal Bot
e0e83347bd Updated from global requirements
Change-Id: Ibdebe6111177ebea20777dec175d65b13a3b3d7c
2016年06月21日 17:59:52 +00:00
Yosef Hoffman
13a8c6321e Add configuration options for DISK_WAIT
https://review.openstack.org/#/c/320295/ introduced two internal
variables: _DISK_WAIT_ATTEMPTS and _DISK_WAIT_DELAY. These values are
hardcoded. This patch adds configuration options for these so
that an operator can change them based on their own needs/fleet of
hardware.
Change-Id: I2ba97669ec710fb4a435307466cd8add9c2293ba
Closes-Bug: #1585663 
2016年06月20日 18:47:26 -04:00
Jenkins
d63820af12 Merge "Removes the use of mutables as default args" 1.3.0 2016年06月20日 17:25:29 +00:00
Edan David
438c69af7c Removes the use of mutables as default args
Passing mutable objects as default args is a known Python pitfall.
We'd better avoid this. This commit changes mutable default args with
None, 'arg = [] if arg is None else arg'.
TrivialFix
Change-Id: I384b24e81543999a8b873e3223cd409ed799ffa0
2016年06月20日 02:08:12 -04:00
Jenkins
f9536f6b2b Merge "Use assertIn and assertNotIn" 2016年06月19日 16:29:46 +00:00
Edan David
1e8652a8d0 Use assertIn and assertNotIn
Tests should use:
 self.assertIn(value, list)
 self.assertNotIn(value, list)
instead of:
 self.assertTrue(value in list)
 self.assertFalse(value in list)
because assertIn and assertNotIn raise more meaningful errors:
 self.assertIn(3, [1, 2]
 >>> MismatchError: 3 not in [1, 2]
 self.assertTrue(3 in [1, 2])
 >>> AssertionError: False is not true
Change-Id: I2d1c78fe71fe03e350b1035123b0a48b7186a6ec
Closes-Bug: #1510007 
2016年06月17日 12:01:43 -04:00
Brad Morgan
da0a8aff88 Fix unwanted unmounting of /usr/share/oem
Creating specific partitions will cause a udev event to trigger,
causing systemd to attempt to mount the new partition at /usr/share/oem.
This mount will not succeed, but will unmount /usr/share/oem,
causing ironic-python-agent to die.
Masking this unit disables this behavior.
Change-Id: Ifea3482f36a354cbf988e6f6003f4284c5c2a21d
Closes-bug: #1592163 
2016年06月16日 14:11:40 -07:00
Jenkins
d7eccc43df Merge "Wait for at least one interface before node lookup" 2016年06月14日 17:47:53 +00:00
Edan David
fda09be319 Remove unused parameter
unit.test_api have an unused parameter in _make_app.
Change-Id: I1e313803e43a0e69c547695333116cc0432043da
2016年06月14日 10:21:26 -04:00
vmud213
09db71d640 Wait for at least one interface before node lookup
During node look up sometimes IPA sends hardware inventory information before
the interfaces are up, resulting in empty interfaces information being sent
to the conductor. This causes conductor to throw exceptions and polluting
the log until the real interfaces information is populated. This change makes
IPA to wait for at least one interface to be up before trying for node lookup.
Change-Id: Ifdb91298eaa5c725f108fa722263ed925691ecda
Closes-Bug: #1562786 
2016年06月14日 12:36:52 +00:00
Jenkins
7ab10cec27 Merge "tinyipa: Fix git clone tags when 1.6.5 <= git < 1.7.10" 2016年06月13日 22:16:58 +00:00
Moshe Levi
8d88809c00 tinyipa: Fix git clone tags when 1.6.5 <= git < 1.7.10
Add additional "git checkout" to tag to make sure
we are on the currect tag. This will
allow to support OSes with git >= v1.6.5 e.g. CentOS 6.7
Closes-bug: #1590912
Change-Id: I87a87e1148a0590fa7e378296ce00e0a28666227
2016年06月13日 16:33:56 +03:00
Jenkins
cd688f9bcd Merge "Add basic troubleshooting doc" 2016年06月10日 19:56:33 +00:00
Chris Krelle
91c25d9616 Add basic troubleshooting doc
A troubleshooting doc for IPA.
Change-Id: I0bc71e8c0a1a4e99d6edd12f1c8654299cc1f4f4
2016年06月10日 12:25:43 -07:00
Jenkins
9965b449d6 Merge "Updated from global requirements" 2016年06月08日 01:46:42 +00:00
Jenkins
927ee98eed Merge "lldp-timeout kernel parameter missing ipa- prefix" 2016年06月06日 06:19:46 +00:00
OpenStack Proposal Bot
7f242975f4 Updated from global requirements
Change-Id: I1e4348a74f91058768f1f042e2d341a12302f488
2016年06月03日 18:13:23 +00:00
Yosef Hoffman
90c15e10cb lldp-timeout kernel parameter missing ipa- prefix
Every other Ironic python agent kernel parameter is prefixed with "ipa-".
This patch allows users to use the old "lldp-timeout" parameter or the new
"ipa-lldp-timeout" parameter. Warning message is logged if "lldp-timeout"
parameter is used.
(Also fixed typo while I'm at it.)
Change-Id: Icc05ead31506628e4926be6549916a19cad48db3
Closes-Bug: #1588325 
2016年06月03日 12:17:55 -04:00
Jenkins
031593614e Merge "Add boot information into the inventory" 2016年06月02日 19:11:35 +00:00
Jenkins
90ba6452ef Merge "Remove unused SUPPORTED_ROOT_DEVICE_HINTS" 2016年06月02日 09:04:16 +00:00
OpenStack Proposal Bot
cdc4d7c774 Updated from global requirements
Change-Id: I41cd79d5681422623b042cc8c1a3594c46c5315c
2016年06月01日 19:01:15 +00:00
Jenkins
928b10cbd3 Merge "Returns CPU flags in the CPU inventory" 2016年06月01日 18:21:21 +00:00
Dmitry Tantsur
6670da4ed1 Returns CPU flags in the CPU inventory
These flags will be processed in a new ironic-inspector plugin
to support setting capabilities like cpu_vt (virtualization enabled).
Change-Id: I5fe9310c316841eabdd2d5e2ef2ae30afa03d29a
Partial-Bug: #1571580 
2016年06月01日 16:12:32 +02:00
Jenkins
653a218041 Merge "Updated from global requirements" 2016年05月31日 23:52:02 +00: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
OpenStack Proposal Bot
061f32b1b4 Updated from global requirements
Change-Id: I195d938cd82d630ae1761ec75b463d4d8956b483
2016年05月31日 03:01:04 +00:00
Ruby Loo
cc0733c348 Remove unused SUPPORTED_ROOT_DEVICE_HINTS
utils.SUPPORTED_ROOT_DEVICE_HINTS is no longer being used so
delete it. (The method that used it was removed in
33535cd572).
Change-Id: Ibb675d4496d7814778f3bab9c161734013479116
2016年05月30日 21:50:14 -04:00
OpenStack Proposal Bot
01d49886ac Updated from global requirements
Change-Id: I5ef758226b5c5f5e61988bf49515ec94bc002522
2016年05月30日 17:45:07 +00:00
Jenkins
64e813ee67 Merge "Get root device hints from the node object" 2016年05月30日 13:03:34 +00:00
Dmitry Tantsur
53b187a4c3 Add boot information into the inventory
Adds a new BootInfo object with 2 fields:
* current_boot_mode - bios or uefi, detected from presence of /sys/firmware/efi
 as per the following answer: http://askubuntu.com/a/162896
 This field will be used for setting the boot_mode capability in ironic-inspector
* pxe_interface - PXE booting interface, if it can be detected.
 This fields is already used by ironic-inspector, added here for consistency.
Change-Id: Ib36b592ffaba3bfa055d65c9526607867d302584
Partial-Bug: #1571580 
2016年05月26日 17:05:11 +02:00
Lucas Alvares Gomes
33535cd572 Get root device hints from the node object
In order to support a more complex syntax for root device hints (e.g
operators: greater than, less than, in, etc...) we need to stop relying
on the kernel command line for passing the root device hints. This patch
changes this approach by getting the root device hints from a cached
node object that was set in the hardware module.
Two new functions: "cache_node" and "get_cached_node" were added to the
hardware module. The idea is to facilitate the access to a node object
representation from the hardware extension methods without changing
method signatures, which would break compatibility with out-of-tree
hardware managers.
Note that the new "get_cached_node" is just a guard function to
facilitate the tests for the code.
The function parse_root_device_hints() and its tests were removed since
it's not used/needed anymore.
Partial-Bug: #1561137
Change-Id: I830fe7da1a59b46e348213b6f451c2ee55f6008c
2016年05月26日 14:52:15 +01:00
Mathieu Mitchell
f412b931cb Remove links to github for OpenStack things
Github is not the official reference for OpenStack code repositories,
and as such should not be used in documentation.
Update links that are meant to be links to a project as a whole with
links to the project's documentation.
Update links directly to code to git.openstack.org.
This change follows Iee09b6b86628e46dc5e9436bd0f98a40c50244b7
Change-Id: I6c0ba75c1ba04916413847cce56441ff4670bd62
2016年05月26日 08:12:29 -04:00
Jenkins
be548fe5e0 Merge "Add a configurable sleep before IPA starts working" 2016年05月25日 21:34:44 +00:00
Jenkins
962ee1afb5 Merge "Wait for at least one suitable disk to appear on start up" 2016年05月25日 09:42:54 +00:00
Jenkins
ced9a754dd Merge "Use constraints for all the things" 2016年05月25日 02:17:48 +00:00
Dmitry Tantsur
c09753bb60 Add a configurable sleep before IPA starts working
Some kernel modules take substantial time to initialize. For example,
with mpt2sas RAID driver inspection and deployment randomly fail
due to IPA starting before the driver finishes initialization.
As much as I hate it, the only way to guarantee that the hardware is
truely initalized is to wait for it. Apparently all hardware in Linux
is treated as hotplugged, so there is no such thing as "hardware
initialization is finished". Operators can add a sleep based on their
knowledge of their hardware.
The default behaviour remains the same.
Change-Id: I0446ae81d760dacaf31eea6ad9f9eaa098cf5e93
Partial-Bug: #1582797 
2016年05月24日 10:39:52 +02:00
Dmitry Tantsur
c15ed6a48e Wait for at least one suitable disk to appear on start up
Some kernel modules take substantial time to initialize. For example,
with mpt2sas RAID driver inspection and deployment randomly fail
due to IPA starting before the driver finishes initialization.
This problem is probably impossible to solve in a generic case, as
modern Linux environment do not have a notion of "hardware is fully
initialized" moment. All hardware is essentially hotplug.
To solve it at least for the simplest case, this patch adds a wait loop
on start up waiting for at least one suitable disk to appear in inventory.
Note that root device hints are not considered, as the node might not
be known at that moment yet.
Change-Id: Id163ca28f7c140c302ea04947ded3f3c58b284de
Partial-Bug: #1582797 
2016年05月24日 10:36:45 +02:00
OpenStack Proposal Bot
015fad6054 Updated from global requirements
Change-Id: Ieb49ed0533a3c766e3ec2ce9da67077a25609a4f
2016年05月23日 20:44:08 +00:00
Jenkins
b584bb4ddc Merge "Revert "Add hardware manager interface for hardware initialization"" 2016年05月23日 20:02:14 +00:00
Jay Faulkner
5a1a1ca61c Revert "Add hardware manager interface for hardware initialization"
I would've voted -1 on the patch in question had I reviewed it, and per
standard OpenStack/Ironic procedure, I'm reverting it for re-review and
discussion.
In this case; I don't think the new method in the HWM interface is
needed, and that evaluate_hardware_support() is intended to handle the
cases handled.
This reverts commit 0962cae1da.
Change-Id: Ic08e44bdf116403444b257ee9f4e5b906f5eac53
2016年05月23日 17:41:29 +00:00
Jenkins
c688b98917 Merge "Add hardware manager interface for hardware initialization" 2016年05月23日 12:10:19 +00:00