Commit Graph

20582 Commits (master)

Author SHA1 Message Date
Zuul e9f9415789 Merge "RBD: tpool.Proxy client object" 2023-12-07 18:52:11 +00:00
Zuul 21b165eab1 Merge "Migrate cinder-sqlalchemy-2x job to py311" 2023-12-07 13:45:09 +00:00
Zuul 38cd59cd0a Merge "Add cinder active-active support for Dell PowerMax driver" 2023-12-06 14:45:43 +00:00
Zuul df6f86dd69 Merge "UTs: Fix clearing of RPC exchange between tests" 2023-12-04 20:50:52 +00:00
Zuul b5a8a5943f Merge "Doc: Fix way to update default quota value for a new project" 2023-12-04 16:37:11 +00:00
Atsushi Kawai a0d075219a Hitachi: Fix exception when deleted volume is busy
This patch is to fix an exception name when deleted volume is busy
in delete_volume().
Although exception ``VolumeIsBusy`` should be issued in that case,
``VolumeDriverException`` is issued. It should be fixed.

Closes-Bug: #2024418
Change-Id: I5405790c7cd4ca513ceea70380be723a54c3fe3c
2023-11-29 05:17:21 +00:00
Zuul e5b7b41ae9 Merge "Experiment with ruff" 2023-11-28 22:03:36 +00:00
Zuul b4d34d5c46 Merge "Stop sharing tox envdir between pep8 and fast8" 2023-11-28 17:44:50 +00:00
Zuul 73a4cb9a40 Merge "use binary psycopg2-binary" 2023-11-22 01:04:24 +00:00
Zuul b8f087d2fa Merge "HPE XP and NEC V: Host group name is not correct" 2023-11-21 20:06:46 +00:00
Zuul 446a4ff1c8 Merge "Add unit test for successful _run_ssh execution in Cisco driver" 2023-11-21 17:45:15 +00:00
Zuul 95dfd3ea30 Merge "Fix invalid UUIDs newly detected" 2023-11-18 02:45:29 +00:00
Zuul bd87999665 Merge "Doc: Fix incorrect QoS support for rbd driver" 2023-11-17 15:22:35 +00:00
Premlata84277 67713f6713 Add unit test for successful _run_ssh execution in Cisco driver
This patch adds a new unit test to validate the successful execution of
the _run_ssh method in the CiscoFCSanLookupService class. The test ensures
that the expected command output is returned and that the mock SSH execute
method is called with the correct parameter

Change-Id: Id8cae36f06f82dcf28a1fb7a2058f01f1a1bd1a2
2023-11-16 17:26:51 +00:00
Zuul c26f02f03c Merge "db: Silence alembic logging" 2023-11-16 09:01:16 +00:00
Zuul bf1ae2d01b Merge "Add job to test with SQLAlchemy master (2.x)" 2023-11-16 09:01:13 +00:00
Zuul f1144074cd Merge "db: Use the same connection throughout test" 2023-11-16 00:05:49 +00:00
Zuul b2caf2a129 Merge "db: Replace use of enginefacade in migrations" 2023-11-16 00:05:46 +00:00
Stephen Finucane 6616bda7e7 Migrate cinder-sqlalchemy-2x job to py311
Change-Id: Ie47b01fe9fbc2df7ccb6ae685edc989485146df8
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-11-15 12:23:06 +00:00
Gorka Eguileor 467cafe330 UTs: Fix clearing of RPC exchange between tests
Our current code does not properly clean up the fake RPC exchange between
tests.

This means that if a test invokes code in cinder that makes an RPC
request and it is not consumed by that test, then another test may get
some code invoked.

One test that makes such an RPC request that is not consumed is our test
cinder.tests.unit.policies.test_snapshots.SnapshotsPolicyTest.test_delete_policy_6_project_reader

This means that if the next tests starts the volume manager service and
asserts that cinder.volume.volume_utils.notify_about_snapshot_usage is
not being called, it will fail, as the notification would have been
called when processing the previous test deletion request.

This was found when working on Change-Id patch
I60527edb029265ed4b2a48d2c358265cea1a9b2c and analyzing a spurious
failure and finding out that running these 2 tests one after the other
was the problem:

  cinder.tests.unit.policies.test_snapshots.SnapshotsPolicyTest.test_delete_policy_6_project_reader
  cinder.tests.unit.test_volume_transfer.VolumeTransferTestCase.test_transfer_accept_with_snapshots_1_True

The second test is added in that Change-Id that follows this one in the
patch dependency chain.

This patch fixes this issue by forcefully clearing the class dictionary
in the fake exchange.

We do it forcefully because the oslo messaging library doesn't have any
other mechanism to do so for now, but once patch
https://review.opendev.org/c/openstack/oslo.messaging/+/901018 is merged
we can remove this code.

Change-Id: I52ee4b345b0a4b262e330a9a89552cd216eafdbe
2023-11-15 12:30:33 +01:00
Zuul ea33c26634 Merge "Backup: Chunked driver reduce copying" 2023-11-13 21:25:13 +00:00
Zuul dbb82ce48f Merge "Revert "Driver assisted migration on retype when it's safe"" 2023-11-13 17:47:06 +00:00
Zuul f06fb37c49 Merge "db: Remove unnecessary 'configure' call" 2023-11-13 15:59:17 +00:00
Stephen Finucane 91c4978f43 db: Silence alembic logging
This should have been done when we switched from SQLAlchemy-Migrate to
Alembic way back. Oops /o\ Do it now.

Change-Id: I5899a5020c81e62a67f37e95facfc87cd312561c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-11-10 11:15:39 +00:00
Stephen Finucane d9c21b9c7f Add job to test with SQLAlchemy master (2.x)
Change-Id: I1ec983ca09cb42bf1ffb701c1ac56f84c4deee8f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-11-10 11:15:37 +00:00
Zuul bd786113ce Merge "db: Replace use of Connection.execute" 2023-11-08 21:09:00 +00:00
Shatadru Bandyopadhyay dd1ceb1bda Doc: Fix incorrect QoS support for rbd driver
QoS works fine with ceph, updating incorrect
 support status

Change-Id: I377e460ed1781f943d6284edc8e567c11dc863ba
2023-11-08 18:39:10 +00:00
Takashi Kajinami 4c6bbdb022 Fix invalid UUIDs newly detected
... because these cause the following warning.

FutureWarning: b"'mock_volume_type_id'" is an invalid UUID. Using
UUIDFields with invalid UUIDs is no longer supported, and will be
removed in a future release. Please update your code to input valid
UUIDs or accept ValueErrors for invalid UUIDs.

Change-Id: Ief8962b3120148bde64dca02713c1723548bab21
2023-11-09 02:44:44 +09:00
Zuul dc726266d0 Merge "Hitachi: Fix to use correct pool on secondary storage" 2023-11-08 16:04:41 +00:00
Stephen Finucane 9927bdc9b3 db: Use the same connection throughout test
This necessitates using a raw connection [1] to enable foreign keys, due
SQLAlchemy 2.0 wrapping mostly everything in transactions which in-turn
limits our ability to do this easily on a non-global basis.

[1] https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.execute

Change-Id: Id6d4219ea2be797e4da6c43b3a950983f3fc951f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-11-08 11:34:16 +00:00
Stephen Finucane 4062e02a22 db: Replace use of enginefacade in migrations
This allows us to use 'alembic' (the CLI) again and is functionally
identical.

Change-Id: I7af445fce9b4e84ebbd24d546cab13461aa0b0e5
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-11-08 11:34:16 +00:00
Stephen Finucane f3c42d234b db: Replace use of Connection.execute
SQLAlchemy 2.0 require executable strings be wrapped in
'sqlalchemy.sql.expression.text()'. 'op.execute' does automatic coercion
[1], which keeps things a little simpler and arguably more idiomatic.

[1] https://alembic.sqlalchemy.org/en/latest/ops.html#alembic.operations.Operations.execute

Change-Id: Ic454f00ddc3f4e0e1d2b5222808dab22bc8391d7
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-11-08 11:30:28 +00:00
Zuul e0f047ef6f Merge "db: Don't rely on branched connections" 2023-11-07 16:32:41 +00:00
Atsushi Kawai 61e7d1f83c HPE XP and NEC V: Host group name is not correct
Host group[1] name formats, which is managed by cinder driver,
for each storage models must be:
``HBSD-xxx`` for Hitachi storage(``xxx`` is WWPN of target host on FC,
or IP address of target host)
``HPEXP-xxx`` for HPE-XP storage
``NEC-xxx`` for NEC V storage , but the format `HBSD-xxx` is used for
OEM storage models because a bug in the merged patch
https://review.opendev.org/c/openstack/cinder/+/866526 overwrites the
prefix for Hitachi storage.

It should be fixed to use original prefixes.

[1] ``Host group``(or ``iSCSI target``), which is one of Hitachi and
OEM storage parameter,
is a group of multiple server hosts connecting to same storage port.

Following site would be help to know what host group is:
https://knowledge.hitachivantara.com/Documents/Management_Software/SVOS/9.1.x/Volume_Management_-_VSP_G130%2C_G%2F%2FF350%2C_G%2F%2FF370%2C_G%2F%2FF700%2C_G%2F%2FF900/Provisioning/11_About_LUN_Manager%2C_logical_units_(LUs)%2C_and_host_groups

Closes-Bug: #2012515
Change-Id: I1c9677112caa0808dff17cbde2db6afbe25a2129
2023-11-07 09:47:01 -05:00
Zuul 4ee1bdaf64 Merge "[Pure Storage] Unit tests and fixed variable name for Replication-Enabled Consistency Groups" 2023-10-25 16:49:36 +00:00
Eric Harney 13196c700c Revert "Driver assisted migration on retype when it's safe"
This reverts commit 5edc77a18c.

Reason for revert: Bug: #2019190
This revealed a bug in Cinder optimized migration code that can lead to data loss with RBD and potentially other drivers, by using the optimized migration path in more cases.  Once the issues there are fixed, this should be re-introduced.

Change-Id: I893105cbd270300be9ec48b3127e66022f739314
2023-10-25 16:12:01 +00:00
Zuul 04e11c1f77 Merge "DSM is unable to fetch lowercase WWNs in SC." 2023-10-23 15:11:55 +00:00
Keerthivasan ca3fcebcb4 [Pure Storage] Unit tests and fixed variable name for Replication-Enabled Consistency Groups
Adding test cases for recently merged replication-enabled consistency groups feature.

Fixed variable name to correctly unpack it in the create consistency group function.

Related: I64bc4aa48d1d372b8687a22846aeece729e02598
Change-Id: I3964cac87a933a256064c332c68b312705ca7e0c
2023-10-17 07:02:48 -04:00
Jean-Pierre Roquesalane 298932c29f Add cinder active-active support for Dell PowerMax driver
Change-Id: I939bb768e004d1bc4a980dcdba932abf9f690350
2023-10-16 07:48:21 +00:00
Zuul 5ea10b2ecc Merge "Fix test_nvmet_driver tests" 2023-10-10 01:54:00 +00:00
Zuul 95630360b2 Merge "Scheduler: Remove unnecessary DB read" 2023-10-03 18:20:01 +00:00
Gorka Eguileor 2d47a8fdd8 Fix test_nvmet_driver tests
Unit tests fails when running on systems without nvmet support.

This is caused by the nvmet library trying to do some safe reads on
sysfs.  Writtings won't happen though.

This patch ensures that we always use a mocked nvmet library instead of
trying to use the real library when available like we are doing now.

Example of failure:

cinder.tests.unit.targets.test_nvmet_driver.TestNVMETDriver.test__namespace_dict_shared
---------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/home/zuul/src/code.engineering.redhat.com/cinder/cinder/tests/unit/targets/test_nvmet_driver.py", line 34, in setUp
    self.target = nvmet.NVMET(root_helper=utils.get_root_helper(),

      File "/home/zuul/src/code.engineering.redhat.com/cinder/cinder/volume/targets/nvmet.py", line 40, in __init__
    self._nvmet_root = nvmet.Root()

      File "/usr/lib/python3.9/site-packages/nvmet/nvme.py", line 241, in __init__
    raise CFSError("%s does not exist.  Giving up." %

    nvmet.nvme.CFSError: /sys/kernel/config/nvmet does not exist.  Giving up.

Change-Id: I1845ce07886d7cd6256be55c71e9da3fd9122fe4
2023-10-03 17:39:53 +02:00
Eric Harney 0634096238 RBD: tpool.Proxy client object
Lack of a proxy on the client object could result in
hangs when connecting to ceph mon is slow.

Change-Id: I600881347bed834383cddb9127e24954ed77b05d
2023-10-03 13:28:13 +00:00
Zuul 0ee2a6cf5d Merge "api-ref: Improve sort, pagination parameter docs" 2023-10-03 13:25:49 +00:00
Zuul b1006cc0c7 Merge "Ceph: Fix restoring old backups to a different backend" 2023-10-02 17:57:30 +00:00
Zuul 0fc4e39227 Merge "Make lvm-lio-barbican a canary job" 2023-09-28 01:30:18 +00:00
Zuul 935f08e032 Merge "Update master for stable/2023.2" 2023-09-25 15:02:48 +00:00
Zuul 6b33ef3407 Merge "Imported Translations from Zanata" 2023-09-25 15:02:45 +00:00
Stephen Finucane 3263a9e255 db: Don't rely on branched connections
We were previously calling 'connect()' on the 'connectable' object in
'run_migrations_online', regardless of whether it was an 'Engine' or
'Connection' object. This worked because, as noted in an inline comment,
"when connectable is already a Connection object, calling 'connect()'
gives us a *branched connection*." This is no longer the case. From the
SQLAlchemy docs [1]:

  The Connection object does not support "branching", which was a
  pattern by which a sub "connection" would be used that refers to this
  connection as a parent.

Update our code to reflect this change, using the newly updated example
from the SQLAlchemy cookbook doc [2] as inspiration.

[1] https://docs.sqlalchemy.org/en/14/core/future.html#sqlalchemy.future.Connection
[2] https://alembic.sqlalchemy.org/en/latest/cookbook.html#connection-sharing

Change-Id: I658cdec1c6edc3e369e23b21e4b5f89cdc2805b0
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-09-25 11:14:32 +01:00
Zuul 8a9f9a7c36 Merge "Pure: Report SAM-2 addressing mode for LUNs" 2023-09-16 02:26:34 +00:00