-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yoga rebase #106
Yoga rebase #106
Conversation
This is an automatically generated patch to ensure unit testing is in place for all the of the tested runtimes for yoga. See also the PTI in governance [1]. [1]: https://governance.openstack.org/tc/reference/project-testing-interface.html Change-Id: Id3e6f6a0b5635b7aeeed22e30d95d991e125bfb9
A recent devstack change [1] has dropped all KEYSTONE_AUTH_* variables except KEYSTONE_AUTH_URI. Use KEYSTONE_SERVICE_* variables instead. Another change [2] switched off the creation of an admin endpoint for keystone, which we need. Create it again until we update Blazar to stop using it. The devstack plugin was creating a keystonev3 service with endpoints using port 5000. However, we have been using the main keystone service on port 80 since commit 2d0cabb. Update service name/type and endpoint URLs accordingly. [1] https://review.opendev.org/c/openstack/devstack/+/735472 [2] https://review.opendev.org/c/openstack/devstack/+/777345 Change-Id: I5fdd5e6095e579e2584984870932284afd7cb934
Yoga testing runtime[1] has been updated to add py39 testing as voting. Unit tests update are handled by the job template change in openstack-zuul-job - https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/820286 this commit updates the classifier in setup.cfg file. [1] https://governance.openstack.org/tc/reference/runtimes/yoga.html Change-Id: I9149eb5a046127057cc41f44fcd6b6784fcc61a1
The get_reservation_allocations_by_host_ids function builds an allocation dictionary that looks like this: allocations = { 'r1': ['host1'], 'r2': ['host1', 'host2'] } The list returned by this function was only using the first host of each reservation: allocations[r['id']][0] Loop over hosts to build the list of (reservation, lease, host) tuples. Change-Id: I55b3cb4e736f6f747c8b3254c62fa40bac3f288f Closes-Bug: #1958307
If a lease update raises an exception that is recoverable (such as specifying an invalid date range) the lease would be set to ERROR status. Other cases with wrong input have similar effects. This change allows for non fatal exceptions to be specified in the lease status code. If one is raised, the lease is restored to the original status. Closes-Bug: #1786031 Change-Id: I73df4587d223dc4582cb15e0f4cb8de1a02ffee7
Change-Id: Id7771b63116064f2adc0cdfd700f14afa1ea6170 Closes-Bug: #1957761
Synchronise with default enabled_filters: RetryFilter and RamFilter were removed from Nova. Also remove filters which were only required by earlier implementations of instance reservation. Change-Id: I7f60008d995266bda6d6880a952649f9b6477e3c
This commit makes endpoint types configurable and uses the internal endpoint as default for Blazar, except admin for reaching keystone to keep legacy behaviour for now. Update devstack configuration to use public endpoints, since internal endpoints are not created by devstack anymore (except for keystone). Change-Id: I6414be91a1b629df680641050cfd415252b0a3c5 Closes-Bug: #1960335
The url_for function was defaulting to the public endpoint if no specific endpoint type was passed as argument. Also switch from admin to internal keystone endpoint by default and replace use of a hardcoded endpoint type by the corresponding configuration option. As explained in [1], a recent devstack change switched off the creation of an admin endpoint for keystone. Now that we support configuring endpoint types, switch to using the public interface for keystone when deploying blazar with devstack. [1] https://review.opendev.org/c/openstack/blazar/+/816627 Change-Id: If20c20f6cfb6aa23cb6e19020301bf59044aa79c
This allows users to query for resource properties of hosts, allowing them to be used in creating leases more effectively. Two new API endpoints are added for hosts, ``/properties`` and ``/properties/<property_name>``, which allow for listing available properties, and updating a property respectively. Properties can be listed with detail, showing possible values and visibility. Admins can list public and private properties. A new database table is added ``resource_properties``, which stores property names and resource types. Resource specific property tables (e.g. ``computehost_extra_capabilities``) entries store a foreign key to ``resource_properties``, rather than the capability name. Implements blueprint resource-properties-discovery-api Change-Id: Ib9f1140c44c5e4fbef6e019c48a842869368cb21
The oslo context library has built-in mechanisms to deserialize a context object from a set of headers; Blazar's built in extension of the context class was ignoring several possibly-important pieces of information, notably the Keystone domain name. To fix, this removes much of the custom logic in the BlazarContext and keeps only the two important bits: 1. A stack of contexts is maintained to allow for nested operations w/ different sets of credentials 2. The service_catalog is preserved. It's unclear if this is really needed long-term, but some code still relies on it. Also unclear why the oslo context doesn't include this when parsing headers. Support for multiple domains is included as part of this changeset. Before, it was assumed that all users (admins and project users) were part of the default domain. Closes-Bug: #1881162 Change-Id: I75fcd97cf7a53d17c909620fcf41a8b5a3699dfa
If two leases have compute hosts in common, and the second lease starts exactly when the first lease ends, there is the possibility of a race. The Blazar manager can first run the start_lease event of the second lease. This event would fail since the end_lease event of the first lease would still be UNDONE, and the compute hosts in common would still be in the aggregate associated with the first lease, instead of being in the freepool. This patch changes event execution code so that events are executed concurrently if possible, with the following constraints: - events are executed strictly in order, i.e. events are started only after all previous events have completed - when events are at the same time, we first execute before_end_lease events (unless there is a start_lease at the same time), then end_lease events, followed by start_lease events, ensuring the bug described above does not happen. Finally, we run any before_end_lease which had a corresponding start_lease event at the same time. It also has the side effect of providing better stack traces for event execution failures, since we call wait() on all GreenThread objects. Co-Authored-By: Jason Anderson <jasonanderson@uchicago.edu> Change-Id: Ie2339db18e8baee379fbea082f1238ec44fca6b1 Closes-Bug: #1785841
Change-Id: I103cd8f850488e6a634dd427c41ee1fe7c4f1748
Update the URL to the upper-constraints file to point to the redirect rule on releases.openstack.org so that anyone working on this branch will switch to the correct upper-constraints list automatically when the requirements repository branches. Until the requirements repository has as stable/yoga branch, tests will continue to use the upper-constraints list on master. Change-Id: I78b12f832750c144752f8138e4283b1735367280
The lease attributes are called start_date and end_date, not start_time and end_time. Change-Id: I77fb08a3811ed1445e31b3552ca23d5bfc43a07d (cherry picked from commit bd6469d)
In other maintained branches, the blazar installation was removed in [1] and then restored in [2] to fix an issue with generated docs. This was not done on stable/yoga, so this change synchronises tox.ini with these changes made on other branches. [1] Ic55dba0038a2209e9fb291a604a5c1da57607e1e [2] I28d06ae31c4cf44d010e0892a094138112b08641 Change-Id: Ibc7c7751dd8769d3eb5c73c3b9a82b383c6d5630
Per [1]. [1] http://lists.zuul-ci.org/pipermail/zuul-discuss/2022-May/001801.html Change-Id: I34934eefee6c0cd3b999fa028e6697d1c5e8476a (cherry picked from commit b6ec560)
Was not included as part of rebase Change-Id: I021775ec5633415ff0ea220480c30019312028e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far!
@@ -13,7 +13,9 @@ | |||
# See the License for the specific language governing permissions and | |||
# limitations under the License. | |||
|
|||
from collections import defaultdict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these imports unused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaultdict is used, but I see they are imported twice
itemgetter looks like has been used.
* Rename table name ExtraCapabilities to ResourceProperties Change-Id: I55b284b434b8dd6b982a4a7a77a29abf27dc16cf * User right FK key name to drop or create Change-Id: I228ff41885fe6ec47201d5f0c1a9516180ad5da2
Change-Id: Ic0f53a3571c2a48179cce06f0da7edf2b77e37fc
No description provided.