12309 Commits

Author SHA1 Message Date
Julia Kreger
bcf6c12269 Clean out agent token even if power is already off
While investigating a very curious report, I discovered that
if somehow the power was *already* turned off to a node, say
through an incorrect BMC *or* human action, and Ironic were
to pick it up (as it does by default, because it checks before
applying the power state, then it would not wipe the token
information, preventing the agent from connecting on the next
action/attempt/operation.

We now remove the token on all calls to conductor
utilities node_power_action method when appropriate, even
if no other work is required.

Change-Id: Ie89e8be9ad2887467f277772445d4bef79fa5ea1
2023-03-02 15:02:23 +00:00
Zuul
75c05be8a7 Merge "Fix expired links" 2023-02-28 15:28:39 +00:00
Zuul
d15d81fc52 Merge "Add configurable delays to the fake drivers" 2023-02-27 23:39:47 +00:00
Zuul
cf43fa4e3c Merge "Get conductor metric data" 2023-02-27 17:24:15 +00:00
Zuul
eb03345006 Merge "Add a comment about node sharding to API versions" 2023-02-24 20:20:33 +00:00
Jakub Jelinek
3eb242a0ed Add a comment about node sharding to API versions
Follow-up to I385594339028c20cfc83fdcc4cbbec107efdacff

Story: 2010378
Task: 46624
Change-Id: I95f3caaaf3fd92d60ce39b5803747728f65bbc17
2023-02-24 16:40:15 +00:00
Julia Kreger
82b8ec7a39 Get conductor metric data
This change adds the capability for the ironic-conductor
and standalone service process to transmit timer and counter
metrics to the message bus notifier which may be consumed by
a ceilometer, ironic-prometheus-exporter, or other consumer of
metrics event data on to the message bus.

This functionality is not presently supported on dedicated API
services such as those running as an ``ironic-api`` application
process, or Ironic WSGI application. This is due to the lack of
an internal trigger mechanism to transmit the data in a metrics
update to the message bus and/or notifier plugin.

This change requires ironic-lib 5.4.0 to collect and ship metrics via
the message bus.

Depends-On: https://review.opendev.org/c/openstack/ironic-lib/+/865311
Change-Id: If6941f970241a22d96e06d88365f76edc4683364
2023-02-23 11:39:07 -08:00
Zuul
39ca54712a Merge "Set lockutils default logging" 2023-02-23 11:23:37 +00:00
Zuul
222a62e76c Merge "Relaxing console pid looking" 2023-02-23 04:40:38 +00:00
Zuul
3231983b8d Merge "fix inspectwait logic" 2023-02-23 02:12:11 +00:00
renliang17
f2ad1b8a49 Fix expired links
update the address for
https://e.huawei.com/en/products/computing/kunpeng/accessories/ibmc

Change-Id: I7c1ea261b44e2ff7f399942796e54a9277a9b1d5
2023-02-21 07:53:42 +00:00
Julia Kreger
e32d1ac7a2 Set lockutils default logging
While developing some internal metrics collection capability,
and the realization that a lock was needed, we realized that
the lock activity itself would be a bit noisy. And image actions
also get lock logging, and it is just really noisy, but not super
helpful for troubleshooting.

So, set it to WARNING instead.

Discussion wise, see:
https://review.opendev.org/c/openstack/ironic-lib/+/865311

Change-Id: I3ab14ee5b5cc063784d26e3c760f1422c692060d
2023-02-20 10:08:27 -08:00
Zuul
8f25cf03a3 Merge "Add release note for node sharding" 2023-02-20 17:15:43 +00:00
Zuul
61f841d201 Merge "Make metrics names a little more consistent" 2023-02-20 15:27:30 +00:00
Zuul
3707422bf7 Merge "Fixes console port conflict occurs in certain path" 2023-02-20 15:27:21 +00:00
Zuul
c130d063b6 Merge "Use association_proxy for port groups node_uuid" 2023-02-19 13:54:58 +00:00
Zuul
381a0eac42 Merge "Fix Inventory DB" 2023-02-17 21:14:27 +00:00
Jay Faulkner
1b2a35afdf Add release note for node sharding
Release note covers changes in the previous 4 commits in this chain.

Change-Id: I5388e82e958acd930295215c9f9427080650866d
2023-02-17 09:38:20 -08:00
Zuul
67ba0b892f Merge "Indicate maintenance mode" 2023-02-17 13:53:22 +00:00
Jakub Jelinek
9d3d16b791 Fix Inventory DB
Follow-up to I6b830e5cc30f1fa1f1900e7c45e6f246fa1ec51c
Original changa introduced some errors such as mismatched
arguments for exceptions

Story: 2010275
Task: 46204
Change-Id: I550e048ab22a6cd25502b41d1c579819df369249
2023-02-16 15:39:45 +00:00
Jakub Jelinek
25718f5fcf Indicate maintenance mode
Follow-up to I74b19f7a42c1326d7ec04e6320176e81639ebfb4
Mention need of the maintenance mode to orphan swift
objects during node clean up

Story: 2010275
Task: 46204
Change-Id: Ie95a5bd333b0dab3e97254dfb4eb532bdbfd2650
2023-02-16 11:15:35 +00:00
Zuul
8d2d0bfc8b Merge "Minor spelling/grammar fixes for release docs" 2023-02-15 19:27:46 +00:00
Zuul
efadc9ed40 Merge "Fix debug log message argument formatting" 2023-02-15 19:27:42 +00:00
Julia Kreger
92eefc9d63 fix inspectwait logic
The tl;dr is that we changed ``inspecting`` to include a
``inspect wait`` state. Unfortunately we never spotted the logic
inside of the db API. We never spotted it because our testing in
inspection code uses a mocked task manager... and we *really* don't
have intense db testing because we expect the objects and higher
level interactions to validate the lowest db level.

Unfortunately, because of the out of band inspection workflow,
we have to cover both cases in terms of what the starting state
and ending state could be, but we've added tests to
validate this is handled as we expect.

Change-Id: Icccbc6d65531e460c55555e021bf81d362f5fc8b
2023-02-15 18:59:56 +00:00
Kaifeng Wang
c9c9b3100d Fixes console port conflict occurs in certain path
The dynamically allocated console port for a node is saved
into database and reused on subsequent console operations.
In certain code path the port record cann't be trusted and
we should do a re-allocation.

This patch fixes the issue by ignores previous allocation
record. The extra cleanup in the takeover is not required
anymore and removed as well.

Change-Id: I1a07ea9b30a2c760af7a6a4e39f3ff227df28fff
Story: 2010489
Task: 47061
2023-02-15 17:42:37 +00:00
Kaifeng Wang
88c4271a70 Relaxing console pid looking
Recently we hit an issue that the pid file is missing, current logic
simply removes pid file if the corresponding process is not found,
but if the pid file is lost then the console could never be stopped
and futher more, be restarted, regardless if the process is there or
not.
This patch captures FileNotFound to the exception handling to allow
console recovery.

Change-Id: I1a0b8347e960c6cff8aca10a22c67b710f7d617e
2023-02-15 17:32:23 +00:00
Zuul
c4997e0137 Merge "Add support for filtering for sharded nodes" 2023-02-14 21:28:18 +00:00
Zuul
e8888aa9ae Merge "Erase swift inventory entry on node deletion" 2023-02-14 18:39:57 +00:00
Jakub Jelinek
bc921118b1 Erase swift inventory entry on node deletion
Follow-up to Ie174904420691be64ce6ca10bca3231f45a5bc58
which enables storage of inventory in Swift, but does not delete
the Swift entry when the node whose inventory is stored is deleted

Story: 2010275
Task: 46204
Change-Id: I74b19f7a42c1326d7ec04e6320176e81639ebfb4
2023-02-14 10:58:05 +00:00
Zuul
eab0f73ff3 Merge "Allow port queries by shard list" 2023-02-14 02:12:24 +00:00
Zuul
577f46cfc4 Merge "API support for CRUD node.shard" 2023-02-14 00:27:56 +00:00
Zuul
e7a9dab2e7 Merge "DB & Object layer for node.shard" 2023-02-14 00:26:10 +00:00
Zuul
514d4c6bd8 Merge "[DOC] Set cleaning requirement with retirement" 2023-02-13 20:46:07 +00:00
Jay Faulkner
8e34d622af API support for CRUD node.shard
- Basic support and testing for CRUD for node.shard.
- Policy checking for update node.shard.
- New API endpoint: GET /v1/shards
- Policy checking for GET /v1/shards
- Support for querying for nodes in a list of shards

Story: 2010378
Task: 46624
Change-Id: I385594339028c20cfc83fdcc4cbbec107efdacff
2023-02-13 11:46:21 -08:00
Jay Faulkner
a0c1fd8888 Add support for filtering for sharded nodes
This request parameter will allow an operator to ask the question
"Do I need to assign shards to any of my nodes?".

Change-Id: I26b745e5ef2b320a8d8a0667ac61c080fcdcd576
2023-02-13 11:46:21 -08:00
Jay Faulkner
28167f18f8 Allow port queries by shard list
Adds ability to query ports by shard.

Example usage: /v1/ports?shard=lol,cats

Change-Id: Icacef7f71414d30f492a6d144bcc89dff4891784
2023-02-13 11:46:21 -08:00
Jay Faulkner
36ef217fdb DB & Object layer for node.shard
DB and object implementations for new node.shard key.

Story: 2010768
Task: 46624
Change-Id: Ia7ef3cffc321c93501b1cc5185972a4ac1dcb212
2023-02-13 11:46:21 -08:00
Zuul
a66208f24b Merge "Fix API docs to document port filtering behavior" 2023-02-13 01:20:24 +00:00
OpenStack Proposal Bot
1976b829b4 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I2f70fbaeab4b1bdf3b9104887534f0e7bcc0d337
2023-02-04 03:52:48 +00:00
Zuul
4704c74b4d Merge "Fix snmp driver sleep call count" 2023-02-01 23:07:47 +00:00
Jonathan Rosser
2929bcd528 Fix debug log message argument formatting
The format string is expecting a dictionary with keys matching
those used in the format string. Any unused parameters will
cause an "not all arguments converted during string formatting"
exception.

The quote style is also changed from double to single quotes to
match the other logging statements in the code.

Change-Id: Ic9dea4f51d82866be8ac16242a79237c789b9745
2023-02-01 15:37:11 +00:00
Zuul
c9c595f235 Merge "Add service role RBAC policy support" 2023-01-31 21:54:19 +00:00
Zuul
f2ebea05f2 Merge "Bump cirros to version 0.6.1" 2023-01-31 19:35:32 +00:00
Jay Faulkner
7c89e7e4ec Fix API docs to document port filtering behavior
Ports cannot be filtered by node, node_uuid, or portgroup at the same
time as other potential filters. Explicitly document this.

Change-Id: Ia875a6543eb8871ce70028c055de2f1832c3ecdb
2023-01-30 14:13:39 -08:00
OpenStack Proposal Bot
4e8705dc9f Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ic09d2611553534416d94343c16fbd5b5168be883
2023-01-28 04:19:19 +00:00
Zuul
e73c3c9c22 Merge "Fix grub config path default" 21.3.0 2023-01-27 22:09:15 +00:00
Julia Kreger
6ea38a47c5 [DOC] Set cleaning requirement with retirement
Per discussion in IRC, the retirement documentation sets forth
an understanding that sensitive data will be removed from the
baremetal node, however this is performed through cleaning which
inherently sets forth a requirement in automated cleaning.

Explicitly note, and provide options should an operator wish
to utilize the feature.

Change-Id: I6755433b97cacd6ebf6a8f7eb5b404697e0a4349
2023-01-27 10:08:52 -08:00
Zuul
c741be6628 Merge "Move and fix reno config for releasenotes job" 2023-01-27 17:53:31 +00:00
Jay Faulkner
fbe22b23bc Move and fix reno config for releasenotes job
In its current place, reno config changes will not cause
build-openstack-releasenotes job to run, which means changes can land to
that config without being tested. Yikes!

Also fixes error in regexp which was preventing this from actually
fixing the build-openstack-releasenotes job.

Change-Id: I4d46ba06ada1afb5fd1c63db5850a1983e502a6c
2023-01-26 15:52:27 -08:00
Julia Kreger
692a383fdc [CI] Swap anaconda urls
The anaconda job is failing as were getting a redirect issued back
upon attempting to validate URLs. The servers are now directing us
to use HTTPS instead.

Change-Id: Iac8e6e58653ac616250f4ce3ab3ae7f5164e5b03
2023-01-26 13:58:12 -08:00