Skip to content

Conversation

@hemna
Copy link

@hemna hemna commented Mar 10, 2021

This patch adds the ability for admins to view
volume_admin_metadata when fetching volumes from the API.

This patch ensures that ensure_export at init_host time can
do a model update.

referencing:
https://review.opendev.org/c/openstack/cinder/+/779835

This patch slightly refactors create_export, ensure_export and
initialize_connection to allow saving a model_update back for each
of those calls.

The model update returns some vital information about the volume,
the vcenter uuid, the datastore name, and the vcenter storage profile
associated with that volume. That information is stored in the
volume_admin_metadata table as key/value pairs that are then returned
(for admin users) when a volume list or show is called from the API.

ensure_export is called for every in-use, available volume at cinder
startup. So existing volumes will get updated in the db at
cinder startup.

We will then be able to update the host entries later if/when we
migrate to supporting datastores as pools. Each volume will need
to get updated to change its host entry to include the pool name
(datastore name) as part of the host entry, so cinder knows which
cinder-volume service instance manages that specific volume.

This patch adds the ability for admins to view
volume_admin_metadata when fetching volumes from the API.

This patch ensures that ensure_export at init_host time can
do a model update.

referencing:
https://review.opendev.org/c/openstack/cinder/+/779835

This patch slightly refactors create_export, ensure_export and
initialize_connection to allow saving a model_update back for each
of those calls.

The model update returns some vital information about the volume,
the vcenter uuid, the datastore name, and the vcenter storage profile
associated with that volume.  That information is stored in the
volume_admin_metadata table as key/value pairs that are then returned
(for admin users) when a volume list or show is called from the API.

ensure_export is called for every in-use, available volume at cinder
startup.  So existing volumes will get updated in the db at
cinder startup.

We will then be able to update the host entries later if/when we
migrate to supporting datastores as pools.  Each volume will need
to get updated to change its host entry to include the pool name
(datastore name) as part of the host entry, so cinder knows which
cinder-volume service instance manages that specific volume.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants