The lower-constraints test was removed becuase of an issue where pip
could not correctly determine the required packages versions to install,
ending in an almost infinite loop that would end up in timeout, failure,
and general mayhem.
Recently the issue has been fixed and, if properly configured, the
lower-constraints test can provide good indication of which minimum
versions are required to support the current code.
This patch adds the test back to the current development branch.
The long term goal is to keep the lower-constraints file in the stable
branches, but remove the test job to avoid issues during backports.
Change-Id: I5fff32ec5dd1a045116bcf02349650b1f5e3a196
As discussed during the upstream ironic community meeting on
Monday Dec 14 2020, the lower-constraints job is being removed.
Change-Id: I116d99014a7bf77ca77b796ea3b759800dd808ce
* move pep8 dependencies from test-requirements to tox.ini,
they're not needed there and are hard to constraint properly.
* add oslo.cache to l-c to avoid bump of dependencies
Change-Id: Ia5330f3d5778ee62811da081c28a16965e512b55
This commit fixes getting MAC address while inspection for iRMC driver.
To remove ord() in retrieving MAC address, it can avoid the following
exception:
TypeError: ord() expected string of length 1, but int found
Also, this commit sets the following type of mock for UT. So, I add
'pysnmp'[1] into test-requirements.txt and lower-constraints.txt.
* pysnmp.proto.rfc1902.OctetString
* pysnmp.proto.rfc1902.Integer32
[1] https://bit.ly/3bDeTCH
Change-Id: I1e013a93854e01a7060e1fc48aac091e7e9b74cb
Python modules related to coding style checks (listed in blacklist.txt in
openstack/requirements repo) are dropped from lower-constraints.txt
they are not needed during installation.
Change-Id: Ia07c3c237d9f5ec84642d376d48912a159b78dc7
This patch removes the dependency from ironicclient to
communicate with neutron in favor of openstacksdk.
Also:
* Use import keystoneauth1.loading as ks_loading accross
the project.
* Refactor to have one 'get_client' function, removing the
'_get_config_client' method. Setting config_client=True
when calling 'get_client' returns a client using auth
options values from conf parameters.
Depends-On: https://review.opendev.org/735601
Change-Id: Ib6c0fa2acfc33deb9c5b36ae724d5d8304d1dd29
It's very confusing that we use username/password everywhere, except
for [json_rpc]. Just use the standard options.
Also the version if keystoneauth is bumpted to one that supports
http_basic.
Change-Id: Icc834c3f8febd45c2548314ee00b85a7f9cebd2c
This change replaces custom Popen-based code with the new argument
(backed by the corresponding stdlib argument).
Story: #2004449
Task: #40283
Change-Id: I6840b1caffd272ef12ab2b259a02376ec185bc3f
flake8 new release 3.8.0 added new checks and gate pep8
job start failing. hacking 3.0.1 fix the pinning of flake8 to
avoid bringing in a new version with new checks.
Though it is fixed in latest hacking but 2.0 and 3.0 has cap for
flake8 as <4.0.0 which mean flake8 new version 3.9.0 can also
break the pep8 job if new check are added.
To avoid similar gate break in future, we need to bump the hacking min
version.
- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html
Change-Id: Idb45c6b09980c6850b1acf05a03c9be59fb254bc
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.
Change-Id: I8d8bcc60640a06b3cacf18714c4a22802e6c9827
When the config option ``auth_strategy`` is set to ``http_basic`` then
non-public API calls require a valid HTTP Basic authentication header
to be set. The config option ``http_basic_auth_user_file`` defaults to
``/etc/ironic/htpasswd`` and points to a file which supports the
Apache htpasswd syntax[1]. This file is read for every request, so no
service restart is required when changes are made.
The only password digest supported is bcrypt, and the ``bcrypt``
python library is used for password checks since it supports ``$2y$``
prefixed bcrypt passwords as generated by the Apache htpasswd utility.
To try HTTP basic authentication, the following can be done:
* Set ``/etc/ironic/ironic.conf`` ``DEFAULT`` ``auth_strategy`` to ``http_basic``
* Populate the htpasswd file with entries, for example:
``htpasswd -nbB myName myPassword >> /etc/ironic/htpasswd``
* Make basic authenticated HTTP requests, for example:
``curl --user myName:myPassword http://localhost:6385/v1/drivers``
[1] https://httpd.apache.org/docs/current/misc/password_encryptions.html
Change-Id: I7b89155d8bbd2f48e186c12adea9d6932cd0bfe2
Story: 2007656
Task: 39825
Depends-On: https://review.opendev.org/729070
This should help slowly enabling H210 test everywhere.
Also fixing H210 enforced autospec in some places.
Change-Id: Ibbc00b528265f8b86bc2fe45e078d56d36381c5d
Python3 have a standard library for mock in the unittest module,
let's drop the mock requirement and switch tests to unittest mock.
Change-Id: I4f1b3e25c8adbc24cdda51c73da3b66967f7ef23
Full py3 compatible version.
Add all Python3 modules to stdlib list.
Also includes fix to an enum34 dependency bug.
Change-Id: I6163317368ed9281ad600f47aaa64cbcf44d9a13
The new version enables a lot of standard flake8 checks. Some of them
are temporary disabled to reduce the scope of this patch:
* Complexity check requires a few functions to be rewritten (apparently,
it was not enabled previously).
* Indentation check failures are numerous and potentially contradictive.
These checks will be enabled in follow-ups.
W606 is removed from excludes since we no longer hit it.
Change-Id: I1e5a6f8e5e90c55cfc6f740b26c30196512d3be3
* Remove doc/source/install/conf.py, it's unused.
* Remove settings that are provided by openstackdocstheme from conf.py
files. Switch to newer openstackdocstheme for this.
* Remove unused deps from tox.ini: releasenotes and api-refonly need
doc/requirements but not requirements.
Change-Id: Iab5ad6cde40c3342770c0112155fe5e1d262d1e8
Since we've dropped support for Python 2.7, it's time to look at
the bright future that Python 3.x will bring and stop forcing
compatibility with older versions.
This patch removes the six library from requirements, not
looking back.
Change-Id: Ib546f16965475c32b2f8caabd560e2c7d382ac5a
It seems at some point oslo_service loopingcall started using
eventletutils from oslo_utils to sleep during the loopingcall
retries, and some untittests started taking up to 40 seconds
to complete. This change mocks out the correct method offering
significant speedup to unittests' run time.
The EventletEvent class is introduced to eventletutils in version
3.38.0 so lower constraints are bumped as well.
Change-Id: Id7e6ff2a4748b5301e2259acdc760ac7f56b96c3
configdrive can contain a vendor_data2.json file containing key/value
pairs injected by nova's vendordata mechanism[1].
This change lets Ironic accept a vendor_data key when configdrive is
provided as json, allowing parity with nova.
This change requires an openstacksdk release 0.37.0
[1] https://www.madebymikal.com/nova-vendordata-deployment-an-excessively-detailed-guide/
Change-Id: Id990b970619a113c5d5ead47fb550870d91b5e04
Task: 36756
Story: 2006597
Blueprint: nova-less-deploy
oslo.db was not compatible with Python 3.7 until version 4.40.0
because Python 3.7 makes "async" a keyword [1].
To prevent bad surprises, this patch increases the minumum version
required for oslo.db to 4.40.0.
[1] https://review.opendev.org/574833
Change-Id: I3271fd2d7d81261db6da079e55fb87656c833686
Add power state change callbacks of an instance to nova by
performing API requests. Whenever there is a change in the
power state of a physical instance (example a "power on"
or "power off" IPMI command is issued or the periodic
``_sync_power_states`` task detects a change in power state)
ironic will create and send a ``power-update`` external event
to nova using which nova will update the power state of the
instance in its database. By conveying the power state changes
to nova, ironic becomes the source of truth thus preventing
nova from forcing wrong power states on the instance during
the nova-ironic periodic sync. It also adds the possibility of
bringing up/down a physical instance through the ironic API
even if it was put down/up through the nova API.
Note that ironic only sends requests to nova if the target
power state is either "power on" or "power off". Other error
states will be ignored. In cases where the power state change
is originally coming from nova, the event will still be
created and sent to nova and on the nova side it will be a
no-op with a debug log saying the node is already powering on/off.
NOTE: Although an exclusive lock (task_manager.upgrade_lock()
method) is used when calling the nova API to send events,
there can still be a race condition if the nova-ironic power sync
happens to happen a nano-second before the power state change
event is received from ironic in which case the nova state will
be forced on the node.
Credit for introducing ksa adapter: Eric Fried <openstack@fried.cc>
Depends-On: https://review.opendev.org/#/c/645611/
Part of blueprint nova-support-instance-power-update
Story: 2004969
Task: 29424
Change-Id: I6d105524e1645d9a40dfeae2850c33cf2d110826
Reduce the number of packages in lower-constraints.txt based on:
requirements
test-requirements
doc/requirements
Change-Id: I33e434347f6ca3ed0e3f86c28c62b5bdd63d7afb
Some options are now automatically configured by the version 1.20:
- project
- html_last_updated_fmt
- latex_engine
- latex_elements
- version
- release.
Change-Id: I308c3296bc56fdb623a9fc6b021c388be2d33330
The exception modules in ironic and ironic-lib contain the same
almost identical class IronicException.
With this patch we directly use the one in ironic-lib.
Updating requirements and lower-constraints to use compatible
version of ironic-lib.
Also deprecating duplicated fatal_exception_format_errors
option.
Change-Id: I1ce0d12d912020346425fd658d3b1807607455a4
Story: 1626578
Task: 10515
This change adds an option to publish the endpoint via mDNS on start
up and clean it up on tear down.
Story: #2005393
Task: #30383
Change-Id: I55d2e7718a23cde111eaac4e431588184cb16bda
Sphinx 2.0 requires at least 0.10.0
Depends-on: I50f778e639acd2b4d9b0069a0081ff78b574ba7c
Change-Id: If88c529a60b0a58eb9439af1115ab558b6d7f6dd
Signed-off-by: Jan Gutter <jan.gutter@netronome.com>
Extend the API with the ability to build config drives from meta_data,
network_data and user_data, where meta_data and network_data are JSON
objects, and user_data is either a JSON object, a JSON array or
raw contents as a string.
This change uses openstacksdk (which is already an indirect dependency)
for building config drives.
Change-Id: Ie1f399a4cb6d4fe5afec79341d3bccc0f81204b2
Story: #2005083
Task: #29663
Adds deploy_templates REST API endpoints for retrieving, creating,
updating and deleting deployment templates. Also adds notification
objects for deploy templates.
Bumps the minimum WSME requirement to 0.9.3, since the lower constraints
job was failing with a 500 error when sending data in an unexpected
format to the POST /deploy_templates API.
Change-Id: I0e8c97e600f9b1080c8bdec790e5710e7a92d016
Story: 1722275
Task: 28677
This adds basic framework for ironic-status upgrade
check commands. For now it has only "check_placeholder"
check implemented.
Real checks can be added to this tool in the future.
Change-Id: I7d5f018656322b92c663a2adaaf6330a55c00fb8
Story: 2003657
Task: 26133