Skip to content
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

Volume type standard #351

Merged
merged 39 commits into from
Apr 10, 2024
Merged

Volume type standard #351

merged 39 commits into from
Apr 10, 2024

Conversation

josephineSei
Copy link
Contributor

This creates the new standard for volume types as mentioned in ticket #265

First draft of Standard, without tests and link to decision document.

Signed-off-by: josephineSei <[email protected]>
refine standard after decision document merged

Signed-off-by: josephineSei <[email protected]>
Design meaningful test case for recommended volume types

Signed-off-by: josephineSei <[email protected]>
edit styling

Signed-off-by: josephineSei <[email protected]>
Copy link
Contributor

@artificial-intelligence artificial-intelligence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do another review later today.

Thanks for all the work you put into this!

Standards/scs-0112-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-0112-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-0112-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-0112-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-0112-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-0112-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-0112-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-0112-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-0112-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-0112-v1-volume-type-standard.md Outdated Show resolved Hide resolved
josephineSei and others added 2 commits October 6, 2023 09:49
Co-authored-by: Sven <[email protected]>
Signed-off-by: josephineSei <[email protected]>
Rephrase a few paragraphs for better understanding

Signed-off-by: josephineSei <[email protected]>
@anjastrunk anjastrunk linked an issue Oct 26, 2023 that may be closed by this pull request
2 tasks
@anjastrunk anjastrunk self-requested a review October 26, 2023 11:21
rename probable "encrypted" parameter in volume type properties for consistency

Signed-off-by: josephineSei <[email protected]>
Copy link
Contributor

@artificial-intelligence artificial-intelligence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Standards/scs-0112-v1-volume-type-standard.md Outdated Show resolved Hide resolved
fixing little typo

Co-authored-by: Sven <[email protected]>
Signed-off-by: josephineSei <[email protected]>
| Field | Value |
+--------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
| access_project_ids | None |
| description | [encrypted][replicated] Content will be replicated three times to ensure consistency and availability for your data. LUKS encryption is used. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make the order of the keyword encrypted, replicated, number of replicas, ... in volume's description and name explicitly, similar to flavor naming standard.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I doubt that optional parameters like the number of replicas will ever be made a required standard. From my discussion with csps I think, they will stay optional. Therefore I would not like to include them into some keyword standard. But it should be enough if it is stated in the description.
  2. That leaves us with only two aspects to standardize: [encrypted] and [replicated]. They both can occur together or alone. So possible beginnings for the description would be:
    • [encrypted]
    • [replicated]
    • [encrypted][replicated]
    • [replicated][encrypted]
  3. We only recommend, that both required aspects are present, but not whether they should be combined or can be stand alone. That makes it harder to require a certain sequence.

So if you insist on having a special sequence I would add this, but I don't see any positive side effects from this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The positive side effect of having a dedicated order of keywords is at user side, IMO. As volume type properties are currently defined as string, a cloud service consumer has to parse strings in order to find a volume type with special behavior or properties. Having a standardized order, string parsing will be facilitated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anjastrunk do you have a particular language in mind that relies on a certain order of arguments to facilitate string parsing?

imho most languages nowadays support some kind of simple pattern matching where the order is not that important?

overall I have no strong opinion if we should enforce the order, but we maybe should in either case explicitly define if this string is ordered or unordered.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anjastrunk please comment

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text in the paragraphs above clearly states:

The description needs to begin with [encrypted] ...

The description needs to begin with [replicated] ...

Well, only one of these can be true. This does need some more work!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I adjusted the document so that a special order is required now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fkr You are right, regular expression will not require any order. So I'm fine with extending the standard by adding, that key word are unordered.

rename object to ressource

Signed-off-by: josephineSei <[email protected]>
@anjastrunk anjastrunk self-requested a review November 9, 2023 13:39
rephrase a few sentence to better show the current upstream state and what to expect from the default volume type

Co-authored-by: anjastrunk <[email protected]>
Signed-off-by: josephineSei <[email protected]>
remove trailing spaces

Signed-off-by: josephineSei <[email protected]>
@fkr fkr requested a review from akafazov November 15, 2023 09:27
Copy link
Contributor Author

@josephineSei josephineSei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I edited the standear as we discussed with @anjastrunk and @mbuechse

Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
| Field | Value |
+--------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
| access_project_ids | None |
| description | [scs:encrypted][scs:replicated] Content will be replicated three times to ensure consistency and availability for your data. LUKS encryption is used. |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i changed it.

change "--" to —

Signed-off-by: josephineSei <[email protected]>
I incorporated @mbuechse s test and used the new syntax. A test also showed the need to catch empty descriptions for volume types.

Now we do have everything together in one PR.

Signed-off-by: josephineSei <[email protected]>
restructure formatting of the comment in line 37 /38

Signed-off-by: josephineSei <[email protected]>
@josephineSei
Copy link
Contributor Author

I added and adjusted the tests from @mbuechse s proposal, so we have one unified PR.
I also tested the tests on my devstack:

stack@devstack:~/devstack$ openstack volume type list --long
+---------------------+-------------+-----------+---------------------+----------------------+
| ID                  | Name        | Is Public | Description         | Properties           |
+---------------------+-------------+-----------+---------------------+----------------------+
| 1ed91a96-6db1-4746- | test-type   | True      | None                |                      |
| b413-bfc42e3919c2   |             |           |                     |                      |
| d0ff021e-9379-452d- | LUKS3       | True      | [scs:encrypted]     | encryption_enabled=' |
| 8596-f1669447edbd   |             |           | blabla              | 1'                   |
| 08ca1605-26c0-4e50- | LUKS2       | True      | [scs:encrypted]     |                      |
| 8ffd-cb1b59ae42e4   |             |           | blabla              |                      |
| 39bc174e-c075-4296- | LUKS        | True      | [scs:encrypted]     | cat='miau'           |
| 8a09-f3b274ae0caa   |             |           | blabla              |                      |
| 75056530-6107-4bed- | ceph        | True      | [scs:replicated]    | volume_backend_name= |
| a473-f6ebe5f80ff1   |             |           | replicated          | 'ceph'               |
| afa6fbd5-0c4d-4928- | __DEFAULT__ | True      | Default Volume Type |                      |
| a50d-d18e49a35327   |             |           |                     |                      |
+---------------------+-------------+-----------+---------------------+----------------------+
stack@devstack:~/devstack$ python3 test-volume-types.py --os-cloud devstack --debug
DEBUG: Connecting to cloud 'devstack'
DEBUG: LUKS3: feature list ['encrypted', 'replicated']
DEBUG: LUKS2: feature list ['encrypted']
DEBUG: LUKS: feature list ['encrypted']
DEBUG: ceph: feature list ['replicated']
DEBUG: volume types by feature: {'encrypted': ['LUKS3', 'LUKS2', 'LUKS'], 'replicated': ['LUKS3', 'ceph']}
DEBUG: Total critical / error / warning: 0 / 0 / 0

It correctly identifies all volume types with one or multiple aspects and skips the one without a description.

Tests/iaas/volume-types/volume-types-check.py Outdated Show resolved Hide resolved
Comment on lines 2 to 6
"""Volume types checker
Check given cloud for conformance with SCS standard regarding
volume types, to be found under /Standards/scs-0112-v1-volume-types.md
Return code is 0 precisely when it could be verified that the standard is satisfied.
Otherwise the return code is the number of errors that occurred (up to 127 due to OS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I'm really irritated that you copied my code verbatim, but you removed the paragraphs (empty lines) from my docstrings. (These are more or less suggested by PEP-8.)
Also, it would have been nice to at least have a Co-authored-by line in the commit.
Please reintroduce the newlines and include the Co-authored-by line.

Tests/iaas/volume-types/volume-types-check.py Outdated Show resolved Hide resolved
Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Comment on lines 121 to 123
## OPTIONAL volume types

Any other aspects of volume types, that can be found in the decision record are OPTIONAL. They SHOULD NOT be referenced in the way this standard describes. Some of them already are natively discoverable by users, while others could be described in the name or description of a volume type. Users should look into the provided volume types of the CSPs, if they want to use some of these other aspects.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop this paragraph. If it's unclear by now that other features are not recognized by this standard, and that arbitrary volume types may still exist, then we must improve the relevant places.

Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
josephineSei and others added 6 commits March 14, 2024 09:16
Co-authored-by: Matthias Büchse <[email protected]>
Signed-off-by: josephineSei <[email protected]>
Adjust some wording

Signed-off-by: josephineSei <[email protected]>
adjust details: aspect, sorting, comment on table as discussed with @anjastrunk and @mbuechse 

Signed-off-by: josephineSei <[email protected]>
Co-authored-by: Matthias Büchse <[email protected]>
Signed-off-by: josephineSei <[email protected]>
Signed-off-by: josephineSei <[email protected]>
Co-authored-by: Matthias Büchse <[email protected]>

Signed-off-by: josephineSei <[email protected]>
Copy link
Contributor

@anjastrunk anjastrunk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Just, found three minor typos.

Copy link
Contributor

@mbuechse mbuechse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found a few typos and inconsistencies. I think they should be addressed, but I approve nonetheless so I don't block the process any further. Some of my remarks from earlier reviews still stand, particularly regarding language.

Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Tests/iaas/volume-types/volume-types-check.py Outdated Show resolved Hide resolved
Tests/iaas/volume-types/volume-types-check.py Outdated Show resolved Hide resolved
Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
josephineSei and others added 3 commits March 19, 2024 12:50
fixing typos

Co-authored-by: Matthias Büchse <[email protected]>
Co-authored-by: anjastrunk <[email protected]>
Signed-off-by: josephineSei <[email protected]>
Copy link
Contributor

@artificial-intelligence artificial-intelligence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but all open comments should be addressed in any form before this is merged.

only slightly related to this change:
I also just noticed that seemingly all tests (so actual code) don't seem to have some distinct copyright/licence notice so would fall under the general licence used in this repository, which happens to be a CC licence.
In general this is a good licence but should imho not really be used for code.

I also raised the licence topic simultaneously with @mbuechse via Matrix Chat to put it onto the SIG Standardization Agenda.

In the meantime it might be worth to add an SPDX Licence Header to the test code.

Standards/scs-XXXX-v1-volume-type-standard.md Outdated Show resolved Hide resolved
@fkr fkr self-requested a review April 10, 2024 11:40
Copy link
Member

@fkr fkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @josephineSei for your work on this.
Thanks everyone else who has worked on this!

@josephineSei josephineSei merged commit f05bdc1 into main Apr 10, 2024
4 checks passed
@josephineSei josephineSei deleted the volume-type-standard branch April 10, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Define Standard for the naming of volume types
7 participants