1908 Commits

Author SHA1 Message Date
Riccardo Pittau
643d1e0199 [trivial] Fix Xena release notes versions
Change-Id: I3fcc7b473629803e57fb379a1946ca088f3d88e4
2021-12-06 10:42:27 +01:00
Ghanshyam Mann
e20c7aaf26 Updating yoga tested python versions in classifier
Yoga testing runtime has been updated with py38 and py39
as voting and removed the py36 testing. Unit tests update are
handled by the job template change in openstack-zuul-job and you
can see the updated jobs running in gate.

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/818609

this commit updates the tested py versions in setup.cfg classifier.

[1] https://governance.openstack.org/tc/reference/runtimes/yoga.html

Change-Id: Idbc2a716eec5fd5710fc5ea493600a3519a37bdb
2021-11-24 19:51:58 -06:00
Zuul
b6e1ddec86 Merge "CI: Make inspector configuration UEFI aware" 2021-10-12 10:31:03 +00:00
Julia Kreger
c70e9711e8 CI: Make inspector configuration UEFI aware
Also adds root=/dev/ram0 for the ramdisk initialization which seems
to be required with the switch to UEFI.

Depends-On: https://review.opendev.org/c/openstack/ironic/+/812167
Change-Id: I77aedafb121f9b8b009a424da11c82acca2216cd
2021-10-01 15:58:19 -07:00
b14be6a0b1 Add Python3 yoga unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for yoga.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I6617d6025be66cd7d99c05dd5c0542acf6790dbc
2021-09-22 18:40:55 +00:00
80a7abe00f Update master for stable/xena
Add file to the reno documentation build to show release notes for
stable/xena.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/xena.

Sem-Ver: feature
Change-Id: I09dd83c307547b7bfbd638942a4d5b9156337446
2021-09-22 18:40:53 +00:00
Zuul
5ff2d13975 Merge "Add optional healthcheck middleware" 2021-09-15 14:57:09 +00:00
Zuul
fd539c2345 Merge "Update parameters for authtoken middleware" 2021-09-14 15:05:28 +00:00
Iury Gregory Melo Ferreira
4bc75327aa Fix sqlalchemy
Inplicit execution was deprecated in SQLAlhcemy, version 1.4 doesn't
support and we need to convert to explicit[1]

[1] https://docs.sqlalchemy.org/en/14/changelog/migration_20.html#implicit-and-connectionless-execution-bound-metadata-removed

Change-Id: I4a780567fb92c32cf55c54e2e134df9456e36165
2021-09-14 11:30:48 +02:00
Takashi Kajinami
d7400b5dc4 Add optional healthcheck middleware
This change allows uses to enable the healthcheck middleware from
oslo.middleware in API pipeline, by setting the [healthcheck]/enabled
option. This middleware provides an API endpoint at /healthcheck path
which allows load balancers or monitoring applications to determine
a service is up using HTTP requests.

This change basically follows the same change merged in ironic[1] repo.

[1] 6f439414bdcef9fc02f844f475ec798d48d42558

Change-Id: Ic2ee2bca74ea2a5a0723ef54b10c531f77ea7b8d
2021-09-12 22:51:38 +09:00
Iury Gregory Melo Ferreira
62f79a1129 Include ironic/tests in irrelevant-files
Since we run inspector jobs in ironic gate, we need to
include `ironic/tests` in the irrelevant-files so
we don't run the jobs when there is only changes in unit tests.

Change-Id: I98757ab78716689355f70c7735480d4dc8e04320
2021-09-03 21:12:16 +02:00
Takashi Kajinami
6e72471a41 Update parameters for authtoken middleware
... to avoid warnings from the middleware about deprecated parameters.
Currently parameters of each auth plugin are not loaded in unit tests
so user credentials are not updated but just removed.

Change-Id: I6e420dac51ac8cf92eadb1c3a3d4716a96c22001
2021-08-21 02:39:06 +09:00
Zuul
00c2e99b5a Merge "Handle NodeLocked failures" 2021-08-11 00:58:32 +00:00
Julia Kreger
7f6c4c4378 Handle NodeLocked failures
Some actions can fail due to the node being locked as part of
normal operations. This was previously handled silently by
python-ironicclient, but when inspector was changed to use
openstacksdk, this was no longer handled.

Adds the retry wrapper around critical path methods involving
power/reboot ops and node updates which require locks.

Change-Id: I3d26cf46da02b3e8f3f773c0aeaed6843e0f26e5
Story: 2009107
Task: 42966
2021-08-10 21:15:53 +00:00
Riccardo Pittau
424b53e55d Add lower-constraints job to current development branch
The lower-constraints test was removed because 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, and it
runs only on master.
The lower-constraints file will stay in the future stable branches.

Change-Id: I2e247ff2d68705d04d40c7ea653a8d3e0daf17d8
2021-08-05 12:20:59 +02:00
Zuul
21105e9dc5 Merge "Do not reset FSM when ironic ports cant be queried" 2021-07-30 14:28:11 +00:00
Riccardo Pittau
9cfd98e577 Increase version of hacking and pycodestyle
Fix errors in unit tests

Change-Id: Ibc8648b64887daac6fb5ec8a6dd61d9312a52ef3
2021-07-29 11:19:36 +02:00
Riccardo Pittau
611a543ecd Update requirements
Update minimum required versions of python packages.
The updates is based on crosscheck requirements from required
packages:

oslo-policy 3.7.0 depends on oslo.context>=2.22.0

increase oslo-service version to be able to use eventlet 0.26.0
oslo-service 1.24.0 depends on eventlet!=0.18.3, !=0.20.1, <0.21.0 and >=0.18.2

increase oslo-log version to fix error:
AttributeError: type object 'deprecated' has no attribute 'WALLABY'

oslo-log 4.3.0 depends on oslo.serialization>=2.25.0
oslo-log 4.3.0 depends on pbr>=3.1.1
oslo-log 4.3.0 depends on oslo.i18n>=3.20.0

Change-Id: I20a5a20b94ffd27ea34f23ac89ca2826eb548b1a
2021-07-13 18:11:31 +02:00
Zuul
806ce60427 Merge "Add rbac scope enforcement handling to devstack plugin" 2021-07-06 12:42:47 +00:00
Zuul
09bd2fd8cc Merge "Fix & suppress oslo policy warnings" 2021-07-06 10:18:57 +00:00
Ghanshyam Mann
6a4899be86 Fix & suppress oslo policy warnings
This fix the below warning for DeprecatedRule:

Since 3.7.0, oslo policy started the DeprecationWarning[1] if
deprecated_reason and deprecated_since param are not passed
in DeprecatedRule or they are passed in RuleDefault object.

Andf suppress the policy deprecation and default change warnings

Oslo policy log warnings if defaults for policies are changed.
With new RBAC change every policy rules' default is changed,
which end up lot of warnings in logs. We can suppress these for now
until we are enforcing new defaults.

- https://zuul.opendev.org/t/openstack/build/5cefaef6d02a4b7abe3c449491b81e68/log/job-output.txt#879

[1] https://github.com/openstack/oslo.policy/blob/3.7.0/oslo_policy/policy.py#L1538

Change-Id: If481a5afc3b23d1d196ffd7576d0784a9702da59
2021-07-05 09:00:06 -05:00
Zuul
2d4e06689d Merge "Fix broken links in CONTRIBUTING.rst" 2021-07-05 13:22:36 +00:00
Zuul
f38d010626 Merge "Ignored error state cache for new requests" 2021-07-02 17:18:21 +00:00
Cenne
072ebdc1f1 Fix broken links in CONTRIBUTING.rst
* turn on apidocs option for individual module docs
* crosslink to information using :doc: and :ref:

Change-Id: Ie8016623251fb0f55335c64252060d4ce966dc96
2021-07-01 19:50:56 +02:00
Julia Kreger
2c2dfe986e Add rbac scope enforcement handling to devstack plugin
Adds explicit handling of scope enforcement setting by putting
the appropriate settings in place, and handling the appropriate
configuration to communicate back with ironic based upon supplied
environment variables.

Change-Id: Ia27b26990e52b5b4ffb49b2fee3bdcca41dd75a9
2021-06-30 10:41:29 -07:00
Julia Kreger
d972dc93cd Ignored error state cache for new requests
A possibility exists where inspector *can* fail upon inspection if
the database connectivity was lost on a prior action. This is because
the last database transport is potentially bad and fails upon load for
the transaction. The cache can then end up with an "error" state entry,
which upon retrying can fail becasue it is already in error state

Because there really are no guarentees regarding database failures,
the best thing to do is to not trust the prior cache state if it is
in error and to reset it to starting upon new introspection requests.
This prevents operators from *having* to perform process restarts to
force all loads to be from the database unless they manage to have a
multi-inspector cluster and get another inspector node to inspect in
the mean time.

Change-Id: I04ae1d54028862642d043f3a8f3af99405863325
Story: 2008344
Task: 41246
Related: rhbz#1947147
2021-06-25 06:13:46 -07:00
Julia Kreger
948325cae7 Fix SqlAlchemy >1.3.19 support
SQLAlchemy 1.3.19 change the excepted exception and 1.4.x
changed the enum checking behavior such that we were no
longer raising an exception matching the check.

While we had a test for this, We didn't actually
check for it anywhere in the code. And the states are
driven by the code, so the underlying test that was broken
felt redundant. As such, it has been removed.

Change-Id: I39fa3d85978555b6cb9d0884a90625b4765bac28
2021-06-15 14:25:38 -07:00
Vladyslav Drok
c3b316677c Do not reset FSM when ironic ports cant be queried
It can cause problems, as if a single sync fails, FSM state will be
reset and not put back to initialized state until inspector restart.

Change-Id: I24b08612c4ffc6aca60ca08f3ff5cc769c7c041d
Story: #2008971
Task: #42611
2021-06-14 17:14:54 +03:00
Radosław Piliszek
1ba0849b6b [doc] Improvements in processing_hooks docs
* Emphasise that order matters.
* Make order of LLDP-related hooks the recommended one.
* Fix some related wording.
* Mention IPA param requirements already in lldp_basic hook.

Change-Id: I043fdd5b5582971e43211c9a860d6b28ca73dc4e
2021-06-04 11:48:36 +00:00
Zuul
ec4ee8171c Merge "Add versions to Wallaby release notes" 2021-06-04 07:32:00 +00:00
Arne Wiebalck
11e5798233 Add versions to Wallaby release notes
Change-Id: I9bcdda75b16e83b6d2246448d38b83e37ecf2750
2021-06-04 08:17:17 +02:00
likui
b912248f09 Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: I143ef78dec2ffff6b1c309036d50533591c20171
2021-06-03 16:53:55 +08:00
XinxinShen
1600dbc65f setup.cfg: Replace dashes with underscores
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Change-Id: I8aa117a2ab38af4a82abfdd65e9dac103827ffbb
2021-05-04 17:12:40 +08:00
Dmitry Tantsur
de839a509d Trivial: better guard against malformed data in extra_hardware
We already catch IndexError when processing a line, but not other
errors. A recent regression in python-hardware caused it to raise
TypeError.

Change-Id: Ic6615c1b4017df66783829e54b9f716a9e65b916
2021-05-03 15:41:40 +02:00
Dmitry Tantsur
08b6c892d7 Trivial: remove an ancient option from the CI
Change-Id: Ic50cede81c6ec0d0c49c622535503722701e1d1d
2021-04-30 17:19:05 +02:00
faafa91f72 Add Python3 xena unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for xena.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I083379934e699f23997237c9b5ee369f60399d4e
2021-03-30 18:43:49 +00:00
402f6290e5 Update master for stable/wallaby
Add file to the reno documentation build to show release notes for
stable/wallaby.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/wallaby.

Sem-Ver: feature
Change-Id: I68e4788d193e3a0840e708b93a01b70d6709fa09
2021-03-30 18:43:44 +00:00
Zuul
3f26b91638 Merge "Add ibmc_address to ipmi_address_fields" 2021-03-24 12:32:14 +00:00
François Rigault
f5e3a665f7 Use port.id instead of port.uuid
This is a follow-up for extra issues identified during code review of
Ib4978f5e3e4f1b64faa1bfae3cdcf46199bb2f21

Story: 2008698
Task: 42099
Change-Id: Ic18d42209d0f0f7c12ab0972dba2b97bb93b7c4e
2021-03-24 00:42:47 +01:00
Riccardo Pittau
565c82b154 Increase memory of ironic vm in grenade
This is to be able to run jobs with tinycore 12.x based tinyipa images.

Change-Id: I48c7b9ee1eda7366ecbf496d5ee297063f3ba789
2021-03-23 09:17:37 +01:00
douyali
96096144bb Add ibmc_address to ipmi_address_fields
Use ibmc driver to inspect, need edit ironic-inspector config file
to add ibmc_address.

Change-Id: Ie1c665b80b10b6a4d5a3fce1ea4849a8c996cf69
2021-03-22 21:24:37 +01:00
Francois Rigault
22853a74b5 Fix port id vs uuid in ValidateInterfacesHook
follow-up to Icd3de82877c6a53d32b4c9fd3e500d3cd9d7fb17

Use id attribute instead of uuid. This caused an exception when an unexpected
port was being deleted.

Story: 2008698
Task: 42007
Change-Id: Ib4978f5e3e4f1b64faa1bfae3cdcf46199bb2f21
2021-03-06 16:47:30 +01:00
Zuul
3750073bcf Merge "Add release version to release notes" 2021-03-01 11:45:28 +00:00
Zuul
6d6e39f01c Merge "Implement secure RBAC" 2021-02-26 05:50:47 +00:00
Dmitry Tantsur
223cfbdbbc Enable tempurls for Swift in grenade
Change-Id: Icd752783ff6df0e06f04e03b374af4862c91ec7f
2021-02-25 12:06:15 +01:00
Steve Baker
c9e312f8b4 Implement secure RBAC
The default policy will been replaced with one which aligns with the
Secure-RBAC scopes and roles. Since ironic-inspector is a tool used only
by system-level admins, only the ``system`` scope is supported, and the
only roles in the policy rules are ``admin`` and ``reader``.

The is_admin and is_observer rules are deprecated for removal, and
every rule which refers to them are deprecated in favor of the
system-scoped equivalent (system_scope:all with role:admin or
role:reader)

No unit tests covered the existing policy, these are now covered by
test_acl.TestACLDeprecated.

Change-Id: I4d038245c6b97b1504fb47eeec78ad3f9e5a897c
2021-02-23 10:24:49 +13:00
Pavlo Shchelokovskyy
5c79d7552a Fix node id vs uuid in processing_logger_prefix
this is a follow-up to Icd3de82877c6a53d32b4c9fd3e500d3cd9d7fb17

one more place was identified as trying to use uuid attr of a Node
object from openstacksdk instead of id attr.

In tests, use stricter mocking with spec_set (that actually fails to
access or set an atribute of a mock that is absent from the spec class
or instance) to guard against future possible changes.

Change-Id: I83c420d0e91e00f583a28833f4f710cf70b01fa8
Story: 2008379
Task: 41300
2021-02-17 18:40:58 +02:00
Zuul
8d06567a6e Merge "Add upgrade check, and json2yaml policy handling" 2021-02-17 14:36:57 +00:00
Riccardo Pittau
f47fbd60a1 Add release version to release notes
Change-Id: I945a33a50caf1ceef3cf86a2a68fac77ceb53ee8
2021-02-01 10:10:26 +01:00
Moisés Guimarães de Medeiros
86b974b75c Fix memcached host address.
Since pymemcache 3.4.0, localhost will first translate to ipv6 ([::1])
if possible instead of ipv4 (127.0.0.1). Since memcached is running in
the ipv4 interface, we need to point tooz to the right endpoint.

Depends-On: https://review.opendev.org/c/openstack/requirements/+/772684
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
Change-Id: Iddf558cd598e41ffead11e164ce2fb1720d15f34
2021-01-28 16:44:08 +01:00