[Cinder] Pure Storage driver fails to create volume from snapshot with py-pure-client
Summary
When using the Pure Storage Cinder driver with OpenStack 2025.1, creating a volume from a snapshot fails with a Pydantic validation error when py-pure-client
The issue was reproduced with:
OpenStack Cinder: 26.2.1
OpenStack release: 2025.1
py-pure-client: 1.93.0 — fails
py-pure-client: 1.89.0 — fails
py-pure-client: 1.85.0 — works
Python: 3.12
Pydantic: 2.13.4
Pure Storage REST client: purestorage==1.19.0
Description
When creating a volume from a snapshot backed by Pure Storage, the Cinder Pure driver calls flasharray.VolumePatch() in cinder/volume/drivers/pure.py.
The operation fails before the request is sent to the Pure Storage API because the VolumePatch Pydantic model rejects the QoS fields:
pydantic.v1.error_wrappers.ValidationError: 2 validation errors for VolumePatch
qos -> bandwidth_limit
value is not a valid dict (type=type_error.dict)
qos -> iops_limit
value is not a valid dict (type=type_error.dict)
The relevant Cinder call path is:
cinder.volume.flows.manager.create_volume
-> _create_from_snapshot()
-> driver.create_volume_from_snapshot()
-> cinder.volume.drivers.pure.py
-> flasharray.VolumePatch()
-> Pydantic ValidationError
The failure occurs at approximately:
cinder/volume/drivers/pure.py:834
The error is triggered while executing:
flasharray.VolumePatch(...)
The failure causes the volume creation task to revert:
Flow 'volume_create_manager' transitioned to state 'REVERTED'
A subsequent cleanup attempt also reports:
Volume deletion failed with message: Volume does not exist.
Reproduction
Configure OpenStack Cinder with the Pure Storage backend.
Create a volume.
Create a snapshot from the volume.
Attempt to create a new volume from the snapshot.
The operation fails with:
ValidationError: 2 validation errors for VolumePatch
qos -> bandwidth_limit
value is not a valid dict
qos -> iops_limit
value is not a valid dict
Version comparison
| py-pure-client version |
Result |
| 1.85.0 |
Works |
| 1.89.0 |
Fails |
| 1.93.0 |
Fails |
The runtime package was changed to py-pure-client==1.85.0 in the Cinder volume container, followed by a cinder_volume service restart. After this change, creating a volume from a snapshot completed successfully.
Expected behavior
Creating a volume from a Pure Storage-backed snapshot should complete successfully with supported versions of py-pure-client.
The Cinder Pure driver and the py-pure-client version should use compatible QoS models for VolumePatch.
Actual behavior
The Pure Storage Cinder driver passes QoS values to flasharray.VolumePatch(), but py-pure-client rejects bandwidth_limit and iops_limit because the received values are not in the expected dictionary format.
The failure occurs during local Pydantic model validation, before communication with the Pure Storage FlashArray API.
Workaround
Downgrading py-pure-client to:
resolves the issue.
This workaround was verified in the Cinder volume container by replacing py-pure-client==1.93.0 with py-pure-client==1.85.0 and restarting the cinder_volume service.
Request
Please investigate the compatibility between the OpenStack 2025.1 Cinder Pure Storage driver and py-pure-client versions 1.89.0+.
It appears that a change in the VolumePatch/QoS model between py-pure-client versions may be incompatible with the current Cinder Pure driver implementation.
A permanent fix could be either:
Updating the Cinder Pure driver to use the new QoS model expected by newer py-pure-client versions, or
Pinning the compatible py-pure-client version for the affected OpenStack release.
[Cinder] Pure Storage driver fails to create volume from snapshot with py-pure-client
Summary
When using the Pure Storage Cinder driver with OpenStack 2025.1, creating a volume from a snapshot fails with a Pydantic validation error when
py-pure-clientThe issue was reproduced with:OpenStack Cinder:26.2.1OpenStack release:2025.1py-pure-client:1.93.0— failspy-pure-client:1.89.0— failspy-pure-client:1.85.0— worksPython:3.12Pydantic:2.13.4Pure Storage REST client:purestorage==1.19.0DescriptionWhen creating a volume from a snapshot backed by Pure Storage, the Cinder Pure driver callsflasharray.VolumePatch()incinder/volume/drivers/pure.py.The operation fails before the request is sent to the Pure Storage API because theVolumePatchPydantic model rejects the QoS fields:The relevant Cinder call path is:The failure occurs at approximately:The error is triggered while executing:The failure causes the volume creation task to revert:A subsequent cleanup attempt also reports:ReproductionConfigure OpenStack Cinder with the Pure Storage backend.Create a volume.Create a snapshot from the volume.Attempt to create a new volume from the snapshot.The operation fails with:Version comparisonThe runtime package was changed to
py-pure-client==1.85.0in the Cinder volume container, followed by acinder_volumeservice restart. After this change, creating a volume from a snapshot completed successfully.Expected behavior
Creating a volume from a Pure Storage-backed snapshot should complete successfully with supported versions of
py-pure-client.The Cinder Pure driver and the
py-pure-clientversion should use compatible QoS models forVolumePatch.Actual behavior
The Pure Storage Cinder driver passes QoS values to
flasharray.VolumePatch(), butpy-pure-clientrejectsbandwidth_limitandiops_limitbecause the received values are not in the expected dictionary format.The failure occurs during local Pydantic model validation, before communication with the Pure Storage FlashArray API.
Workaround
Downgrading
py-pure-clientto:resolves the issue.
This workaround was verified in the Cinder volume container by replacing
py-pure-client==1.93.0withpy-pure-client==1.85.0and restarting thecinder_volumeservice.Request
Please investigate the compatibility between the OpenStack 2025.1 Cinder Pure Storage driver and
py-pure-clientversions1.89.0+.It appears that a change in the
VolumePatch/QoS model betweenpy-pure-clientversions may be incompatible with the current Cinder Pure driver implementation.A permanent fix could be either:
Updating the Cinder Pure driver to use the new QoS model expected by newer
py-pure-clientversions, orPinning the compatible
py-pure-clientversion for the affected OpenStack release.