Commit Graph

59 Commits

Author SHA1 Message Date
Ghanshyam Mann 2e94aa4241 Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: Ide6b3e9d6c1171f1ae568c256a3e9affa45de17b
2022-04-30 17:58:31 -05:00
Julia Kreger 9df7e67e69 Grenade: Change to use bios because we have funky networking
Grenade, for some confusing reason, creates a separate network,
and uses that for upgrade testing as opposed to the original network
the VMs were bound to. If Julia's memory is correct, this was for
multinode upgrade testing.

Anyway, When in UEFI mode, it appears that the TFTP packets
don't get tracked nor cross the boundrary. We likley need to
explicitly address this, but first, lets get the job working as
it was and can then update it.

Also, update requirements because markupsafe removed soft_unicode
method taht was deprecated since a while. Jinja2 started using the
new soft_str method since version 3.0.0

Change-Id: Iaebe966569962b0d3d43774d57b570469479f159
2022-04-04 14:13:58 +02:00
Dmitry Tantsur 76e99a30f7 Enable Redfish by default
Redfish has become an established technology with growing popularity.
By enabling it by default we make it easier for operators to use Ironic,
especially its advanced features, out of box.

Bump stevedore to match sushy.

Change-Id: I94dd4066ac598a7e5c2e0812e1ff286de5d164a2
2021-11-05 13:51:06 +01:00
Riccardo Pittau e5d35ba65c Add lower-constraints job to current development branch
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
2021-07-30 14:20:28 +02:00
Riccardo Pittau 840488e595 Remove lower-constraints job
As discussed during the upstream ironic community meeting on
Monday Dec 14 2020, the lower-constraints job is being removed.

Change-Id: I116d99014a7bf77ca77b796ea3b759800dd808ce
2020-12-15 18:43:09 +01:00
Iury Gregory Melo Ferreira 98732623b2 Fix lower-constraints with the new pip resolver
* 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
2020-12-11 13:34:24 -08:00
Yushiro FURUKAWA 0e399f750a Fix handling OctetString for pysnmp
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
2020-09-29 13:00:52 +00:00
Iury Gregory Melo Ferreira 19d97e6562 Fix lower-constraints for Ubuntu Focal
Change-Id: Id3cc2d1b619790813b94b0cfd52ff6590aff060c
2020-09-11 04:23:12 +00:00
Zuul 30a9d33577 Merge "Switch Ironic to openstacksdk for Neutron" 2020-09-07 15:41:31 +00:00
wu.chunyang 2e91f7b2b2 Remove the unused coding style modules
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
2020-08-26 12:56:21 +08:00
Harald Jensås ff00047b4a Switch Ironic to openstacksdk for Neutron
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
2020-08-19 10:48:17 +02:00
Zuul 3670be1283 Merge "Deprecate http_basic_username and http_basic_password in [json_rpc]" 2020-07-28 19:14:00 +00:00
Dmitry Tantsur 74e9e1d82a Deprecate http_basic_username and http_basic_password in [json_rpc]
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
2020-07-24 11:51:41 +02:00
Zuul 39a38ecf4e Merge "Add an option to choose the hash ring algorithm" 2020-07-23 17:31:00 +00:00
Dmitry Tantsur 9189b4bb26 Add an option to choose the hash ring algorithm
MD5 is not available in FIPS mode, we need a way to use something else.

Change-Id: Ie6e09ac66028cbe18717a7ea7a4c23730e3cb642
2020-07-22 18:27:19 +02:00
Zuul b5ae75a406 Merge "Use native oslo.concurrency execution timeout in ipmitool" 2020-07-22 15:58:19 +00:00
Dmitry Tantsur 737076fae2 Use native oslo.concurrency execution timeout in ipmitool
This change replaces custom Popen-based code with the new argument
(backed by the corresponding stdlib argument).

Story: #2004449
Task: #40283
Change-Id: I6840b1caffd272ef12ab2b259a02376ec185bc3f
2020-07-06 18:35:44 +02:00
zhangbailin 296c8669a9 Fix hacking min version to 3.0.1
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
2020-06-30 23:58:56 +00:00
Hervé Beraud 69549e5d76 Use unittest.mock instead of mock
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
2020-06-11 14:15:41 +02:00
Riccardo Pittau 30d0296f01 Fix requirements check
the virtualbmc lib is needed in lower-constraints for the
requirements check to pass.

Change-Id: I959aeff1123ac9c0911b9b2caa5fe94d6e34b848
2020-06-11 10:23:15 +02:00
Steve Baker c6112b01c3 Enable Basic HTTP authentication middleware
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
2020-06-05 01:15:08 +12:00
Hervé Beraud f266baffc3 Cap jsonschema 3.2.0 as the minimal version
Previous versions of jsonschema (<3.2.0) doesn't support python 3.8 [1].
Python 3.8 is part of the victoria supported runtimes [2] so we now force
to use jsonschema version 3.2.0 to avoid issues, remove ambiguity and ensure
that everything works with python 3 in general.

[1] https://github.com/Julian/jsonschema/pull/627
[2] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-victoria

Change-Id: I929a573714e0ce8218e0820babc16f9862c4a36e
2020-05-26 21:50:19 +02:00
Riccardo Pittau bc79bbd570 Update lower-constraints.txt
We need to list all dependencies in lower-constraints

Change-Id: Ibb730245444ea408cf1cfe183fa8201cb3368f8c
2020-05-12 17:35:26 +02:00
Riccardo Pittau 6c8579c0d1 Temporary add per-file-ignores to flake8 tests
This should help slowly enabling H210 test everywhere.

Also fixing H210 enforced autospec in some places.

Change-Id: Ibbc00b528265f8b86bc2fe45e078d56d36381c5d
2020-05-06 16:24:55 +02:00
Iury Gregory Melo Ferreira d6e7552457 Switch to unittest mock
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
2020-04-30 19:04:17 +02:00
Zuul 6b9f643f4b Merge "Stop configuring install_command in tox." 2020-04-27 22:14:01 +00:00
Riccardo Pittau 805e004e9c Upgrade flake8-import-order version to 0.17.1
Full py3 compatible version.
Add all Python3 modules to stdlib list.
Also includes fix to an enum34 dependency bug.

Change-Id: I6163317368ed9281ad600f47aaa64cbcf44d9a13
2020-04-21 15:06:33 +02:00
Iury Gregory Melo Ferreira 6397777ea8 Stop configuring install_command in tox.
Currently, we are overriding 'install_command' to use 'pip'. This is
considered poor behavior and 'python -m pip' should be used instead:

https://snarky.ca/why-you-should-use-python-m-pip/

It turns out that this is the the default value provided by tox:

https://tox.readthedocs.io/en/latest/config.html#conf-install_command

So we can remove the line and simply use the default value.

openstack-discuss thread
http://lists.openstack.org/pipermail/openstack-discuss/2020-April/014237.html

Bumping  in requirements:
-alembic to 0.9.6
-keystoneauth1 to 3.18

Bumping libs in  in l-c:
-alembic to 0.9.6
-keystoneauth1 to 3.18
-pika to 0.10.0 (necessary for installation)

Change-Id: I059e841ab891ba0451d0423065e9727c8c77f337
2020-04-21 12:52:07 +02:00
Dmitry Tantsur a3d7d73a69 Bump hacking to 3.0.0
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
2020-03-31 10:16:54 +02:00
Andreas Jaeger 5cebea361b Cleanup docs building
* 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
2020-02-29 15:12:04 +01:00
Riccardo Pittau 78c121a5d7 Stop using six library
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
2019-12-23 09:38:25 +01:00
Vladyslav Drok 68a5e31a54 Mock out the correct greenthread sleep method
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
2019-11-20 17:52:33 +01:00
Steve Baker 7ebad2e344 Allow vendor_data to be included in a configdrive dict
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
2019-10-31 08:55:39 +13:00
Riccardo Pittau 61c8364703 Raising minimum version of oslo.db
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
2019-10-07 14:50:58 +02:00
Kaifeng Wang 9aab525d45 Build pdf doc
The is one of community goals that each project could produce a
single PDF file. The pdf should be in the output of openstack-tox-docs
job.

TeX packages are required to build PDF locally, following is recommended:

* inkscape
* texlive-latex-base
* texlive-latex-extra
* texlive-fonts-recommended

More about the goal:
https://governance.openstack.org/tc/goals/train/pdf-doc-generation.html
https://etherpad.openstack.org/p/train-pdf-support-goal
https://etherpad.openstack.org/p/pdf-goal-train-common-problems

Change-Id: Icf1e4b58675b23e82ee6f6d79eb8852436ed55bb
2019-09-06 14:50:02 +08:00
Zuul e518bebe03 Merge "Support power state change callbacks to nova using ksa_adapter" 2019-08-24 02:20:13 +00:00
Surya Seetharaman d693d4c06c Support power state change callbacks to nova using ksa_adapter
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
2019-08-12 19:29:57 +02:00
Dmitry Tantsur d6774c294d Use openstacksdk for accessing ironic-inspector
Change-Id: Ibe4f6bf0b38364b5dd214e6c7e58d45a4d71ffdf
2019-07-31 15:23:39 +02:00
Riccardo Pittau 8d8402ee12 Clean lower-constraints.txt
Reduce the number of packages in lower-constraints.txt based on:
requirements
test-requirements
doc/requirements

Change-Id: I33e434347f6ca3ed0e3f86c28c62b5bdd63d7afb
2019-07-19 16:08:06 +02:00
Zuul 78085ad549 Merge "Bump keystonauth and warlock versions" 2019-07-19 12:45:20 +00:00
Riccardo Pittau 2d5f0c8b91 Bump keystonauth and warlock versions
openstacksdk 0.25.0 requires keystoneauth1>=3.11.0
python-glanceclient 2.8.0 requires warlock!=1.3.0,<2,>=1.0.1

Change-Id: Iaf80327538d2395fe61bd0e77743d1b6021a66f7
2019-07-15 18:08:42 +02:00
翟小君 1becd6dda9 Bump openstackdocstheme to 1.20.0
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
2019-07-02 10:18:03 +08:00
Zuul adecc670f7 Merge "Incorporate bandit support in CI" 2019-06-19 05:45:10 +00:00
Zuul d1e842c4b4 Merge "Switch to use exception from ironic-lib" 2019-06-12 07:33:26 +00:00
Riccardo Pittau f5dbf8ba0c Switch to use exception from ironic-lib
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
2019-06-11 12:03:44 +02:00
Kaifeng Wang caf925349a Incorporate bandit support in CI
Change-Id: I0ffe0c12e9e32f32d2b400b5756fc2148a2993a0
Story: 2005791
Task: 33518
2019-06-10 09:26:04 +08:00
Ilya Etingof 234dea98bb Bump lower mock version to 3.0.0
Previously used mock 2.0.0 has a nasty bug which prevents mocking
`@staticmethod` callables [1][2].

1. https://github.com/testing-cabal/mock/blob/master/CHANGELOG.rst#300
2. https://bugs.python.org/issue23078

Change-Id: I38d78cb8de92e9ecfc3dda5ffafcb4ffe175169e
2019-06-04 17:05:01 +02:00
Dmitry Tantsur c36a01a439 Publish baremetal endpoint via mdns
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
2019-05-23 17:11:50 +02:00
Jan Gutter d52aacd29d Bump sphinxcontrib-pecanwsme to 0.10.0
Sphinx 2.0 requires at least 0.10.0

Depends-on: I50f778e639acd2b4d9b0069a0081ff78b574ba7c
Change-Id: If88c529a60b0a58eb9439af1115ab558b6d7f6dd
Signed-off-by: Jan Gutter <jan.gutter@netronome.com>
2019-04-02 14:52:39 +02:00
Kaifeng Wang 2eceb3c8ab Fix lower-constraints job
lower-constraints job is broken due to fail to install psycopg.

Spotted log:

http://logs.openstack.org/02/642402/6/check/openstack-tox-lower-constraints/ca317fe/job-output.txt.gz#_2019-03-14_01_51_01_006156

Add libpq-dev to the bindep and bump psycopg version to >= 2.7 as evidence
shows it has a bug to support PostgreSQL >= 10.0 [1]

[1] https://github.com/getredash/redash/pull/2111

Change-Id: I1d5f0dab41638be1df9d63ede267f5a6d9f8c566
2019-03-14 17:24:09 +08:00