Commit Graph

400 Commits

Author SHA1 Message Date
Zuul b76d83349b Merge "reno: Update master for unmaintained/xena" 2024-03-14 12:13:41 +00:00
Zuul d0a1811857 Merge "reno: Update master for unmaintained/wallaby" 2024-03-14 11:57:54 +00:00
OpenStack Release Bot 7ae748054e reno: Update master for unmaintained/xena
Update the xena release notes configuration to build from
unmaintained/xena.

Change-Id: I95c0cd5db67a68eb69c082a9e5e9a867ba0795e2
2024-03-14 11:25:56 +00:00
OpenStack Release Bot bb8b7c21fd reno: Update master for unmaintained/wallaby
Update the wallaby release notes configuration to build from
unmaintained/wallaby.

Change-Id: I4f29351a88eeb3f916d8c8e7129b3a446939aa35
2024-03-14 11:21:26 +00:00
OpenStack Release Bot 15dd8e7bd9 reno: Update master for unmaintained/victoria
Update the victoria release notes configuration to build from
unmaintained/victoria.

Change-Id: I5ab01bb2cd05c8ac672f97deb9001a65885eb4be
2024-03-14 11:17:06 +00:00
OpenStack Release Bot 8659bff73d reno: Update master for unmaintained/yoga
Update the yoga release notes configuration to build from
unmaintained/yoga.

Change-Id: I18a2016a94391faaa0ffb8f113ea58aa43399276
2024-02-06 15:02:52 +00:00
Zuul 93bef2405a Merge "[codespell] Fixing Spelling Mistakes" 2024-01-27 00:00:48 +00:00
Zuul 212d0b2a9a Merge "Change policy to enforce only new policy" 2024-01-26 04:03:33 +00:00
Julia Kreger fff80086d6 Change policy to enforce only new policy
Change's inspector's default policy to align with the 2023.2
release goal.

Depends-On: https://review.opendev.org/c/openstack/ironic/+/902009
Change-Id: Iaa271bd13e3a62c4a3b35b6e6b556984f7b1d09c
2024-01-26 01:01:11 +00:00
Sharpz7 98a226b9c6 [codespell] Fixing Spelling Mistakes
This is the first in a series of commits to add support for codespell. This is continuning the process completed in ironic-python-agent.

Future Commits will add a Tox Target, CI support and potentially a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame.

Change-Id: Icb4e66359c3e79618c916b35793ea7b5f79b030d
2024-01-25 21:22:07 +00:00
Zuul bebf29d4f8 Merge "Fix RBAC access for service/admin user access" 2024-01-18 21:09:24 +00:00
Zuul c4a177c8eb Merge "Handle LLDP parse Unicode error" 2024-01-12 00:10:37 +00:00
Julia Kreger 5523b11cba Fix RBAC access for service/admin user access
This change fixes inspector so a project scoped service role user
can connect to inspector, and a project scoped admin user can also
access inspector as the OpenStack community pivoted it's RBAC
direction after the original RBAC work was done, and inspector
was sort of forgotten about.

Closes-Bug: #2049098
Change-Id: Ide9420843a680b09d682062a99b2c88c0fcf5228
2024-01-11 11:55:11 -08:00
Riccardo Pittau db76af9c86 Handle LLDP parse Unicode error
Closes-Bug: #2044793
Change-Id: I939c80bb309b22e05ba7cc93686f12bbe0d71624
2024-01-03 14:37:41 +01:00
Riccardo Pittau bf59b80e93 Fix versions in release notes
Change-Id: I6a3db14cd24ac50c02801fa7b156749c109bb17d
2023-12-20 10:27:04 +01:00
OpenStack Release Bot fbfe131c5d Update master for stable/2023.2
Add file to the reno documentation build to show release notes for
stable/2023.2.

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

Sem-Ver: feature
Change-Id: Ice4a0d1b8e17d12f5b31aa0bcf4f0f8d76596510
2023-09-21 11:20:13 +00:00
Zuul f09ce1f01c Merge "Handle bracketed IPv6 redfish_address" 2023-09-20 10:57:34 +00:00
Dmitry Tantsur be3d3772de Update the project status and move broken jobs to experimental
Since ironic-inspector is pending deprecation and does not see a lot of
changes, simply disable the jobs that do not pass. A release note is
issued about the status of the project.

Also: Re-adjust the memory footprint of the VMs since we use
tinycore linux on this job, *and* we were previously introsepcting
4 VMs at 1GB each. The count has been changed to two.

Change-Id: I11d10a9f83552b5875812fa65d87cc5c72081537
2023-09-19 08:03:43 -07:00
Harald Jensås 278ba52bf9
Handle bracketed IPv6 redfish_address
If redfish_address is in brackets, unwrap it
and check that it is a valid IPv6 address.
If that is the case use the unwrapped address
to avoid "Name or service not known".

Closes-Bug: #2036455
Change-Id: I0d194091be22e8401d379b7ffa720f8004cca3d0
2023-09-19 14:59:44 +02:00
OpenStack Proposal Bot 62e42d3800 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Idda5fcfacc300cb812827399b68c928a357e28fd
2023-05-09 04:01:21 +00:00
OpenStack Release Bot 974ec5a45e Update master for stable/2023.1
Add file to the reno documentation build to show release notes for
stable/2023.1.

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

Sem-Ver: feature
Change-Id: I4e7efcbb18a2e44508ca7ca74250c9a17a3be4b6
2023-03-09 13:37:10 +00:00
OpenStack Proposal Bot 933c4f8d10 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ia1b6c60ec3b3c649c223b1aa1bb2c21334940f74
2023-02-04 03:41:46 +00:00
Jay Faulkner e1f3b71a39 Make reno ignore bugfix eol tags
Reno was assuming all tags ending in -eol represented an old, EOL'd
stable branch. That's not true for Ironic projects which have bugfix
branches. Update the regexp to exclude those branches.

Co-Authored-By: Adam McArthur <adam@mcaq.me>
Change-Id: I2f8c80bd2aac2d00616ac2a2789a7da303d29656
2023-01-25 13:22:33 -08:00
Anton Arefiev 3fe42b53fd SQLAlchemy 2.0 Support
Primarily remove the workaround added in
Ia6d512ff2ae417bab938cb095fbb0884d195010a which added
continued use of autocommit, which is incompatible with
SQLAlchemy 2.0.

Also set the environment for unit tests to report compatability
warnings, although it appears none are being reported at this time.

Also cuts out the db upgrade cruft to only use the online database
migration code through oslo_db's enginefacade, which has the smarts
to handle online or offline migrations.

And then, retools unit/functional test data storage to utlize sqlite,
and in that re-tooled the queries to prevent locking conditions
which could exist with queries, and some additional refactoring/cleanup.

Also, don't mock and test time.sleep().

Additionally, it looks like we have discovered the root cause of the
memory/connection leakage issue which has been observed, due to the
way lists of nodes are processed/returned.

This change was based upon the work in
I506da42a9891a245831f325e34bec92e0a3f33f0 which is included in
this commit as the entire database structure and interaction
has been modified for ironic-inspector.

Co-Authored-By: aarefiev <aarefiev@mirantis.com>
Story: 2009727
Task: 44132
Change-Id: Ic88eb9dec5fddc924a72d9a23c17a304954ebf46
2022-12-15 09:28:55 -08:00
OpenStack Proposal Bot d364e9dc30 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Id1a044df75cfbc046a675988e8d1f00da78b928a
2022-10-12 03:16:15 +00:00
OpenStack Proposal Bot 18f64e91be Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ibc04cf86e7d028e4253f4b47d22a58000b9cfed3
2022-09-24 02:13:37 +00:00
Riccardo Pittau 8b389896ea Update release versions for yoga
Change-Id: I41e541dd989067f5f694c904eb54b4adfc349582
2022-09-23 09:03:44 +02:00
OpenStack Release Bot 64c881b20f Update master for stable/zed
Add file to the reno documentation build to show release notes for
stable/zed.

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

Sem-Ver: feature
Change-Id: Id87e98c6a0052c45b78eebeedd6c3fdca6890a61
2022-09-22 08:52:03 +00:00
Jakub Jelinek 5ab429d528 Introduce skip list to inspector
Follow the same process of root device selection as in IPA
which changed in https://review.opendev.org/c/openstack/ironic-python-agent/+/850861
The change introduces 'skip_block_devices' field into properties which
contains a list of hints pointing to devices that cannot be root devices

Change-Id: I94c8607ef9c610eadf1b5bce4fb154e97939a643
2022-09-20 11:18:36 +01:00
niuke 9b6d4ca9cd remove unicode literal from code
Change-Id: Ia8508fe3e46fd7f2531e21fb2bb5745076f6d4b0
2022-08-06 20:48:19 +08:00
OpenStack Proposal Bot 3aabc34493 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Iee21a71791c4e083033ad304d4348f36c8dbca7f
2022-05-26 03:15:28 +00:00
OpenStack Release Bot 9dd3ddcd77 Update master for stable/yoga
Add file to the reno documentation build to show release notes for
stable/yoga.

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

Sem-Ver: feature
Change-Id: I47205257b06c7cf59678989223517c66dafb1a8e
2022-03-18 17:15:13 +00:00
Dmitry Tantsur 3ebfdf05e1 Support listening on a Unix socket
When using nginx to terminate TLS (like it's done in Bifrost), it's more
secure to use a Unix socket for communication, so that local users
cannot access plain text communication.

Change-Id: I37b762cca035b5855deb92635c29e8eb97a87c20
2022-02-01 10:30:11 +01:00
Zuul 567b73138d Merge "Remove rootwrap rule for dnsmasq systemctl" 2022-01-14 23:50:21 +00:00
Steve Baker a72289fbe7 Remove rootwrap rule for dnsmasq systemctl
The systemd service named openstack-ironic-inspector-dnsmasq is a name
which was only ever used by TripleO and hasn't been used since before
Train when the services were containerized and the dnsmasq process
management was no longer handled by inspector at all.

This change removes this rootwrap rule as unused for some years. Any
configuration tool which is setting
[dnsmasq_pxe_filter]dnsmasq_start_command also needs to be writing an
appropriate rootwrap.d file, as the inspector devstack plugin does.

Change-Id: I38974faa8897daabf88ff63402d42a3ef93e675c
2022-01-14 20:23:33 +00:00
Julia Kreger 55e47c630b Return a content-length on HTTP204 to prevent client failures
It turns out that eventlet has been injecting a
``Transfer-Encoding`` header as of recent into WSGI application
response headers. The result of this ultimately depends on how
the HTTP client which is passing the request to the server is
written to handle data.

Apache, for example, will return that an invalid response was
received. In part because it sees the request end, with an HTTP
204 response code, but also an encoding indicating there is
a multipart body encoding inbound. Which is confusing.

Other C based HTTP clients can have any number of reactions up to
and including disconnecting sessions. Curl, depending on the
headers present either returns success but notes body weirdness
or actually returns return code 18.

Python-Requests kind of has it a little worse, and we see this
with clients. With it, it tries to prepare a respones content
body based upon the presence of the header indicating there is
a body. But it blows up thinking there is more data to read on
the socket when there is not more data to read.

Regardless, all of this is an RFC7230 violation.

Neither Content-Length nor Transfer-Encoding should be on an HTTP
204 response. However, Content-Length is the lesser evil, and we
have a similar endpoing in Ironic which *does* explicitly get
returned with a zero length content-length, and does not
demonstrate such issues.

As such, in the interest of the lesser evils until Eventlet's evil
ways of header injection are remedied, we're explicitly going to
force a Content-Length header to be sent indicating a zero length
response.

For more information, please see: https://github.com/eventlet/eventlet/issues/746

Change-Id: I014cc65c79222f4d4d7c2b6ff11a76e56659340c
2022-01-13 11:55:42 -08:00
Zuul e3f58e4567 Merge "Add support for state selector in the list introspection" 2021-12-08 15:31:15 +00:00
Riccardo Pittau 643d1e0199 [trivial] Fix Xena release notes versions
Change-Id: I3fcc7b473629803e57fb379a1946ca088f3d88e4
2021-12-06 10:42:27 +01:00
Tadeas Kot ff93c7799f Add support for state selector in the list introspection
This commit add support for state selector to the list introspection.

* ``GET /v1/introspection?state=[starting, waiting, processing,
                                 finished, error, reapplying,
				 enrolling]``

Story: 1625183
Task: 11350
Change-Id: I2c5222110487a08a4e7b1efbcbc5dc3d552fae3e
2021-09-27 14:03:58 +02:00
OpenStack Release Bot 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
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
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
Zuul 21105e9dc5 Merge "Do not reset FSM when ironic ports cant be queried" 2021-07-30 14:28:11 +00: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
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
Arne Wiebalck 11e5798233 Add versions to Wallaby release notes
Change-Id: I9bcdda75b16e83b6d2246448d38b83e37ecf2750
2021-06-04 08:17:17 +02:00
OpenStack Release Bot 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
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