11763 Commits

Author SHA1 Message Date
Dmitry Tantsur
9a6f2d101b All-in-one Ironic service with a local RPC bus
This adds a new executable /usr/bin/ironic (cool that we no longer have
a CLI with this name) that starts API and conductor together in the same
process. When an RPC host name matches the current one, the call is not
routed through the remote RPC, a local function call is done instead.

Story: #2009676
Task: #43953
Change-Id: I51bf7226aea145dc7c8fd93d61caa233ca16c9c9
2021-12-07 09:31:12 +01:00
Dmitry Tantsur
3f990beb97 Refactor common configuration bits from service commands
The prepare_service call from ironic.common.service is changed to also
configure guru meditation and profiler. A new call prepare_command is
provided for the cases it's not required.

Change-Id: I5b9b7b7bc827c8bcda06e9a967deae8577ad87f4
2021-12-01 12:19:33 +01:00
Zuul
04c45f88a5 Merge "Remove default option from create iso image" 2021-11-26 13:56:25 +00:00
Zuul
9dfb7a927f Merge "Add a unit test job with Sushy from source" 2021-11-26 11:26:48 +00:00
Zuul
9b6b491552 Merge "Do not assume sushy constants are strings - part 2" 2021-11-26 11:25:49 +00:00
Zuul
ae2dc84cb4 Merge "Add an option to create inspector-compatible boot.ipxe" 2021-11-26 10:55:50 +00:00
Riccardo Pittau
7ca27601d6 Remove default option from create iso image
THe -cache-inodes is already default on UNIX like operating systems and
it's not safe on other systems that do not have unique inode numbers.

Change-Id: I90b77b3a2056a7e627351d2d9e824def868a7b8b
2021-11-25 15:27:50 +01:00
Zuul
6f551d0a33 Merge "Enable iPXE boot interface by default" 2021-11-25 12:11:42 +00:00
Dmitry Tantsur
028448afe4 Add a unit test job with Sushy from source
The final goal is to run it on sushy itself to make sure there are
no regressions.

Change-Id: I6f4bee9a3fa439b1477c41c82304652a801ea55e
2021-11-25 10:00:03 +01:00
Dmitry Tantsur
2ddd8ef2ca Do not assume sushy constants are strings - part 2
Change-Id: I42a314dd4d338b169fc5fb9be375ef004e153eac
2021-11-25 09:58:54 +01:00
Ghanshyam Mann
ccb46fefd9 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: Ie527ea6ed8820c3f9dcca5c875c428288070263b
2021-11-24 19:50:50 -06:00
Zuul
5d5d3e8c16 Merge "Clarify driver load error message" 2021-11-24 11:00:39 +00:00
Julia Kreger
fdc6424de3 Clarify driver load error message
The NoValidDefaultForInterface exception is a little misleading
in that if one doesn't have the base interface enabled, and they
attempt to enable a hardware type which requires or only supports
disabled interfaces, they will also get an exeption. The reality
is we need to suggest for them to look at enabling the interfaces
before looking at the default interface overrides, because logically
the brain jumps to setting a default before checking the interface
settings.

Change-Id: I50d4381e11da96cb7ae0ee8cbda18534380bd471
2021-11-23 20:40:51 +00:00
Zuul
7f9ad55f62 Merge "Enable Redfish by default" 2021-11-23 17:48:41 +00:00
Zuul
f988c48aea Merge "Add platform:rpm shim, grub packages to bindep" 2021-11-23 12:26:13 +00:00
Zuul
ddcddf83b2 Merge "Create node get_interface method" 2021-11-22 23:28:26 +00:00
Zuul
e32eb9f92a Merge "Use default test dir" 2021-11-22 22:10:34 +00:00
Zuul
9bbe55cd19 Merge "Fix some of the SRBAC tests" 2021-11-22 21:40:32 +00:00
Zuul
05f02beb05 Merge "Stop relying on explicit values of Redfish constants" 2021-11-22 17:50:33 +00:00
Julia Kreger
350c2f7a50 CI: Fix devstack plugin with RBAC changes
Changes a neutron call to be project scoped as system
scoped can't create a resource and, and removes the unset
which no longer makes sense now that
I86ffa9cd52454f1c1c72d29b3a0e0caa3e44b829
has merged removing the legacy vars from devstack.

Also renames intenral use setting of OS_CLOUD to IRONIC_OS_CLOUD
as some services were still working with system scope or some sort
of mixed state occuring previously as some of the environment variables
were present still, however they have been removed from devstack.

This change *does* explicitly set an OS_CLOUD variable as well on
the base ironic job. This is because things like grenade for Xena
will expect the variable to be present.

Depends-On: https://review.opendev.org/c/openstack/devstack/+/818449
Change-Id: I912527d7396a9c6d8ee7e90f0c3fd84461d443c1
2021-11-19 08:22:22 -08:00
Riccardo Pittau
47b98d44c5 Use default test dir
The test dir is already defined in .stestr.conf

Change-Id: I0d620ac5e9f7eeaae86243a9235f431a9114804b
2021-11-19 10:39:41 +01:00
Julia Kreger
a249c025df Fix some of the SRBAC tests
In all of the copying/pasting/repeating, some misalignments between
labels/parameters utilized for the RBAC tests occured.

Nothing serious, everything seems to be just fine.

Change-Id: Ib0ded5a53e586e10006b066241f4b4a92bb2c463
2021-11-18 08:23:28 -08:00
Zuul
f90b5a6c11 Merge "Reduce the number of small functions in pxe_utils" 2021-11-17 11:36:36 +00:00
Zuul
3625060943 Merge "[iRMC] Convert the type of irmc_port to int" 2021-11-16 04:26:50 +00:00
Dmitry Tantsur
dbc24610d9 Add an option to create inspector-compatible boot.ipxe
Currently the default boot.ipxe is not suitable for ironic-inspector
in a standalone configuration. This change adds a new option
[pxe]ipxe_fallback_script that makes boot.ipxe fall back to the provided
script.

Story: #2009294
Task: #43982
Change-Id: Id5547885e75beafb4423e9e2056c79c54b286275
2021-11-15 20:09:20 +01:00
Zuul
c590db6d53 Merge "[Trivial] Clarify conditions under which power recovery is attempted" 2021-11-15 18:52:28 +00:00
Dmitry Tantsur
545a222a04 Reduce the number of small functions in pxe_utils
This module contains a lot of trivial single-line functions that make
reading it unnecessarily complicated. This change removes some of them.

Change-Id: Ie26c011b5ed3cb406c5cc4e2f50bbbf622d3a8c8
2021-11-15 18:23:43 +01:00
Zuul
2ef65aa368 Merge "Fix RedfishManagement.get_mac_addresses and related functions" 2021-11-15 10:21:25 +00:00
Zuul
1ad973fdeb Merge "Add description to the mod_wsgi part" 2021-11-11 10:33:56 +00:00
Dmitry Tantsur
93fd147b6f Stop relying on explicit values of Redfish constants
There are a few places in unit tests where we rely on Redfish constants
having well-known values. Use constants themselves instead.

An even more problematic place is _set_boot_device: it relies on storing
Redfish constants in driver_internal_info. With the future switch to
enums, it will no longer be possible. Use Ironic constants and provide a
compatibility layer.

Change-Id: I8e075f808e013afd778dd7cdc0927fe339309b70
2021-11-10 12:25:43 +01:00
Zhou Hao
fc24275ba3 [iRMC] Convert the type of irmc_port to int
When using the node managed by the `irmc` hardware type,
if the port number of the bmc address is manually specified,
the following error will occur:

```
Value '443' is not supported for 'irmc_port'
```

However iRMC supports 80 and 443 ports, and default to 443.
The reason for this error is that the type of irmc_port is not converted to int.

Story: #2009671
Task: #43915

Signed-off-by: Zhou Hao <zhouhao@fujitsu.com>
Change-Id: I4e9274de09758fdb468382a7f88298a279f43e92
2021-11-10 14:51:57 +08:00
Dmitry Tantsur
815705bc7d Fix RedfishManagement.get_mac_addresses and related functions
RedfishManagement.get_mac_addresses has two problems:
* It returns a dict while the base class documents returning a list
* The dict's values are Redfish-specific values

This change fixes this function to return a list and significantly
simplifies the related create_ports_if_not_exists.

Change-Id: I329cabe04662d0d668d4c3e04ecede5b4fdec6c6
2021-11-09 18:00:35 +01:00
Zuul
188a3bbfc4 Merge "Avoid handling a deploy failure twice" 2021-11-09 15:12:52 +00:00
Tzu-Mainn Chen
16aad76a6f Create node get_interface method
A node's interface can be temporarily overriden in instance_info.
However, some parts of the Ironic code still used a node's interface
attribute directly. This change adds a node get_interface method
and updates various parts of the Ironic code to use it.

Change-Id: Ifdaa21383f71b501bccb6cf8fe80e5b34661b6ae
2021-11-08 21:25:40 +00:00
Dmitry Tantsur
5ab94f37f9 Enable iPXE boot interface by default
iPXE is the recommended boot method (when virtual media is not
available). Now that a pre-built binary is available for AARCH64, there
are very few reasons to use plain PXE over it.

Change-Id: Iedd70ac2ec0a59c531f5c811b4f5c65a2aafff4d
2021-11-08 12:24:27 +01: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
Arne Wiebalck
323344e07c [Trivial] Clarify conditions under which power recovery is attempted
Be more precise when describing the conditions for automatic
recovery from power failures ('maintenance type' is a term
we use nowhere else).

Change-Id: Iaf14c0fc73f8c97b9d8669485011966a650c21a8
2021-11-04 17:57:59 +01:00
Dmitry Tantsur
4f08938043 Avoid handling a deploy failure twice
In some cases we handle the same exception twice in a row: in agent_base
and in deployments.do_next_deploy_step. This change avoids it.

Also make deploy step error messages more uniform across the board.

Change-Id: Ic84c04118b1a85b10a761fc58796827583a5b086
2021-11-04 13:50:56 +01:00
Aija Jauntēva
b1d08ae805 Fix idrac-wsman deploy with existing non-BIOS jobs
As with WS-Man iDRAC API setting boot device requires creating BIOS
job and there can be only 1 open job per subsystem present in iDRAC,
there is validation to check that the job queue is empty before
continuing setting boot device. This does not work well for cases when
using autoupdatescheduler that creates `Repository Update` job that
stays Scheduled until executed and then followed by new Scheduled
`Repository Update` job.

This patch allows non-BIOS jobs to be present in the queue when setting
boot device. This will still fail for cases when there are BIOS jobs
present. In such cases should consider moving to idrac-redfish that
does not create BIOS or any other job to set boot device.

Story: 2009251
Task: 43437
Change-Id: I91e9ba3024a85897aeead21cede57464294b409b
2021-11-03 12:13:29 -04:00
Dmitry Tantsur
4bb7e53738 Document commands to leave WAIT states
Change-Id: I817c5cb0469af2cea8d6afd34d16909433716f43
2021-11-02 16:51:40 +01:00
Zuul
a40e4e0f35 Merge "There is no aim, we do deploy/manage baremetal." 2021-11-01 18:15:08 +00:00
Zuul
47b885fee8 Merge "Fix various issues in the anaconda deploy interface" 2021-10-28 16:35:55 +00:00
Han Guangyu
287425e159 Add description to the mod_wsgi part
According to the current document, people who do not understand the
relevant principles may think that "Configuring ironic-api behind
mod_wsgi" is necessary.

Indicate that mod_wsgi part is not necessary but recommended.

task: 43714
Change-Id: I405c483506f79a830e9378db3dd45c8c235a6817
2021-10-28 05:19:07 +00:00
Steve Baker
b2ef1051d7 Add platform:rpm shim, grub packages to bindep
These already exist for platform:dpkg

Change-Id: I074b5d3f338d908e6d028163d01f0863395ecbfe
2021-10-28 11:04:41 +13:00
Arun S A G
df99dea001 Fix various issues in the anaconda deploy interface
The kickstart template expects a dictionary with 'ks_options'
as the key. Instead build_kickstart_config_options function
returns a dict with keys 'liveimg_url', 'agent_token' and
'heartbeat_url'.

This change fixes this problem by returning a dictionary of
dict with 'ks_options' as key and the dictionary with
keys 'liveimg_url', 'agent_token' and heartbeat_url' as
value.

Fix a bug where the deploy() method of anaconda deploy
interface where it did not return states.DEPLOYWAIT instead
it returned 'None' which caused the instance to go straight to
'active' instead of 'wait call-back'.

Fix issues in the default kickstart template where heartbeat was
missing 'callback_url' parameter and the HTTP method should be
'POST' not 'PUT'.

Fix issues with automated cleaning when anaconda deploy interface
is used.

Anaconda deploy interface could not deploy tarballs as
the disk image sent to the anaconda interface via liveimg --url
kickstart command does not include any file extension. When
no file extension is present the kickstart command liveimg --url
assumes the disk is a mountable partiton image. We fix this
problem by enabling the user to specify file extensions using
a glance image property named 'disk_file_extension' on the OS
image.

Co-Authored-By: Ruby Loo <opensrloo@gmail.com>
Change-Id: I556f8c9efbc5ab0941513c3ecaa2aa3ca7f346ae
2021-10-27 10:42:25 -07:00
Dmitry Tantsur
0ca0383ba4 Trivial: do not stop None rpcserver
Change-Id: I58480afc9bc27fabf933c9c9d8be8e15aaba0ee8
2021-10-26 10:39:15 +02:00
Bernd Mueller
2ff7f553c0 changed code for memory burin vm-bytes, 75 to 75%
Signed-off-by: Bernd Mueller <mueller@b1-systems.de>
Change-Id: I05b03ff3678ee98c548f63d0df5adf4eebffe208
2021-10-25 11:47:39 +02:00
Han Guangyu
dc3fefe6a0 Add a description of stopping ironic-api.service
According to the original document, before configuring ironic-api
behind mod_wsgi and restarting the httpd service, the ironic-api
service has been started. The port has been monitored by
ironic-api.service, and the error "Apache fails to start, Address
already in use" will be reported when the httpd service is restarted.

Add a description of stopping and disabling the ironic-api service
before starting httpd service.

task: 43713
Change-Id: Idc965d80d0fbaa348453a94ae45318157b2c0d0c
2021-10-21 21:04:35 +08:00
Dmitry Tantsur
c1a067c145 Add Xena versions to release notes
Change-Id: I400f9f2c91b6a67ae8f6ef16ad6f5f67f40446f5
2021-10-19 15:37:55 +02:00
Zuul
c13e2d468d Merge "Remove redundant node_periodic tests" 2021-10-19 08:08:09 +00:00