This spec describes why and how we must separate the overloaded meaning of ‘snapshot_support’ into two independent standard extra specs. Furthermore, to prevent the proliferation of required extra specs as well as to make the creation of new share types as simple and flexible as possible, we can make snapshot_support and each of the new snapshot-related extra specs optional.
For a long time, manila has had the ‘snapshot_support’ standard extra spec, which has been overloaded to mean two things:
With additional snapshot semantics being proposed, including share revert and mountable snapshots, we expect that some drivers may support the new semantics without being able to create new shares from snapshots. It is therefore necessary to break the overload of ‘snapshot_support’.
We can add a new standard extra spec, create_share_from_snapshot_support, to indicate whether a backend can create new shares from share snapshots.
The snapshot_support extra spec is currently required, which means an admin cannot create a type where snapshot_support is a “don’t care”, such that shares of that type will not offer snapshot features even if they exist on storage controllers than can take snapshots. By making snapshot_support and the other new snapshot-related extra specs optional, we can support “don’t care” semantics on share types.
A driver that can take snapshots of shares, but not create new shares from snapshots, will benefit from this change. For example, such a driver could report snapshot_support=True, create_share_from_snapshot_support=False, and revert_to_snapshot_support=True.
To accomplish this change, we will do the following:
We could leave the overload in place, but this would lead to confusing and incorrect behavior for drivers that can create snapshots but not create new shares from them.
We could continue requiring snapshot_support and all new snapshot-related extra specs to be present on each share type, but that would prevent admins from creating share types with “don’t care” semantics.
At the microversion for this change:
The value of create_share_from_snapshot_support is inferred for each driver based on the methods it contains, much as is already done for snapshot_support.
Prior to this change, python-manilaclient provided default values for the required extra spec snapshot_support. As of the new microversion, it will not provide a default for snapshot_support because the extra spec is no longer required.
Code is all in one patch and has already been made available.
New unit and tempest test coverage will be added for all of the added or changed functionality.
Enter search terms or a module, class or function name.