Following OpenStack Style Guidelines [1], I changed:
assertFalse(sth in sth) to assertNotIn(sth, sth).
After this change, a more specific message is shown on error.
[1]: http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises
Change-Id: I5d47d775dcff194693d97db6b797b7b027cbab56
Following OpenStack Style Guidelines[1]:
http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises
[H203] Unit test assertions tend to give better messages for more specific assertions.
As a result, assertIsNone(...) is preferred over assertEqual(None, ...)
Change-Id: I53c6d6d3e53d9fac38c50faf065c131d3aa55224
Currently, building ramdisks installs ironic-python-agent without any
upper-constraints. This causes the package to be installed with newer,
untested dependencies.
This commits introduces a tool to generate a local upper-constraints
file based on predefined strategies (below). Additionally, the fallback
to the openstack/requirements uses the URL defined in tox.ini instead of
redefining it. This prevents having to keep track of two separate
variables when releasing.
upper-constraints lookup strategies (in order):
* UPPER_CONSTRAINTS_FILE points to a local file
* UPPER_CONSTRAINTS_FILE points to a URL
* /opt/stack/new/requirements/upper-constraints.txt
* upper-constraints.txt from openstack/requirements git repository
Partial-bug: #1616554
Change-Id: Ib5c0c57cafdb6ffd7456e61f3b1bb5fa57520e5a
Re-initialization of the API client causes the identification
of an older ironic API to be forgotten.
As such, we need to re-use the API client from the initial lookup
for the heartbeat.
Tested with current master branch and stable/mitaka ipa
in noauth mode, and was able to deploy without any issues.
Closes-Bug: #1616461
Change-Id: I3ae1e2ce83f614b5b936a3cbb1b9587c6c55a89a
Update the hacking test-requirement to match openstack/requirements
global-requirements.txt
The hacking requirement is not updated by the proposal bot.
Change-Id: I6cfbaf55abad0c33cbcbe8063d873db717f5252e
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
The differences between 1010.6.0 and 1068.9.0 are published by the
CoreOS team [1] and are noted below.
1068.9.0
========
Security Updates:
* libcurl 7.50.1 for CVE-2016-5419, CVE-2016-5420, CVE-2016-5421,
CVE-2016-4802, CVE-2016-3739
1068.8.0
========
Security Updates:
* libpcre 8.38-r1 for CVE-2014-8964, CVE-2014-8964, CVE-2015-5073,
CVE-2015-5073, CVE-2015-5073, CVE-2015-8380, CVE-2015-8381,
CVE-2015-8383, CVE-2015-8384, CVE-2015-8385, CVE-2015-8386,
CVE-2015-8387, CVE-2015-8388, CVE-2015-8389, CVE-2015-8390,
CVE-2015-8391, CVE-2015-8392, CVE-2015-8393, CVE-2015-8394,
CVE-2015-8395, CVE-2016-1283, CVE-2016-1283
Bug Fixes:
* Properly escape systemd specifiers (#1459)
1068.6.0
========
Bug Fixes:
* Fix parsing of the user database which caused systemd-sysusers to crash (#1394)
* Fix handling of certain unicode characters in bash (#1411)
* Fix issue when starting transient services (#1430)
* Include work-around for empty SSH host keys (#106)
Changes:
* Removed Kubernetes kubelet
* The Stable channel has never contained a version which included the
kubelet. If an instance was booted from the Beta or Alpha channels
and then moved to the Stable channel, it will lose the kubelet when
it updates to this release.
* Set group for /dev/kvm
Updates:
* coreos-metadata v0.4.1
* bash 4.3_p46
[1] https://coreos.com/releases/
Change-Id: I00c2114aeea9d4c1b8e38f5786158f248875970d
Prior to this patch the ironic-python-agent service would only fallback
to use the old endpoints for /lookup and /heartbeat on a 404 error but,
since Ironic will check auth (if enabled) before it routes the requests
a 401 (Unauthorized) was returned.
Closes-Bug: #1612696
Change-Id: Idba5fed587e77aaa683d2c2b2126a520214712ce
This is a follow up to Ic08d4ff78b6fb614b474b956a32eac352a14262a.
It enhances an example, fixes a spelling error, and modifies some
sentences for better readability.
Change-Id: Icfc89edd426ddee6a93be40c5b2f56d9d78fbd0c
Falls back to vendor passthru on receiving 404.
Also fixes logging around lookup: log traceback on unexpected
exceptions, log successful lookup and replace % with ,
Change-Id: I7160c99ca63585fc333482fa578fdf5e0962b2b6
Depends-On: I9080c07b03103cd7a323e2fc01be821733b07eea
Partial-Bug: #1570841
This utilizes the new metrics support in ironic-lib to allow the agent to
report timing metrics for agent API methods as configured in ironic-lib.
Additionally, this adds developer docs on how to use metrics in IPA,
including some caveats specific to ironic-lib.metrics use in IPA.
Co-Authored-By: Jay Faulkner <jay@jvf.cc>
Co-Authored-By: Alex Weeks <alex.weeks@gmail.com>
Change-Id: Ic08d4ff78b6fb614b474b956a32eac352a14262a
Partial-bug: #1526219
This patch is adding a new cleaning step called "erase_devices_metadata"
to the GenericHardwareManager. This step is responsible for erasing the
metadata of the disks present in the node (partition tables, signatures,
filesystem identifiers etc...).
It's important to note that the "erase_devices" cleaning step will also
remove all these metadatas (because it will zero/shred the whole disk)
but, it takes a lot of time to run and for some usages of Ironic only
cleaning the device metadata and leaving the data from previous tenants
on the disk after the machine is recycled is fine. That's the use case
for systems using Ironic just to install the same base image onto many
nodes which will run another cloud on top afterwards (TripleO).
The new cleaning step has a default priority of 99, so it should run
before the "erase_devices" cleaning step so that we can guarantee that
the metadata was removed even in case of a failure when cleaning the
disks.
The version of the GenericHardwareManager was bumped to "1.1" with the
addition of this new clean step.
This patch make use of the "destroy_disk_metadata" method from ironic-lib
to get rid of the metadata.
Closes-Bug: #1603411
Change-Id: I3d7b39d5ee3e03ce63185e4168b1ac954a896c93
This was testing that _check_for_iscsi was called, which is part of
evaluate_hardware_support for the in-tree hardware manager.
evaluate_hardware_support is called at hardware manager instantiation,
which can happen when dispatch_to_managers is called. The hardware
manager instances are cached, so calling dispatch_to_managers won't
always invoke _check_for_iscsi. As such, these tests were intermittently
failing.
Mock _check_for_iscsi at the class level for these tests (since it's
unrelated), and don't check that it was called.
Change-Id: Iefca50c4c231c5eafd199bf8da6649bc3008a8fa
Currently image build for tinyipa overrides resolv.conf with the one
from build host instead of backing it up.
Change-Id: I18598fe5327d0ff74cac2596161b9201d47d2c5b
'discover' is test discovery for unittest and is only needed for
< python 2.7 (it was introduced in py 2.7), so it is no longer
needed.
Change-Id: I14dc79fe929854af6d51152815bc22e66d2273dc
Address some comments on the original review, mainly changing
the release note to be more specific.
Change-Id: I0af397fab174e4a7b426fdc69e50dffce5578577
stevedore no longer raises a KeyError when there's an entrypoint
missing. Instead we must supply a callback that handles that error.
Update inspection code to work with this.
Also bumps stevedore minimum to 1.16 ahead of the global-requirements
bot.
Closes-Bug: #1603542
Change-Id: I12af23f2525ac90e577bdd10bbfbbd9788e9551c
Depends-On: I8aa1ee52ff7de50488acb86e8920da89ddb05771
Per Doug's email[0], 'warnerrors' in setup.cfg hasn't actually been
working for some time now, and we've piled up a few warnings. Fix these
before a pbr release to unbreak it gets pushed out and breaks our doc
builds.
[0] http://lists.openstack.org/pipermail/openstack-dev/2016-June/097849.html
Change-Id: I6576a56234918febb21e7e4860544eb952123c09
When matching the root device hints passed to Ironic and the devices
present in the disk, the logic to the "size" attribute was different was
outside the main loop. This patch refactors that uses the same loop for
matching the size attribute, improving a little the readability.
This patch also makes sure that we convert the value of "size" to
integer before attempting to match it.
Change-Id: I619153232b9b58696369185ad5be90ccfd38a4ed
It is required to issue iscsistart -b on those hardware in order for
/dev/sda /dev/sdb etc to be exposed to the OS.
On this type of hw, without the fix
introspection fails with - missing: ['local_gb']' err.
Change-Id: If6667b123e9b890d97c03612596fb78ee2b0ae85
Closes-Bug: 1590606
This patch is extending the root device hints to also consider if a disk
is a rotational device or not. This hint makes it easier to separate
SSDs and HDDs when selecting the device to deploy the image onto.
Partial-Bug: #1599517
Change-Id: I270fe57df825929bdef7911b3a6757cf7163a5f1
This approach was used instead of fetching the latest version number at
build time because that meant a CoreOS update could break our gates at
any given time.
A new CoreOS make target, 'pin_latest', was made available. This target
bumps the "pinned" version to the latest. An eventual proposal bot will
call this target to ensure we stay up to date. This also offers the
possibility for downstream operators that want to build the latest
version to call this target before building. This leads to the same
result as fetching directly in the python build script, but with more
flexibility.
This is a second attempt to merge this change, as before it caused
frequent CI failures/timeouts. The expectation is that with CoreOS only
gating on IPA, this would be lower impact and easier to mitigate.
Change-Id: I78cb2efff2293b1591b30b7e39df9fc2af98d0b2
Closes-bug: 1581673
Co-Authored-By: Arun S A G <sagarun@gmail.com>
Co-Authored-By: Jim Rollenhagen <jim@jimrollenhagen.com>
This patch is replacing the "-ax" options of the ps command when
collecting the logs to "au". The "-x" option is not supported by the
BusyBox in the TinyIPA ramdisk.
Closes-Bug: #1599839
Change-Id: Id0c86db6aa16c63550890e1cd488994025f5dd68