a8b7b75e72abc88615c420b2e01022ecfa476fc3
Commit Graph

2619 Commits

This Branch
This Branch
All Branches
Author SHA1 Message Date
Doug Goldstein
57476cdf29 add pyproject.toml to support pip 23.1
pip 23.1 removed the "setup.py install" for projects that do not have
their own pyproject.toml by having a hardcoded one within pip.
To address that, this change adds the minimal pyproject.toml
to enable pbr to be properly used to build editable wheels.
See https://pip.pypa.io/en/stable/news/#v23-1
and https://github.com/pypa/pip/issues/8368 for more info.
Change-Id: I76c5a8269628c4f081c4627f222c2d535534e832
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2024年10月18日 12:14:45 -05:00
Zuul
8d16d2120a Merge "tox: Drop envdir" 2024年10月14日 11:33:21 +00:00
Takashi Kajinami
2e4936cd49 tox: Drop envdir
tox now always recreates an env although the env is shared using envdir
options.
~~~
$ tox -e genpolicy
genpolicy: recreate env because env type changed from
{'name': 'genconfig', 'type': 'VirtualEnvRunner'} to
{'name': 'genpolicy', 'type': 'VirtualEnvRunner'}
~~~
According to the maintainer of tox, this functionality is not intended
to be supported.
https://github.com/tox-dev/tox/issues/425#issuecomment-1011944293
Change-Id: I2cef53e151b9da265989c55e165b7521af32d44d
2024年10月13日 01:26:25 +09:00
Zuul
a30fea57d7 Merge "Get rid of pkg_resources" 2024年10月08日 13:52:59 +00:00
Takashi Kajinami
42ea1dbd1a Drop dependency on netifaces
The netifaces library was abandoned and archived. Replace it by psutil
which is already part of the requirements.
Closes-Bug: #2071596
Change-Id: Ibca206ec2af1374199d0c0cfad897dded1298733
2024年10月07日 01:14:53 +09:00
Zuul
fe98640fa3 Merge "agent: make _find_routable_addr work with IPv4- and IPv6-only setups" 2024年10月03日 10:36:32 +00:00
Takashi Kajinami
2bf694ee44 Get rid of pkg_resources
... because it was removed in Python 3.12 [1].
[1] https://docs.python.org/3/whatsnew/3.12.html#ensurepip
Change-Id: I2d27da0db92c1eaae9f45a0905e3eb905a939571
2024年10月03日 00:49:13 +00:00
Zuul
b44250a1be Merge "Trivial: fix variable in formatting" 2024年09月24日 10:39:39 +00:00
e4d07fd1ba Update master for stable/2024.2
Add file to the reno documentation build to show release notes for
stable/2024.2.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2024.2.
Sem-Ver: feature
Change-Id: Iffa68c4207e97d92382fbff637a661a879c1909d
2024年09月20日 13:52:29 +00:00
Dmitry Tantsur
d7b2dcf66f Trivial: fix variable in formatting
Change-Id: I6af5e6d2c4781c24345d456cec4d77c364ae2da5
2024年09月18日 13:35:07 +02:00
Zuul
6d743ad4ba Merge "[doc] Clarify Step return values" 9.14.0 2024年09月09日 16:44:28 +00:00
Zuul
ab99f36baa Merge "Check for the existence of an IPMI device" 2024年09月09日 16:44:27 +00:00
cid
2d79eae382 Check for the existence of an IPMI device
Check for IPMI device files before the use of the `'ipmitool lan.*'`
command, avoiding unnecessary calls on non-IPMI systems.
Closes-Bug: #2076367
Change-Id: Ib800717701e6f2828df55a0da0e999fc014c12e1
2024年09月05日 20:48:07 +01:00
Jonas Schäfer
def085d2c5 agent: make _find_routable_addr work with IPv4- and IPv6-only setups
`gethostbyname` only supports IPv4 lookup. In IPv6-only setups, that
does not work. Hence, `gethostbyname` is replaced with `getaddrinfo`
which supports both address families.
Change-Id: I46f79ef0992b2e6650be9772776c7223e981fc17
2024年09月05日 12:34:47 +02:00
Jay Faulkner
e303a369dc Inspect non-raw images for safety
When IPA gets a non-raw image, it performs an on-the-fly conversion
using qemu-img convert, as well as running qemu-img frequently to get
basic information about the image before validating it.
Now, we ensure that before any qemu-img calls are made, that we have
inspected the image for safety and pass through the detected format.
If given a disk_format=raw image and image streaming is enabled
(default), we retain the existing behavior of not inspecting it in
any way and streaming it bit-perfect to the device. In this case, we
never use qemu-based tools on the image at all.
If given a disk_format=raw image and image streaming is disabled, this
change fixes a bug where the image may have been converted if it was not
actually raw in the first place. We now stream these bit-perfect to the
device.
Adds two config options:
- [DEFAULT]/disable_deep_image_inspection, which can be set to "True" in
 order to disable all security features. Do not do this.
- [DEFAULT]/permitted_image_formats, default raw,qcow2, for image types
 IPA should accept.
Both of these configuration options are wired up to be set by the lookup
data returned by Ironic at lookup time.
This uses a image format inspection module imported from Nova; this
inspector will eventually live in oslo.utils, at which point we'll
migrate our usage of the inspector to it.
Closes-Bug: #2071740
Change-Id: I5254b80717cb5a7f9084e3eff32a00b968f987b7
2024年09月04日 09:11:28 -07:00
Jay Faulkner
ba5c1bfe2a Remove and disable examples job
It is not a valid check to import the hwm without it being loaded into
IPA first, as objects such as the configuration object won't be loaded
yet.
Change-Id: Icf20e71e8061bb886885c1b2e29bd13ccac37ade
2024年09月04日 09:11:28 -07:00
Riccardo Pittau
bd3b596ced Fix series in release notes
Change-Id: I6844ce33274afdb64e78b79930c8aa32776e7665
2024年08月23日 10:16:27 +02:00
Jay Faulkner
b173ce9202 [doc] Clarify Step return values
Clarifying what we require for a return value in a cleaning step;
basically not much.
Change-Id: I28c26d5b2d32d7af8d97900eb029741c8dbb166f
2024年08月19日 15:35:34 +00:00
Doug Goldstein
4cea26f185 update dynamic-login to mention the sshkey option
The docs mentioned using the SSH key option but didn't say what it was.
Added it and reflowed the section to make it more clear that the options
are one or the other and the steps that need to happen.
Change-Id: I8663379d51e5e946915cb9236ccbccb26660bcc4
2024年07月31日 12:22:31 -05:00
Sharpz7
b2ec08a15e Adding support to view indiv. cpu-core info
Closes-Bug: #1639340
This commit adds the relevant changes to the get_cpu function, keeping it backwards compatible with the old method.
Change-Id: I3c3a792e88e9a041236eca7283ebfdf1026910d8
9.13.0
2024年07月15日 12:37:37 +00:00
Jay Faulkner
a1773199b7 Follow up to broken Zuul config
Change-Id: I64909aa932635b729cc85717dc241ae31798b558
2024年06月14日 18:28:50 +00:00
Zuul
5fce84fad5 Merge "Fix versions in release notes" 2024年06月13日 07:04:02 +00:00
Zuul
1893c77918 Merge "Enable voting for codespell CI" 2024年06月10日 15:28:32 +00:00
Riccardo Pittau
599a825554 Fix versions in release notes
Change-Id: Ief6299e4b1bbef5fdb33a28b90b078f420cf8508
2024年06月10日 16:01:36 +02:00
Zuul
422b1941c7 Merge "Fix issues caused/found by new codespell" 9.12.0 2024年05月30日 10:03:38 +00:00
Jay Faulkner
60132c96d1 Fix issues caused/found by new codespell
Fixed spelling where appropriate, added ignore where appropriate
Change-Id: I07f203d311484321e0dfcbdf02083784693f4b96
2024年05月23日 15:49:48 -07:00
cid
2c68770182 Fix negative lookahead assertion syntax error
Python regexes are deprecated in Zuul, so this commit updates the
configuration to use RE2-compatible syntax.
Change-Id: I19b81e4999f9c130e18872593df9dccb416e9e6a
2024年05月23日 14:20:50 +01:00
Jay Faulkner
30cb2d7432 Enable voting for codespell CI
We've proven the concept, it's a good check, let's enforce it!
Change-Id: Ie3a5410066ef628949146f825303934110b19134
Depends-On: https://review.opendev.org/c/openstack/ironic-python-agent/+/920153 
2024年05月22日 16:03:59 +00:00
Jay Faulkner
c39517b044 Call evaluate_hardware_support exactly once per hwm
Fixes an issue where we could call evaluate_hardware_support multiple
times each run. Now, instead, we cache the values and use the cache
where needed.
Adds unit test coverage for get_managers and the new method.
Fixes issue where we were caching hardware managers between unit tests.
Also includes fixes for codespell CI:
- skip build files in repo
- fix spelling issues introduced to repo
Closes-bug: 2066308
Change-Id: Iebc5b6d2440bfc9f23daa322493379bbe69e84d0
2024年05月22日 08:46:21 -07:00
Zuul
0acaa1e3be Merge "Remove eventlet workaround" 2024年05月15日 00:48:22 +00:00
c303bd971b reno: Update master for unmaintained/zed
Update the zed release notes configuration to build from
unmaintained/zed.
Change-Id: I673a729e1598d2100631262d61c91690f500306b
2024年05月06日 06:22:59 +00:00
Julia Kreger
45a16987dc Remove eventlet workaround
Per https://review.opendev.org/c/openstack/ironic/+/918082 and
contributor recollection, we believe this has been resolved and can
thus be removed.
Change-Id: Icbf0f095cabf52a7b642cd4a6ddfbd62cc77964e
2024年05月03日 08:18:20 -07:00
Zuul
af907322f6 Merge "Unmount config drives" 2024年05月01日 05:50:36 +00:00
Zuul
36cf5931d6 Merge "Remove old excludes" 2024年04月30日 19:27:36 +00:00
Takashi Kajinami
cb58c31c84 Remove old excludes
These are detected as errors since the clean up was done[1] in
the requirements repository.
[1] 314734e938f107cbd5ebcc7af4d9167c11347406
Also remove the note about old pip's behavior because the resolver
in recent pip no longer requires specific order.
Change-Id: If927d65ff67527cab349e5d5249aa97ef5b0aca4
2024年04月30日 22:46:45 +09:00
Julia Kreger
6ac3f350c0 Unmount config drives
If this seems like deja vu, that is because it is. We had this
very same issue with the original CoreOS ramdisk. Since we don't
control the whole OS of the ramdisk, it only made sense to teach
the agent to umount the folder.
The folder is referenced already, and the agent does have safeguards
in place, but unfortunately this issue led to a rebuild breaking where
cloud-init, glean, and the agent were all trying do the right thing
as they thought, and there were just multiple /mnt/config folders
present in the OS. These are separate issues we also need to try and
remedy.
What happens is when the device is locked via a mount, the partition
table is never updated to the running OS as the mount creates a lock.
So the agent ends up thinking, in the case of a rebuild, that everything
including creating a configuration drive on that device has been
successful, but when you reboot, there is no partition table entry
for the new partition as the change was not successfully written.
This state prevented the workload from rebooting properly.
This change eliminates that possibility moving forward by attempting
to ensure that the cloud configuration folder is no longer mounted.
Change-Id: I4399dd0934361003cca9ff95a7e3e3ae9bba3dab
2024年04月29日 15:41:59 -07:00
Zuul
28053644cd Merge "add mixed matching of root device hints" 2024年04月27日 17:26:25 +00:00
Zuul
2b67f277b7 Merge "Step to clean UEFI NVRAM entries" 2024年04月27日 02:10:54 +00:00
Tudor Domnescu
ceec5a7367 destroy_disk_metadata: support 4096 sector size
A sector size of 512 was assumed and hardcoded, causing dd to fail when
it tried to write in chunks smaller than the sector size for disks with
4096 bytes sectors. The size of GPT in sectors also depends on sector size.
Change-Id: Ide5318eb503d728cff3221c26bebbd1c214f6995
2024年04月24日 20:37:44 +00:00
Adam Rozman
84a1195d5a add mixed matching of root device hints
This commit introduces the following changes:
 - New optional `all_serial_and_wwn` argument for the block device
 listing logic. The new argument makes it possible to
 collect wwn and serial number information from both
 lsblk and udevadm at the same time
 - Both the short and the long serials are collected
 from udeavadm without prioritization when the new argument
 has teh value True
 - The new feature is automatically enabled during block device listing
 as part of the root disk selecetion
 - New options are added to the lsblk command when used in the block
 device discovery process, previously lsblk was not looking
 for wwn numbers and now it does
Closes-Bug: #2061437
Change-Id: I438a686d948cd929311e2f418bb02fb771805148
Signed-off-by: Adam Rozman <adam.rozman@est.tech>
2024年04月15日 15:53:50 +03:00
Steve Baker
215fecd447 Step to clean UEFI NVRAM entries
Adds a deploy step ``clean_uefi_nvram`` to remove unrequired extra UEFI
NVRAM boot entries. By default any entry matching ``HD`` as the root
device, or with a ``shim`` or ``grub`` efi file in the path will be
deleted, ensuring that disk based boot entries are removed before the
new entry is created for the written image. The ``match_patterns``
parameter allows a list of regular expressions to be passed, where a
case insensitive search in the device path will result in that entry
being deleted.
Closes-Bug: #2041901
Change-Id: I3559dc800fcdfb0322286eba30ce47041419b0c6
2024年04月11日 01:17:23 +12:00
Zuul
cdd0a83448 Merge "Import disk_{utils,partitioner} from ironic-lib" 2024年04月03日 01:04:10 +00:00
Zuul
c784ee7cb9 Merge "Fix mocking for TestGenericHardwareManager" 2024年04月01日 14:57:34 +00:00
Zuul
b6075156b3 Merge "USB device discovery" 2024年03月28日 21:22:53 +00:00
Daniel King
cae6b15bbc Fix mocking for TestGenericHardwareManager
This test class is testing the GenericHardwareManager, but did no
mocking for dispatch_to_managers. Therefore, if any of its methods
attempted to make a call to that method, it would break the unit tests.
This update adds mocking for get_managers to prevent the tests from
breaking if a method calls dispatch_to_managers.
Additionally, updates test_delete_configuration_skip_list.
test_delete_configuration_skip_list mocks get_skip_list_from_node.
mocks get_skip_list_from_node.
Correcting the return_value from a list to a set to match what is
returned from the original method.
Related-Bug: 2057668
Change-Id: Ifaa800449b49f64c6ba5779bfae1c8e2c3249903
2024年03月25日 12:16:02 -04:00
Riccardo Pittau
8de6e03539 Update ironic-lib min required version
The addition of the qemu-img module that is used in ipa was
introduced in ironic-lib 6.0.0
Change-Id: I65b283d9abcfe2aa961baf9f686391c8dcc71d6b
2024年03月19日 14:39:06 +01:00
783a0377ad Update master for stable/2024.1
Add file to the reno documentation build to show release notes for
stable/2024.1.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2024.1.
Sem-Ver: feature
Change-Id: I67ee5ead4aa7f47517c35d1a77d594fcad22cc4c
2024年03月19日 11:10:44 +00:00
Zuul
ee8340f2cb Merge "Update regex to detect closed branch" 9.10.0 2024年03月18日 11:07:10 +00:00
Dmitry Tantsur
f824930bbd Import disk_{utils,partitioner} from ironic-lib
With the iscsi deploy long gone, these modules are only used in IPA and
in fact represent a large part of its critical logic. Having them
separately sometimes makes fixing issues tricky if an interface of
a function needs changing.
This change imports the code mostly as it is, just removing run_as_root and
a deprecated function, as well as moving configuration options to config.py.
Also migrates one relevant function from ironic_lib.utils.
Change-Id: If8fae8210d85c61abb85c388b300e40a75d0531c
2024年03月15日 18:45:04 +01:00
Zuul
e28b3e72f7 Merge "Use assert_not_called" 2024年03月15日 17:30:21 +00:00