cinder/cinder/tests
Atsushi Kawai d04db6fe88 Hitachi: Prevent to delete a LDEV assigned to multi objects
This patch prevents to delete a LDEV that is unexpectedly assigned to
two or more objects(volumes or snapshots).

In the unexpected situation, if ``delete`` command for one of objects
is run again, the data which is used by other objects is lost.

In order to prevent the data-loss, when creating an object,
the driver creates a LDEV and stores a value obtained by omitting
the hyphen from the object ID(*1) to ``LDEV nickname``.
When deleting an object, the driver compares the own object ID and
the object ID in ``LDEV nickname``, then, the object and the LDEV is
deleted only if both object IDs are same.
On the other hand, if both object IDs are not same, only the object
is deleted and the LDEV is kept, to prevent data-loss.

If format of ``LDEV nickname`` is not object ID(*2), both the object
and the LDEV is deleted without comparison, because it avoids disk
full risk, due to not deleting any LDEVs.
This patch implements only the object ID storing while creating a
snapshot and comparing IDs while deleting, because the feature to
store the object ID while creating a volume has already been
implemented.
(*1) Max length of ``LDEV nickname`` is 32 digits characters on
Hitachi storage.
(*2) 32 digits hexadecimal

Closes-Bug: #2072317
Change-Id: I7c6bd9a75dd1d7165d4f8614abb3d59fa642212d
2024-08-08 16:44:49 +09:00
..
compliance Fix compliance tests 2020-05-11 14:46:19 -05:00
functional Automate generation of qos api-ref samples 2023-08-10 15:35:34 +01:00
hacking hacking: Reenable E275 2024-04-03 12:16:34 -04:00
stubs/oslo_i18n Remove six from test codes 2024-02-01 21:08:42 +09:00
unit Hitachi: Prevent to delete a LDEV assigned to multi objects 2024-08-08 16:44:49 +09:00
__init__.py
fake_driver.py Move trace methods from utils to volume_utils 2021-02-12 20:16:55 +00:00
fixtures.py db: Remove use of 'as_scalar()' 2022-06-17 11:43:56 +01:00
README.rst Update the documentation link 2017-08-26 06:52:48 -07:00

IMPORTANT DEFINITION OF TESTS IN CINDER

Cinder has a number of different test types, PLEASE be sure to refer to the Cinder Testing Docs to familiarize yourself with the various options before creating any new tests.

Please check Cinder-Testing.