NFS and NVMe-oF drivers report different storage_protocol values

Bug #1966103 reported by Gorka Eguileor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Gorka Eguileor

Bug Description

Different Cinder drivers that share the same storage protocol are returning different values in their "storage_protocol" stats, making it hard to use them on a volume type's extra specs when we have multiple backends.

Specifically NFS appears as nfs and NFS, and NVMe-oF appears as nvmeof, NVMeOF, and NVMe-oF.

All these drivers that share the same protocol should report the same value so it can be used in the extra specs and enforced by the scheduler.

Changed in cinder:
importance: Undecided → Low
tags: added: drivers nfs nvmeof
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/836069

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/836069
Committed: https://opendev.org/openstack/cinder/commit/39e518456c0fcde8a2111d583e52c5dfe6fa515d
Submitter: "Zuul (22348)"
Branch: master

commit 39e518456c0fcde8a2111d583e52c5dfe6fa515d
Author: Gorka Eguileor <email address hidden>
Date: Tue Apr 19 16:29:21 2022 +0200

    Fix reported storage_protocol

    Cinder has multiple drivers reporting the same storage_protocol in their
    stats but with different strings:

    For example we have the following variants:
    - nfs and NFS
    - nveof, NVMe-oF, NVMeOF
    - iSCSI, iscsi
    - FC, fc, fibre_channel

    This patch documents the right values (to use existing constants) and
    makes the scheduler treat all variants as if they were equal.

    This is done by changing the storage_protocol into a list in the
    scheduler upon reception of the stats from the volume. Most of the code
    in the scheduler is already able to handle this, the only changes
    necessary are on the filter and goodness function code, which will now
    run the respective functions for all the different protocol alternatives
    and select the right one, but only when the function actually uses the
    storage_protocol.

    The API will now report the preferred protocol name in operations like
    "cinder get-pools --detail".

    Closes-Bug: #1966103
    Change-Id: I07d74078dbb102490dd722029e32c74cec3aa44c

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to cinder (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/847953

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to cinder (master)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/847953
Committed: https://opendev.org/openstack/cinder/commit/60c2a46d3ee6fd15309b16f090ab239a5ce1ae7d
Submitter: "Zuul (22348)"
Branch: master

commit 60c2a46d3ee6fd15309b16f090ab239a5ce1ae7d
Author: Gorka Eguileor <email address hidden>
Date: Tue Jun 28 11:39:19 2022 +0200

    Fix flapping storage_protocol in get-pools

    After "fixing" the storage_protocol reported by get_pools, in Change-Id
    I07d74078dbb102490dd722029e32c74cec3aa44c, there are cases where the
    storage_protocol reported by the get_pools REST API call may change from
    the canonical name (eg NFS) to the value being reported by the driver
    (nfs).

    This happens because the original patch missed the fact that the
    capabilities dict is still being used in some cases even after the
    BackendState instance has been created and updated, so it's not enough
    to update the BackendState values but we also need to update the dict
    itself.

    Related-Bug: #1966103
    Change-Id: I6621901ad1ac2b96fd5b6ebb0c6efb6b2eeb188e

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 21.0.0.0rc1

This issue was fixed in the openstack/cinder 21.0.0.0rc1 release candidate.

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.