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

Metadefs API #565

Open
5 tasks
josephineSei opened this issue Apr 15, 2024 · 2 comments
Open
5 tasks

Metadefs API #565

josephineSei opened this issue Apr 15, 2024 · 2 comments
Labels
question Further information is requested SCS-VP10 Related to tender lot SCS-VP10

Comments

@josephineSei
Copy link
Contributor

In Glance there exists the Metadef API, that can be used as a catalog to define definitions in metadata, that are not defined by OpenStack itself. It should be investigate, how standards may benefit from this, whether SCS want to use it at all or if we should not enforce it to be there at all due to:

https://wiki.openstack.org/wiki/OSSN/OSSN-0088

What metadefs are can be looked up here:
https://docs.openstack.org/glance/latest/user/metadefs-concepts.html

Definition of Done:

Please refer to scs-0001-v1 for details.

  • Proposal has been written with name of the form scs-xxxx-v1-slug.md (only substitute slug)
  • Proposal has the fields status, type, track set
  • Proposal has been voted upon in the corresponding team
  • Status has been changed into Draft, file renamed: xxxx replaced by document number
  • If applicable: test script has been written (this item may be moved into a separate issue so long as the state is Draft)
@josephineSei josephineSei added standards Issues / ADR / pull requests relevant for standardization & certification SCS-VP10 Related to tender lot SCS-VP10 labels Apr 15, 2024
@anjastrunk anjastrunk added question Further information is requested and removed standards Issues / ADR / pull requests relevant for standardization & certification labels Apr 15, 2024
@anjastrunk anjastrunk mentioned this issue Apr 15, 2024
60 tasks
@markus-hentsch
Copy link
Contributor

markus-hentsch commented Apr 30, 2024

Some research notes regarding the Metadefs API of Glance:

The Metadefs API is hosted by Glance yet it is not documented in Image Service API v21. Instead there is a dedicated "Metadata Definitions Service API v2"2.

Purpose

The Metadefs API of Glance seems to act similar to XML Schema (XSD) definitions for the existing metadata functionalities of other APIs. Quote from the API reference2 (highlights by me):

The Metadata Definitions Service (“metadefs”, for short) provides a common API for vendors, operators, administrators, services, and users to meaningfully define available key:value pairs that can be used on different types of cloud resources (for example, images, artifacts, volumes, flavors, aggregates, and other resources). […]
Note that this service stores only the catalog, because metadefs are meta-metadata. Metadefs provide information about resource metadata, but do not themselves serve as actual metadata.
Actual key:value pairs are stored on the resources to which they apply using the metadata facilities provided by the appropriate API. (For example, the Images API would be used to put specific key:value pairs on a virtual machine image.)

So essentially this API seems to allow to specify descriptions and constraints for keys/values of the existing (?) metadata functionalities of the other APIs (instance metadata in Nova API, volume metadata in Cinder API etc.).
As such it acts as a central catalog for interpreting arbitrary metadata of the other APIs.

(Im)mutability

The API reference2 also includes an important note:

By default, only admins can manipulate the data exposed by this API, but all users may list and show public resources. This changed from a default of “open to all” in the Wallaby release.

(... which is most likely a result of OSSN-0088)

This means that only a CSP of an SCS cloud would actually be able to create and maintain such metadata definitions.
Should we decide to create a standard here, this is especially important because users will have no further influence and it would be entirely up to the standard to establish a baseline for reliability and quality of the information provided by the API.

Implications

Based on the above, I deduce the following:

  • a CSP would have high responsibility for providing adequate metadata definitons since users cannot edit them, a standard could help here
  • purely user-facing: the Metadefs API is just a lookup catalog for users, neither Glance nor the referenced service APIs seem to actually validate or process any of the information
    • it falls into a "nice to have" category but does not seem to serve any technical purpose in a normal OpenStack environment
    • for SCS it could be more on the relevant side though since some standards use metadata extensively
  • should we decide to incorporate the Metadefs API in SCS: for any SCS standard that makes use of resource metadata to store SCS-related information this could be reflected in a Metadefs entry

We should discuss whether this is something useful/desired in relation to SCS standards which make use of metadata or if we should restrict/ignore it.

Resources

Footnotes

  1. https://docs.openstack.org/api-ref/image/v2/

  2. https://docs.openstack.org/api-ref/image/v2/metadefs-index.html 2 3

@berendt
Copy link
Member

berendt commented Apr 30, 2024

I think it could make sense if, for example, we add meta definitions of the additional meta information of images and flavors, which we have already standardized and use, here. Then, from an SCS perspective, the service would only be used for this purpose and the definitions themselves would not have to be standardized. Then we would already have a few good examples that could be used later for standardization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested SCS-VP10 Related to tender lot SCS-VP10
Projects
None yet
Development

No branches or pull requests

4 participants