12687 Commits

Author SHA1 Message Date
Julia Kreger
c901b15f6c RBAC: Fix allocation check
The tl;dr, is when the allocation owner support was added,
it was done so to try and use the same exception
being raised for two distinct cases. An invalid request,
and a mismatch. The reality is, we should be raising them
separately because there are two different cases we need
to guard against.

This was discovered when changing Ironic's default RBAC
policy enforcement so that the legacy policy is no longer
enabled, which meant the default path on the owner logic was
thus triggered, resulting in the failure and need to fix it.

Closes-Bug: #2048698
Change-Id: I0feefc273a2d18e7812139f59df3f43aba7d7936
2024-01-08 16:46:53 -08:00
Julia Kreger
c3074524da Fix system scoped manageable node network failure
Before this change, if a user requested a node to be cleaned
or "managed" with cleaning enabled when the user is in the
system scope, Ironic would attempt to user's token to
make the request to Neutron.

This, unfortunately, does not work, as the neutron client explicitly
requires a project ID to make the request to Neutron. As a result,
Ironic now falls back to it's internal credential configuration to make
the forward request, which matches the behavior if a node has been
unprovisioned and the cleaning has been started automatically.

Closes-Bug: 2048416
Change-Id: Id91ec6afcf89642fb3069918e768016b8b657a31
2024-01-08 10:22:04 -08:00
Zuul
ff4e836c55 Merge "Add the setting of memcached servers to keystone_authtoken" 2023-11-12 20:14:50 +00:00
Zuul
266f991a13 Merge "Make sqlalchemy-2x job voting again" 2023-11-12 08:31:12 +00:00
Zuul
dbd8cf7d1b Merge "Fix unit tests broken by olso.utils" 2023-11-09 22:04:04 +00:00
Takashi Kajinami
f42b359bd9 Make sqlalchemy-2x job voting again
... because the new oslo.utils version is now used in CI.

Depends-on: https://review.opendev.org/c/openstack/requirements/+/900517
Related-Bug: #2042886
Change-Id: I855103c5ee17db3c690397e3db78139f3264735c
2023-11-10 00:45:02 +09:00
Takashi Kajinami
fa8df69194 Fix unit tests broken by olso.utils
Some of the object unit tests grub Mock object unintentionally, and
that results in failure during initializing an versioned object,
because the Mock object does not present its version correctly.

This fixes that problem.

The sqlalchemy-2x job is made non-voting because this job requires
oslo.utils 6.3.0 which is blocked by this problem.

Closes-Bug: #2043116
Related-Bug: #2042886
Change-Id: I1a622ab9c766d46b7eb4442848e91f25b26f6c61
2023-11-10 00:41:20 +09:00
Jay Faulkner
b9baf7dbc8 eventlet monkey patch in unit tests earlier
It's important for consistent behavior to monkey_patch eventlet
before importing anything. While it makes an attempt to green any
existing created objects or locks, that code is buggy and fails
in some cases -- especially around rlocks.

It's not my belief that this resolves any specific bugs, but this
does reflect a better overall practice.

Change-Id: I57b2c91f9853287a08ee79ac87ae6e1767ddfb6f
2023-11-02 10:40:42 -07:00
Zuul
a2085aa1a6 Merge "Update devstack guide for image id; network always needed" 2023-11-01 15:11:04 +00:00
Zuul
570aa3c86b Merge "Remove outdated pysnmp reference" 2023-10-31 09:50:31 +00:00
Zuul
10ef80b5b7 Merge "Make sure we eject media from DVD when CD is requested" 2023-10-30 23:34:02 +00:00
Jay Faulkner
f6b4ad833e Remove outdated pysnmp reference
We don't use pysnmp anymore, and we likely won't update this doc
in the future if libraries change again.

Change-Id: If3a3bf02167f187a0e4f8f0d20a77621b5def3eb
2023-10-30 17:05:00 +00:00
Jay Faulkner
8154c0a9f7 Update devstack guide for image id; network always needed
DEFAULT_IMAGE_NAME no longer exists in devstack; also our config
now always leads to multiple networks being created, so remove
the fork in the instructions.

Change-Id: I1b3e134c4d5a9633028af367e89ecc44699561cb
2023-10-27 14:03:50 -07:00
Zuul
341f80e24d Merge "Add inspection hooks" 2023-10-20 17:51:08 +00:00
Zuul
f9a93c503d Merge "Reset parent_node values to uuids instead of names" 2023-10-18 22:29:41 +00:00
Zuul
5b1e347eb1 Merge "CI: Fix our internal MTU settings" 2023-10-18 06:43:05 +00:00
Mahnoor Asghar
c3ee90ddac Add inspection hooks
Adds the 'local-link-connection' and 'parse-lldp' inspection hooks in
the agent inspect interface for processing data received from the
ramdisk at the /v1/continue_inspection endpoint.

Change-Id: I540f03b961b858e8fc00cd4abbc905faa8f0c6c5
Story: #2010275
2023-10-17 09:31:33 -02:00
Taketani Ryo
679176ab56 Add the setting of memcached servers to keystone_authtoken
In-process token cache is deprecated since 4.2.0 release
and may be removed. Add the setting of memcache for
the auth_token token cache.

Change-Id: I23ad1d9fb1b33160452ab353972fa1274cde363d
2023-10-16 09:25:17 +09:00
Iury Gregory Melo Ferreira
766d2804a1 Make sure we eject media from DVD when CD is requested
It's possible to use virtual media based provisioning on
servers that only support DVD MediaTypes and do not support CD
MediaTypes. The problem in this scenario is that Ironic will keep
the media attached since it will only eject the ones matching the
CD device, now we check if there is any DVD device with media inserted
when looking for CD devices.

Closes-Bug: 2039042
Change-Id: I7a5e871133300fea8a77ad5bfd9a0b045c24c201
2023-10-13 09:37:53 -03:00
Zuul
665f061755 Merge "Introduce conductor touch while offline" 2023-10-12 02:27:32 +00:00
Zuul
df5306ea7b Merge "Extract generic image publishing code from image_utils" 2023-10-11 09:56:32 +00:00
Zuul
51aaa37b72 Merge "Refactor publishing images into a new module" 2023-10-11 09:53:49 +00:00
Zuul
ce5cf57ae8 Merge "Add inspection hooks" 2023-10-11 09:47:07 +00:00
Zuul
b58f6d394e Merge "Enable OVN CI" 2023-10-10 16:01:15 +00:00
Dmitry Tantsur
2124d101de Extract generic image publishing code from image_utils
The new call prepare_remote_image contains the logic around
image_download_source, fetching images using a cache and publishing them
for further consumption. The code was extracted from _prepare_boot_iso,
which is now more straightforward.

Change-Id: I8567a10b77cdc3785686b79defcdafd75af53df0
2023-10-10 16:00:26 +02:00
Julia Kreger
d1ca14289e Reset parent_node values to uuids instead of names
So, I got myself nice and confused with testing parent_node logic
when I used a name, but the ironic internals are modeled around
queries involving UUID matching.

We now identify names, and reset the values to be a UUID.

Change-Id: I46ece586c254c58b80723bc905cad3144691fc5d
2023-10-10 13:06:42 +00:00
Zuul
33a471e7ac Merge "Add inspection hooks" 2023-10-10 08:12:32 +00:00
Dmitry Tantsur
124f6425ea Refactor publishing images into a new module
This change takes the first step in decomposing image_utils into more
manageable and reusable parts. The publishing bits there are coupled
with nodes and drivers. The new code is node-agnostic and features
a clean separation between Swift and local webserver code.

Change-Id: If95b46272abaeea314fd61bb50d2c40200386f98
2023-10-09 17:38:42 +02:00
Julia Kreger
40e825ba93 CI: Fix our internal MTU settings
Long story short, we auto-clamp down everything to 1400 bytes
due to VXLAN tunneling for multinode testing. But there are other
reasons to clamp it smaller, and we will need to clamp that further
for multinode should we mix it with OVN.

Anyway, this should make things cleaner and we should rely upon the
gate calcualted MTU as a starting place, not the guess based upon
interface list. i.e. test VM could be wrong but gate could know better.

Change-Id: I385679fe30d1447f1ed94cdf5a419e6acefbc595
2023-10-09 13:13:29 +00:00
Zuul
6261b73483 Merge "DB: Load only one instance for RPC interactions" 2023-10-09 00:44:44 +00:00
Zuul
7ea4de815c Merge "Add inspection hooks" 2023-10-08 22:21:32 +00:00
Zuul
99095ba2a3 Merge "Cleanup if images.fetch fails" 2023-10-08 22:14:19 +00:00
Zuul
c86208c1c7 Merge "Transiton to Storage resource from SimpleStorage" 2023-10-06 22:39:52 +00:00
Zuul
92ec97ca1b Merge "Remove traces of Docker from devstack dependencies" 2023-10-06 22:15:08 +00:00
Zuul
d0953ce0f4 Merge "grenade: convert neutron cli commands to openstack" 2023-10-06 19:05:42 +00:00
Zuul
a2917c7c90 Merge "[DOC] Add a little more clarity regarding parent/child nodes" 2023-10-06 15:46:55 +00:00
Steve Baker
9bd1e033fa grenade: convert neutron cli commands to openstack
Grenade is currently failing not finding the neutron command, we should
likely not be using it anyway since the deprecation message says it may
disappear after Z.

Change-Id: Ic24d59379bafcc5a630fe5c074fcc13303902965
2023-10-06 08:41:52 -07:00
Steve Baker
3f9151163e Introduce conductor touch while offline
This adds an `online` argument to the conductor touch methods so that
touch can be called with `online=False`. When called periodically this
allows the conductor `updated_at` to be within the threshold to avoid
locked nodes being failed as orphans by another conductor.

This will be used by drain shutdown (and graceful shutdown) so that
tasks can complete on existing locked nodes within the shutdown timeout,
while the conductor is also removed from the hash ring so new tasks are
not started on that conductor.

This change introduces the api but the existing behaviour won't change
until BaseConductorManager.del_host() no longer calls keepalive_halt().

Change-Id: Iedd62193fac1009137b9ee47a6ef5a9a8576f261
2023-10-06 10:42:53 +13:00
Zuul
9118440577 Merge "Bump workers_pool_size to 300 and remove queueing of tasks" 2023-10-05 15:02:15 +00:00
Dmitry Tantsur
224cdd726c Bump workers_pool_size to 300 and remove queueing of tasks
Especially in a single-conductor environment, the number of threads
should be larger than max_concurrent_deploy, otherwise the latter cannot
be reached in practice or will cause issues with heartbeats.

On the other hand, this change fixes an issue with how we use futurist.
Due to a misunderstanding, we ended up setting the workers pool size to
100 and then also allowing 100 more requests to be queued.

To be it shortly, this change moves from 100 threads + 100 queued to
300 threads and no queue.

Partial-Bug: #2038438
Change-Id: I1aeeda89a8925fbbc2dae752742f0be4bc23bee0
2023-10-05 08:51:51 +02:00
Zuul
9d4707e255 Merge "api-ref for nodes/{node_ident}/firmware" 2023-10-03 14:58:02 +00:00
Julia Kreger
3f77091c63 Enable OVN CI
Adds basic testing for PXE/iPXE boot secenarios where the OVN
DHCP service is used instead of dnsmasq.

Also adds a release note and documentation to cover the details
and caveats of using ovn as we have discovered through this process.

Change-Id: I28cd20a7f271220d8ca335895ca9e302452fd069
2023-10-03 14:24:34 +00:00
Zuul
e70981cf37 Merge "Do not store ramdisk logs as part of the inventory" 2023-10-03 10:11:27 +00:00
Zuul
62f27a4cf2 Merge "Fix the HTTP code for reaching max_concurrent_deploy: 503 instead of 500" 2023-10-03 10:00:40 +00:00
Zuul
7520fe8093 Merge "Support port name: API" 2023-10-03 05:10:14 +00:00
Dmitry Tantsur
cba10669f5 Fix the HTTP code for reaching max_concurrent_deploy: 503 instead of 500
Change-Id: I3d8c7724c1d44baa67a6364dde2f52abdb906526
2023-10-02 16:13:15 +02:00
Zuul
ab6fd39925 Merge "Kickstart: Don't error unit tests ksvalidate is present" 2023-10-01 22:30:25 +00:00
Iury Gregory Melo Ferreira
6c8a04e8f0 api-ref for nodes/{node_ident}/firmware
Change-Id: Ica87a7f4bc3a2cce679155200452d7b915d3f0f5
2023-09-29 14:51:10 -03:00
Dmitry Tantsur
56cbe2569d Do not store ramdisk logs as part of the inventory
They are huge, may expose sensitive data and are normally stored in
local files instead. Match the inspector behavior and drop logs.

Change-Id: I569ef8c7f9d78a7a65c48b6b46c12493c5c571c3
2023-09-29 15:41:14 +02:00
OpenStack Proposal Bot
db549850e0 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ic59ac600efb738d26a2f38186dcc9272e349e5c7
2023-09-28 04:05:55 +00:00