-
Notifications
You must be signed in to change notification settings - Fork 24
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
Upstream work on the discoverability of certain recommended volume type aspects. #449
Comments
For volume types there exist already the concept of user visible extra specs, that are triggered by policy:
For replication it is harder, as it depends on the used backend. That means, it cannot be derived from inside openstack but would need the input from the provider, whether there is replication or not. I will go into discussion with the Cinder developers about this. But it might be possible to easily do that as the setting of extra specs is only allowed for admins now and only when the volume type is not in use. So it would just be necessary to make something like this visible to users:
This is currently only visible for admins. |
While going through the cinder code to check the places for any upstream patches, I stumbled across the policies: |
I am currently trying to implement a visible user extra spec for encryption, that is automatically set when creating or unset when deleting an encryption type in here: |
I am currently running into some errors with my implementation and try to fix that:
|
I found a neat solution for a possible encryption extra spec:
It is created when creating an encrypted volume type and visible to users. |
I pushed my changes to https://review.opendev.org/c/openstack/cinder/+/907519 to discuss them with upstream. |
I was fixing a few Errors and found out, that creating custom properties / extra specs lets the volume creation fail. I am asking Upstream about the details of this. |
I am investigating a hint that it might be the scheduler, who is responsible for the errors of custom properties. Mailing List Discussion: https://lists.openstack.org/archives/list/[email protected]/thread/ZWXFYIQ3FSFC5MGTSIMVEHCEJRQQRQ3X/ |
The cause of this is indeed the Cinder Scheduler, that checks ALL properties (== extra_specs) here, for their compatability with the backends: https://github.com/openstack/cinder/blob/master/cinder/scheduler/filters/capabilities_filter.py#L56 Changing this Filter would be possible, but whether we would only allow one or two special extra_specs to be skipped in this filter or to cheange the filter using a list of extra_specs to check for their presence and compatability is something we need to discuss with upstream. |
I attended the Cinder meeting to discuss my findings, but unfortunately there was not enough time, we will continue the discussion via ML or in the next week. https://meetings.opendev.org/meetings/cinder/2024/cinder.2024-02-07-14.00.log.html |
thanks @josephineSei for keeping this updated. |
After trying to reach out to people and going through the patches again, I added this as a discussion point for the midcycle ptg: https://etherpad.opendev.org/p/cinder-caracal-midcycles |
To be better prepared for the discussion tomorrow, I try to look for alternative ways to include the visibility of either volume type defined or administrator defined aspects in volume types. While it may be possible to include a method in the API call for showing a volume type, that gives normal users information about whether an encryption type is present or not, this is not a feasible way for the replication, that is backend-specific. This aspect has to be set by the admin explicitly but is NOT allowed to interact with the volume scheduler, as it might lead to Errors.
The database shows, that the encryption parameters are saved in a different table, while something to simply store information would be the extra_specs table or to create a new additional table. This would have the downside, that next to the extra_specs table there would be a need for an additional
A better option would be to put the extra_specs into a separate field and leave the properties field for other metadata.
|
I have attended the Cinder midcycle meeting to discuss about the use cases we have and what we want to achieve. I explained everything and we also discussed about several options to achieve this (like the ones I mentioned in the last comment) The etherpad of the midcycle with an Action Item for me: https://etherpad.opendev.org/p/cinder-caracal-midcycles |
I have created a blueprint1 and am working out a spec for the change in the volume types (still under work, as I also have to consider all DB, API and other impacts ALL options would have right now). I wrote an email to the mailinglist2 already containing the options to discuss, so the topic gets more attention. Footnotes |
Someone already answered on the ML, but this input does not help for backends with ceph. It just shows exactly the problem we have, when using backend internal configuration to achieve replication, which is transparent for Cinder:
I pushed the first version of the spec to gerrit1. Where I tried to show the impact of the several options on the workflow in Cinder. This is necessary, after we did not come to a decision in the midcycle meeting. I hope we get a decision on what to do until or latest at the next ptg. Footnotes |
I attended the Public Cloud Sig to align with the process of discoverability in overall openstack. |
I edited the spec according to the review I got and fixed some grammatical errors. |
I attended the Cinder meeting and again put the spec on the review list. |
I prepared the spec patch for the next cycle. |
After having the new document sturcture for the next cycle I updated the spec patch again. |
I prepared myself for the dicussion of the different ways for user visible information in volume types in the PTG that will happen today or maybe tomorrow. |
Results of the PTG discussionI presented some options on how to tackle the user visibility and we came to an agreement:
Metadef APIThe metadef API currently does exist in Glance: And from this document it will define metadata keys for various resources in OpenStack: Adding a new definition there seems to be the equivalent to a standard in scs. Users could apply to this but are not forced to. Nevertheless for SCS it might be worth looking into this metadefs API in a separate issue. For the scope of this issue this is just a possible second phase after introducing a way for deployers to add metadata to volume types. (#565) Work items
2nd Phase:
|
I updated the spec: https://review.opendev.org/c/openstack/cinder-specs/+/909195 |
The things still missing for functionality are: creating a volume type with some metadata For upstream this is too late for 2024.2, but can be targeted for the next cycle. There are tests missing like unit tests and tempest tests. These are also needed for upstream. |
I started looking into implementing a filter. When listing all volume types I want to be able to filter by the presence of certain metadata. |
The filtering mechanism now also works:
But seeing the output, i think I should also adjust the CLI to properly show the metadata in the listing, the information is already given by the API:
|
I started taking a look into the failing tests and will also add unit tests. |
I rebased the patches and added unit tests for the cinderclient. I will continue with the other patches. |
The pipeline for the client patches is green. |
The patch, which adds the database table (https://review.opendev.org/c/openstack/cinder/+/918316) and just also ask for the metadata table content, when the volume types are listed / showed - has only one failing unit test, which is not due to the changes, some mypy failures (also in code parts I did not change) and tempest tests, which require the tempest change to be in place. The first things cannot be handled by me, and the tempest tests - i looked through the failing tests and it seems that all (also the failing plugin tests) seem to fail validation, which needs the schema adjustment in tempest. So there are two patches which rely on each other, that cannot be merged without each other - I will ask Cinder, how they deal with such things. Also I think there is no more unit tests needed for this patch then the ones I adjusted and the one I wrote, that checks the db upgrade itself. I now start looking into the other Cinder patch, that focuses on adding new API endpoints, and the handling between endpoints and the db. |
While implementing the missing shown metadata column in the I will hold on further implementing unit tests for the client and start digging into the microversion stuff more. So this will not yet be commited to upstream patches:
|
I started adding a microversion for my patch by following this documentation: /home/kiari/Dokumente/upstream/cinder/api-ref/source/v3/samples/volume_type/volume-type-show-response.json |
I need to adjust all the patches to work properly with microversions (that means also adjust the openstackclient).
This may also make adjustments of test easier. |
After introducing the microversion I was able to simplify the first patch to add the database table: This is good, because smaller changes are easier to review :) |
I looked through the failing tests in the database and the API patch, most of them seem to come from other problems. I made a few adjustments to the API patch to fix the failing ones, my patch was responsible for. |
I am working on unit tests but can only find small amounts of time due to the PTG and other stuff. |
We discussed a few points at the PTG and the Cinder teams promised me reviews. I already started implementing some feedback - like kicking out notifications. |
Back on working on the unit test and thinking about the db performance |
I marked the spec as active and need to investigate a bit more in unit tests, the first test seems to run on my machine: https://review.opendev.org/c/openstack/cinder/+/928794 |
I stumbled upon a functional unit test, that has a very strange behavior: When I execute the functional unit test to check the extensions I get an ERROR:
When I try to add the new microversion in the extension-list-response sample, I get that Error:
The failing part here is not in the original test file, but in the abstract test-base class, where three things are compared:
This is hard to detect, because the original test does not indicate the not only 2 things are compared, but in fact 3. So whenever there is a template to be adjusted, it may not be the only thing to adjust in Cinder so that your unit tests will be successful. |
I am continuing working on unit tests and attended the Cinder weekly meeting to raise attention for reviews. |
unit tests adjustments to reflect the new microversion is going into a good direction: https://review.opendev.org/c/openstack/cinder/+/928794 |
Only a few more unit tests to add here: https://review.opendev.org/c/openstack/cinder/+/928794/17/cinder/tests/unit/api/contrib/test_types_metadata.py |
I finished unit tests, I think. I will take another look in the functional and maybe tempest tests. |
After fixing some failures in the OpenStack zuuil pipeline, I started looking into creating tempest tests with a microversion. This leads to the question, whether tests should reside in tempest itself or rather in the tempest plugin from Cinder. |
I again raised awareness for the patches in the cinder team meeting and also told them in the cinder channel, that we will not have that much time any more from december on to work on upstream items. |
I have a first draft of tempest tests, which should be sufficient in the amount of test cases: https://review.opendev.org/c/openstack/tempest/+/935142 |
Momentan funktioniert der Aufruf mit der korrekten microversion in meinen tempest tests nicht. Daher schlagen sie fehl: https://review.opendev.org/c/openstack/tempest/+/935142 Ich versuche das Problem anzugehen und zu lösen. |
I'm still on the tempest tests and also updated the clients to reflect the use of microversions. I still need to test all the patches together. |
The documentation about the usage of microversions in tempest is not very clear. I am still struggeling with this. |
i fixed the tests for the cinderclient and move forward on the tempest tests with making the tests work with the correct microversion. |
I tried a few more things to address that the tests use the correct microversion in the tempest tests. |
The patches are in a good state, I just could not get tempest to accept the microversions: Nevertheless the major part of work is done, it needs reviews from upstream openstack cinder team and hopefully only smaller adjustments. |
As a user, I want to be able to look into a volume type object and see all aspects it fulfills so that I can choose the best suited volume type for my volumes.
In #265 a standard for volume types is created. Right now SCS, providers and consumers need to rely on Tags in the description of a volume type to discover volume types with the recommended aspects encrypted and replicated.
We want to find a way to use the internal extra_spec in volume types for the description of those two aspects, when they are present in a volume type. If this is not possible, we would like to introduce another property, which has to be set by the admin, when setting the volume type. Only after that we will have the possibility to automatically check for a volume type with replication or encyption.
Definition of Done:
The text was updated successfully, but these errors were encountered: