There will be no image when the instance boots from volume. In the
future there could be a fallback to fetch the metadata from the volume
but for now just return None for boot mode and secure boot.
Change-Id: I00576ee19571bd91683fd6c1754e0624e469b2c9
Third in a series of commits to add Codespell to Ironic Repos. This commit adds the Tox Target to CI
A future commit could potentially add a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame.
Change-Id: I384db875eb9090e9d9e711af3479021bdbed5a26
Second in a series of commits to add Codespell to Ironic Repos. This one adds the command that was used to fix the spelling errors.
Future Commits will add CI support and potentially a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame.
Change-Id: I3ab0d3acd2e008038605ea0fbfc4b199b312a6e5
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: I563e316ba9955766e28d9cec702387fac472c414
These translation sections are not needed anymore, Babel can generate
translation files without them.
Change-Id: Ief444d81e6a70960d40463568ab608c0991eba61
Werkzeug>=2.3.0 introduced a logic to detect incorrect Content-Type and
now returns 415 instead of 400 if an application tries to load request
body as json but Content-Type is not `application/json`.
This fixes the unit test broken by that change.
Change-Id: I3470813661be312eac7bbead91af7913aa15ac9d
* "full" is the default and provides all features
* "minimum" only provides boot settings
* "vmedia" is "minimum" plus virtual media and NICs
Closes-Bug: #2046153
Change-Id: I57cff90b1327104f65264d3fb87dafc89f3be521
VirtualMedia on Managers is deprecated, so make System the primary
source while keeping compatibility.
Change-Id: I933d0d5c9f78109f46eb314bef05cc8d653d7137
When libvirtd is started as a non-root user it does not have access to
folder /var/lib/libvirt. By default, libvirtd in session daemon mode
creates a nvram file at path ~/.config/libvirt/qemu/nvram/\
[DOMAIN]_VARS[EXT] instead [0],[1].
Querying the nvram path in session daemon mode is difficult because
libvirtd does not expose it nor $HOME of the user that runs the daemon.
As a workaround, this change will let libvirtd create the nvram file
path if it has not been previously defined [2]. However, if it had been
defined earlier then the path will be changed to enforce regenerating
it from the template.
[0] 2b148748c2/src/qemu/qemu_conf.c (L203)
[1] 2b148748c2/src/qemu/qemu_firmware.c (L1124)
[2] 2b148748c2/src/qemu/qemu_firmware.c (L1065)
Change-Id: Id78101f5c1f5fdf4b365d2d270dbde8877b05dbf
This is an alternative to https://review.opendev.org/c/openstack/sushy-tools/+/902015
The tl;dr is we can leak the uuid out in some weird cases and
while things will just keep working, some methods internally
really just want a UUID and not a name. The other patch
is the name fix.
This, explicitly uses a UUID for httpboot, in the event
it is still happilly working with a name up until that point.
Change-Id: I52121f7e6148aaa3739bc9900b4480b7b3dff8fc
In trying to test the Redfish UEFI Http interface logic, it was
observed that we were not getting the values out of the emulator we
expected. So this change simplifies the logic which wasn't quite
working for us.
We also realized the code was trying to set the boot interface before
actually creating it. Doh!
It seems, also I might have had some other issues in the original patch
which we couldn't detect without fully getting everything working, so
some additional refactoring exists with this patch.
Change-Id: Ibfe5a560a25251965e8bad87012f64e89d9640be
Maps the HttpBootUri to the virtual media functionality, so we can
leverage sushy-tools for testing HttpBootUri functionality.
Change-Id: I51a7e684bafdb6b3aa9adda35ae438c747c9847a
Currently we don't have the BiosVersion information when
we query the System resource in sushy-tools, this cause
problems when checking the information with Firmware Interface
Change-Id: I8b5bf1387f32bd4d4bd91d3211782d900320b319
Add a driver to provide a limited emulated redfish
API to ironic nodes. This would be needed in cases
where a redfish compatible endpoint is needed but
but don't have direct access to the BMC (you only
have access via Ironic) or the BMC doesn't support
redfish.
Change-Id: I9a3f6a178978ef25efe5129d8bf5f94e031d9751
As these files are in /tmp the can be garbage collected
causing a FileNotFoundError. As it is trying to remove
the file anyway there is no reason to propogate this
error as the end result is the same.
Change-Id: If44be26e3fba70b89aec6ba88743d740276e7560
get_xml_desc (unless dump_sensitive=False) requires a read-write libvirt
connection.
set_boot_mode was calling this using a read-only connection.
Related to: I562e19a4290df64010ef59f6c5d9f49aeb09a693
Story: 2010575
Task: 47322
Change-Id: I60a8a8b5678e548541c05ea1066032a338013aff
Assuming that sushy_tool ignores "BootSourceOverrideEnabled": "Once" for
libvirt backend, we define a new boot device permanently. And if the pxe
server does not reply after the first successful provision, we just get a
vm which doesn't manage to boot after provision because netboot is the only
option and no reply from pxe.
This patch adds two additional lists of previously configured boot hard drives
for the vm at the end of the boot order. The first list is for the os section
If it is defined, it just adds all hard drives to the list. The second list is
for the actual drive section with the boot directive.
Tried to save script logic as much as possible. But it might be reasonable to
pass one additional argument to the set_boot_device function to do such
altering when "BootSourceOverrideEnabled" is defined and has "Once" as a value
Added testcase to verify boot order definition
Change-Id: I0abcab9ccbffcc9b06382b0e6d335edd20db25bf
Remove skipsdist that it was never supported and causes breakage
when used with usedevelop.
Also move to generic openstack test template.
Change-Id: Ie231aa8f574f882bb3879efcda2363a012e67caf
This change adds a basic SecureBoot endpoint to the emulator which
returns the actual secure boot enabled status.
The fake and libvirt drivers supports setting the secure boot.
OVMF paths have aligned on /usr/share/OVMF/ since this is supported by
Red Hat and Debian family distros. Default and example firmware loader
is now OVMF_CODE.secboot.fd since this exists on all distros and is
known to work with both secure boot enabled and disabled on some
distros.
Change-Id: Icb85710d81c656da6853d67f5e1c6a8609abc1cf
Sushy-tools is a CI/development tool, for CI uses. It should not be run
in production.
Story: #2010382
Task: #46664
Change-Id: If90a38913f762ca4dc4f7b321b6b1e61db95105e
When setting parameters revolving around boot
mode, options, firmware, it is necessary to
extract and edit the XML document.
Some details, however, are not automatically
extracted and libvirt must be told to provide
secure information. This change prevents us
from accidently loosing such configuration
parameters
Story: 2010382
Task: 46652
Change-Id: I562e19a4290df64010ef59f6c5d9f49aeb09a693
This property is not required, but it would be nice to have it
along with existing Systems, Managers, Registers.
Story: 2010059
Task: 45509
Change-Id: I4c7c7b63e9e30f3dc5aecc4b83e015c3621cb3d3
Version 2.2.0 of Werkzeug brings a fix for an issue [1] related to
discarding trailing slash that modifies redirect behavior for
branches, effectively applying strict_slashes rule.
[1] https://github.com/pallets/werkzeug/issues/1074
Change-Id: Id08668d943be0ff94a191a1f06ba93eecbf74eb5
For some reason a get request on a root fails if the url does not
end with a trailing slash.
This started happening since Werkzeug version 2.2.0 [1].
This is NOT a proper fix but a workaround that can be merged to unblock
the CI.
[1] https://werkzeug.palletsprojects.com/en/2.2.x/changes/#version-2-2-0
Change-Id: I53ba35471bbbe4e08f5aa6144a58d72b83bc2de0
Maintaining support for older not supported in Zed Python versions
would take too much effort with a lot of libraries dropping
compatibility with 3.6 and 3.7
Change-Id: I24a8806012dea6fe379aa49fe061f1c6a2243a86
The current logic breaks when sushy-tools tries to mount virtual media to an arm64/aarch64 libvirt vm.
This is because by default it tries to connect and ide controller, and the only controller option for arm is scsi.
This patch ensures that aarch64 type vms will always get a scsi controller.
Story: 2009962
Task: 44940
Change-Id: Ib7c3267f401355cf045954e71fe7297b484508be