11306 Commits

Author SHA1 Message Date
Lance Bragstad
046e99c0b4 Implement system scoped RBAC for the event APIs
This commit updates the policies for baremetal event policies to understand
scope checking and account for a read-only role. This is part of a broader
series of changes across OpenStack to provide a consistent RBAC experience and
improve security.

Change-Id: I9543b0524f2e85eae0d4fd4331ea1ed9a66322d8
2021-02-23 11:58:39 -08:00
Zuul
6e0682377c Merge "Fix broken configdrive_use_object_store" 2021-02-23 18:08:57 +00:00
Riccardo Pittau
d5b5356d60 [trivial] fix typos in conductor
Change-Id: Ib431c3507cb4bdbd9ba30b58e30b078e855e7754
2021-02-23 17:54:53 +01:00
Zuul
227966b586 Merge "Implement system scoped RBAC for the allocation APIs" 2021-02-23 15:13:52 +00:00
Zuul
9c9c7c6b46 Merge "Implement system scoped RBAC for conductor APIs" 2021-02-23 15:12:42 +00:00
Zuul
9760e66f83 Merge "Implement system scoped RBAC for volume APIs" 2021-02-23 15:11:53 +00:00
Zuul
5a66dafbf1 Merge "Implement system scoped RBAC for utility APIs" 2021-02-23 15:11:24 +00:00
Zuul
34d9805b9f Merge "Implement system scoped RBAC for node and driver passthru" 2021-02-23 14:43:23 +00:00
Zuul
092afaa1d2 Merge "Implement system scoped RBAC for baremetal drivers" 2021-02-23 14:42:35 +00:00
Zuul
999e340212 Merge "Implement system scoped RBAC for chassis" 2021-02-23 14:36:48 +00:00
Riccardo Pittau
f18fec2329 Enforce autospec in test_driver
And remove filter from tox.ini

Change-Id: I90efb9f309df46c9b0ef073e789e1f1aaa1b1a1c
2021-02-23 10:55:18 +01:00
Zuul
97e644e54a Merge "Implement system scoped RBAC for port groups" 2021-02-23 09:38:16 +00:00
Zuul
2be3f75760 Merge "Implement "system" scoped RBAC for ports" 2021-02-23 05:43:02 +00:00
Zuul
43e2311f27 Merge "Implement "system" scoped RBAC for the node endpoint" 2021-02-23 01:18:36 +00:00
Zuul
2020a5070f Merge "Add support for using NVMe specific cleaning" 2021-02-22 23:37:14 +00:00
Julia Kreger
20a4f4aadc Review feedback follow-up on Node System Scoped RBAC
Changed permission defaults for changing the node owner of a node
and disabling cleaning to be system administrator based privilges.

This was review feedback in the very final review jam of the change,
which was agreed upon.

Change-Id: I5b0e609be1bfe90bbe76782e0544f7943b0c12a9
2021-02-22 14:31:35 -08:00
Lance Bragstad
d146064cb5 Implement system scoped RBAC for the allocation APIs
This commit updates the policies for baremetal allocation policies to
understand scope checking and account for a read-only role. This is part of a
broader series of changes across OpenStack to provide a consistent RBAC
experience and improve security.

Change-Id: I1cb3a7e885710c19f20df63b83beaa787ffa3bc3
2021-02-22 05:57:28 -08:00
Lance Bragstad
e1e35e8747 Implement system scoped RBAC for conductor APIs
This commit updates the policies for baremetal conductor policies to understand
scope checking and account for a read-only role. This is part of a broader
series of changes across OpenStack to provide a consistent RBAC experience and
improve security.

Change-Id: I331f46092405ffd399ad45ba4ccb6dc7639051e5
2021-02-22 05:55:23 -08:00
Lance Bragstad
5ed58df555 Implement system scoped RBAC for volume APIs
This commit updates the policies for baremetal volume policies to understand
scope checking and account for a read-only role. This is part of a broader
series of changes across OpenStack to provide a consistent RBAC experience and
improve security.

Change-Id: I361a6410f5825b2dc97b50586475a4fa8e0f0f1f
2021-02-22 05:54:53 -08:00
Lance Bragstad
69b28ca99c Implement system scoped RBAC for utility APIs
This commit updates the policies for baremetal utility policies to understand
scope checking and account for a read-only role. This is part of a broader
series of changes across OpenStack to provide a consistent RBAC experience and
improve security.

Also adds duplicate Heartbeat and Lookup test classes with the middleware
scope enforcement enabled and enforced, to ensure that we do not adversely
impact these special API endpoints.

Change-Id: I89176b3adf1489e12493c62b908bf135c912e017
2021-02-22 05:50:23 -08:00
Lance Bragstad
ff883486e6 Implement system scoped RBAC for node and driver passthru
This commit updates the policies for baremetal passthru policies to understand
scope checking and account for a read-only role. This is part of a broader
series of changes across OpenStack to provide a consistent RBAC experience and
improve security.

Change-Id: I31a258e0ce7db7e931e62f2a06e610857dabdd47
2021-02-22 05:49:11 -08:00
Lance Bragstad
9e773d96ca Implement system scoped RBAC for baremetal drivers
This commit updates the policies for baremetal drivers to understand scope
checking and account for a read-only role. This is part of a broader series of
changes across OpenStack to provide a consistent RBAC experience and improve
security.

Change-Id: I7e2f205a5fbc186bfdaf2f5f58fb3b07abc9765d
2021-02-22 05:46:15 -08:00
Lance Bragstad
eb8d7d6a8e Implement system scoped RBAC for chassis
This commit updates the policies for baremetal chassis to understand scope
checking and account for a read-only role. This is part of a broader series of
changes across OpenStack to provide a consistent RBAC experience and improve
security.

Change-Id: I5ecb44a389b057519599c7b812f8c913db4f085a
2021-02-22 05:45:53 -08:00
Lance Bragstad
4fe64c9702 Implement system scoped RBAC for port groups
This commit updates the policies for baremetal port groups to understand scope
checking and account for a read-only role. This is part of a broader series of
changes across OpenStack to provide a consistent RBAC experience and improve
security.

Co-Authored-By: Julia Kreger <juliaashleykreger@gmail.com>
Change-Id: Ida3b341285e3f889311a44f615e0665a0736f6af
2021-02-22 05:45:42 -08:00
Lance Bragstad
34edc6444e Implement "system" scoped RBAC for ports
This commit updates the policies for baremetal ports to understand scope
checking and account for a read-only role. This is part of a broader
series of changes across OpenStack to provide a consistent RBAC
experience and improve security.

Co-Authored-By: Julia Kreger <juliaashleykreger@gmail.com>
Change-Id: I0ff52a5b667cffdb93e210f5ef32c1d38953d6ee
2021-02-22 05:45:23 -08:00
Lance Bragstad
b0d8d14065 Implement "system" scoped RBAC for the node endpoint
This commit updates the policies for baremetal nodes to understand
scope checking and account for a member or read-only role.

This is part of a broader series of changes across OpenStack
to provide a consistent RBAC experience and improve security.

This change also implements basic testing of the RBAC interface, and
modifies the testing test_acl.py file to *both* delineate the tests
to prevent yaml variable expansion collission as well as handle
deprecated ACL testing so we can track our way through the API
and disable deprecated tests from providing false errors.

A notable difference between the testing is that members in the
system role *have* rights under the system scope. Members accounts
may be services such as nova-compute running the nova.virt.ironic
driver.

Co-Authored-By: Julia Kreger <juliaashleykreger@gmail.com>
Change-Id: Id8365f150f8f5828b99627e1f31b0bc30f3a28f2
2021-02-22 05:45:01 -08:00
Jacob Anders
b66471e39d Add support for using NVMe specific cleaning
This change adds support for utilising NVMe specific cleaning tools
on supported devices. This will remove the neccessity of using shred to
securely delete the contents of a NVMe drive and enable using nvme-cli
tools instead, improving cleaning performance and reducing wear on the device.

Story: 2008290
Task: 41168
Change-Id: I2f63db9b739e53699bd5f164b79640927bf757d7
2021-02-22 23:03:41 +10:00
Dmitry Tantsur
8e458d89bf Trivial: fix incorrect ordering in iLO tests
Change-Id: Ic1d951897a96cb9a98fbda59258bd9ed813cfe7e
2021-02-19 17:06:31 +01:00
Riccardo Pittau
52c01f87cc Enforce autospec in test_notification_utils module
And remove tox.ini filter

Change-Id: I29257c805ce0afb01ae9422671d71d225f4b2573
2021-02-19 13:16:29 +00:00
Riccardo Pittau
6ed75bc6cf Enforce autospec in test_node
And remove filter from tox.ini

Also sets noqa for 2 mocks to keep ignoring autospec.

Change-Id: I0eadacf87baf68bc1c6547aac562f85edcad1aa3
2021-02-19 14:16:01 +01:00
Zuul
6ae5bc4642 Merge "Correct release mappings for 16.2" 2021-02-19 11:41:53 +00:00
Zuul
23d2ec6411 Merge "Validate configdrive string format" 2021-02-19 07:50:53 +00:00
Dmitry Tantsur
16e3c6662b Correct release mappings for 16.2
The deploy_steps change merged after they got updated for 16.2.

Change-Id: Ibc9e5707518243bda31135e4012877284dad72a4
2021-02-18 18:16:26 +01:00
Dmitry Tantsur
73bdebd127 Fix broken configdrive_use_object_store
When it is set to True, we try to write text data to a binary file,
which is not possible in Python 3. The issue has been "helpfully"
hidden by the fact that we use bytes in unit tests, as well as
by lack of CI coverage.

Change-Id: Ibbf90dcbcb36a5f7cf084a44a221c0c5c003b95a
2021-02-18 10:25:07 +01:00
Dmitry Tantsur
6e09a008ab Replace pysendfile with os.sendfile
Change-Id: I1ef33d41fd3784f55929fa6a086fca0c335212e5
2021-02-18 10:16:57 +01:00
Zuul
3858b95204 Merge "Report the slowest tests after a test run" 2021-02-18 05:27:54 +00:00
Zuul
164086d331 Merge "Enforce autospec in test_chassis" 2021-02-18 05:27:44 +00:00
Zuul
eb54fbb18b Merge "Replace retrying with tenacity" 2021-02-18 04:15:03 +00:00
Zuul
6b9d7fa407 Merge "devstack: support installing ironic-lib from source in DIB IPA" 2021-02-18 04:04:40 +00:00
Dmitry Tantsur
cf5deb77ab Validate configdrive string format
The ironicclient CLI silently passes invalid JSON as a configdrive
blob, which fails much later with a confusing errors. Add an early
check in the API.

Change-Id: Ifa9993a9454fe036a600ca8b855397321d4fbc04
2021-02-17 13:38:04 +01:00
Riccardo Pittau
437cae984d Enforce autospec in test_chassis
And remove corresponding tox.ini filter

Change-Id: Id52e736c73f491faf04d2691a1f2ef0441b94111
2021-02-17 11:56:17 +01:00
Zuul
17952a9756 Merge "Switch multinode jobs to 512M RAM" 2021-02-15 19:10:28 +00:00
Boden R
b0607a2668 Replace retrying with tenacity
We are replacing all usages of the 'retrying' package with
'tenacity' as the author of retrying is not actively maintaining
the project.
Unit tests will be added/removed where applicable.

Tenacity [1] is a fork of retrying, but has improved the
interface and extensibility.
Our end goal here is removing the retrying package from our
requirements.

Tenacity provides the same functionality as retrying, but has the
following major differences to account for:
- Tenacity uses seconds rather than ms as retrying did.
- Tenacity has different kwargs for the decorator and
Retrying class itself.
- Tenacity has a different approach for retrying args by
using classes for its stop/wait/retry kwargs.
- By default tenacity raises a RetryError if a retried callable
times out; retrying raises the last exception from the callable.
Tenacity provides backwards compatibility here by offering
the 'reraise' kwarg.
- For retries that check a result, tenacity will raise if the retried
function raises, whereas retrying retried on all exceptions.

[1] https://github.com/jd/tenacity

Co-Authored-By: Dmitry Tantsur <dtantsur@protonmail.com>
Co-Authored-By: Riccardo Pittau <elfosardo@gmail.com>
Story: #1635390
Task: #10528
Change-Id: Ie5eb3ddc196505e8f58ed14de9952284598586fb
2021-02-15 17:11:33 +01:00
Zuul
71ebba5cf3 Merge "Add some tuning documentation" 2021-02-15 15:41:20 +00:00
Dmitry Tantsur
414f0ca24e Switch multinode jobs to 512M RAM
384M no longer works reliably with newer tinyIPA.

Change-Id: I7e48b2e682dc0d5e6109e17b0e73ee9763a29d23
2021-02-15 16:20:24 +01:00
Zuul
ec61274e5f Merge "Move the IPv6 job to the experimental pipeline" 2021-02-15 12:13:46 +00:00
Zuul
a2cc1baa86 Merge "Address some rbac review feedback in merged patches" 2021-02-15 07:03:59 +00:00
Julia Kreger
bb30f9945c Add some tuning documentation
Change-Id: I56e3c45bf7ae89b3f96ee826565bf153908d1bf7
2021-02-13 14:28:07 +00:00
Zuul
d65c486592 Merge "Set default to prevent out of memory conditions" 16.2.0 2021-02-12 22:46:46 +00:00
Zuul
1adee0cf5d Merge "Introduce common personas for secure RBAC" 2021-02-12 18:20:34 +00:00