Expose instance system_metadata in compute API

Bug #1708458 reported by sean redmond
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Won't Fix
Undecided
Unassigned

Bug Description

Via the nova compute API I can see it is possible to GET metadata for an instance but it does not seem to be possible to get system_metadata. It is useful to be able to GET the system metadata fro an instance if you want to query the point in time properties that where inherited from an image during the launch.

I noticed in change https://review.openstack.org/#/c/7045/5/nova/db/api.py there is a db api definition to read this from the database but this does not seem to be exposed in the compute api.

I assume something like the below in compute/api.py would be a starting point to expose this.

    def get_instance_system_metadata(self, context, instance):
        """Get all system metadata associated with an instance."""
        return self.db.instance_system_metadata_get(context, instance.uuid)

Revision history for this message
Sean Dague (sdague) wrote :

Exposing system metadata in the compute API is something we really don't want to do.

Changed in nova:
status: New → Won't Fix
Revision history for this message
Matt Riedemann (mriedem) wrote :

If we wanted to expose something specific out of the REST API, then we'd likely need to move that data to a different field out of the instance_system_metadata table and then make it part of the API contract, more like a field on the instance itself, or something related, but the point being you'd only expose specific things you care about, not all of system_metadata which is meant to be internal to Nova and can change at any point, so it can't be part of an end user API contract. This would also require a microversion for the compute REST API. It's definitely not a bug and Nova doesn't do RFEs via launchpad bugs. For information on the Nova blueprint process, see:

https://docs.openstack.org/nova/latest/contributor/blueprints.html

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.