20014 Commits

Author SHA1 Message Date
Alexander Deiter
2c25e2259e Infinidat: add support for revert to snapshot operation
Adding support to revert a volume to a snapshot in Infinidat driver.
This patch implements:
- revert_to_snapshot()
- snapshot_revert_use_temp_snapshot()

Implements: blueprint infinidat-add-snapshot-revert
Change-Id: I7d3e639b896604a09c4e8a9fc24ab8aff1f65622
Signed-off-by: Alexander Deiter <adeiter@infinidat.com>
2022-09-12 10:54:11 +00:00
Zuul
55239a7fc0 Merge "NetApp ONTAP: Add volume migration functions on REST client" 2022-09-10 03:51:17 +00:00
Zuul
d5bf53304c Merge "Support os-brick specific lock_path" 2022-09-10 00:04:36 +00:00
Zuul
9846a81174 Merge "NetApp ONTAP: Add volume replication functions on REST client" 2022-09-09 23:19:22 +00:00
Gorka Eguileor
ecefc7d67a Support os-brick specific lock_path
As a new feature, os-brick now supports setting the location of file
locks in a different location from the locks of the service.

The functionality is intended for HCI deployments and hosts that are
running Cinder and Glance using Cinder backend.  In those scenarios the
service can use a service specific location for its file locks while
only sharing the location of os-brick with the other services.

To leverage this functionality the new os-brick code is needed and
method ``os_brick.setup`` needs to be called once the service
configuration options have been loaded.

The default value of the os-brick ``lock_path`` is the one set in
``oslo_concurrency``.

This patch adds support for this new feature in a non backward
compatible way, so it requires an os-brick version bump in the
requirements.

The patch also ensures that ``tox -egenconfig`` includes the os-brick
configuration options when generating the sample config.

Change-Id: I9f3e46c262f5b2b72fed5a4927165b3834a1c383
2022-09-09 19:47:00 +00:00
Zuul
75e183b14f Merge "Hitachi: Add port scheduler" 2022-09-09 18:14:52 +00:00
Fábio Oliveira
1c3972752f NetApp ONTAP: Add volume migration functions on REST client
This patch contains the implmentation of the functions used in the
operations related to volume migration. The following functions
were migrated from ZAPI to REST API:

  > get_cluster_name
  > get_vserver_peers
  > create_vserver_peer
  > start_lun_move
  > get_lun_move_status
  > start_lun_copy
  > get_lun_copy_status
  > cancel_lun_copy
  > start_file_copy
  > get_file_copy_status

The unit tests related to these functions were also included
in this patch.

Co-authored-by: Luisa Amaral <luisaa@netapp.com>
Co-authored-by: Nahim Alves de Souza <nahimsouza@outlook.com>

Change-Id: I16c305492bbfa3f6f25fd6e70803d47711276c0a
partially-implements: blueprint netapp-ontap-rest-api-client
2022-09-09 14:55:52 -03:00
Zuul
3c7d3bd670 Merge "Tests: Fix IBM XIV" 2022-09-09 16:50:50 +00:00
Zuul
f0b528b788 Merge "Tests: Fix 3par" 2022-09-09 16:50:46 +00:00
Zuul
54afbc1fa8 Merge "Tests: fix quobyte breaking other tests" 2022-09-09 16:50:42 +00:00
Zuul
5d7411351f Merge "Imported Translations from Zanata" 2022-09-09 14:14:37 +00:00
Zuul
1961107aca Merge "Lightos - add lightos new volume states" 2022-09-09 10:56:02 +00:00
OpenStack Proposal Bot
a83b46b856 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Icee45e117cbe920357a77cf9340bef3f5297f632
2022-09-09 03:57:56 +00:00
Zuul
48a36c3800 Merge "NetApp ONTAP: Add core functions on REST client" 2022-09-09 03:34:19 +00:00
Nahim Alves de Souza
560ae9d66a NetApp ONTAP: Add volume replication functions on REST client
This patch contains the functions used to manage volume replicas in
the NetApp driver (NFS, iSCSI and FCP). The functions were migrated
to the REST client based on the ZAPI implementation.

The following functions and its unit tests were implemented:
  > get_provisioning_options_from_flexvol
  > flexvol_exists
  > create_flexvol
  > create_volume_async
  > enable_volume_dedupe_async
  > enable_volume_compression_async
  > get_snapmirrors
  > create_snapmirror
  > initialize_snapmirror
  > abort_snapmirror
  > delete_snapmirror
  > release_snapmirror
  > resync_snapmirror
  > resume_snapmirror
  > quiesce_snapmirror
  > break_snapmirror
  > update_snapmirror
  > mount_flexvol

Co-authored-by: Fábio Oliveira <fabioaurelio1269@gmail.com>
Co-authored-by: Luisa Amaral <luisaa@netapp.com>
Co-authored-by: Vinícius Angiolucci Reis <angiolucci@gmail.com>

Change-Id: Ib3117c3f3891f42f0542c83407dbc424e1c5ccd8
partially-implements: blueprint netapp-ontap-rest-api-client
2022-09-08 21:47:41 -03:00
Zuul
c80477b62b Merge "NetApp ONTAP: Add REST Client for ONTAP" 2022-09-09 00:14:13 +00:00
Zuul
7cc2f6bdd3 Merge "Tests: Fix inspur unit test" 2022-09-08 23:16:52 +00:00
Zuul
b780324cd1 Merge "Tests: Fix test runner never finishing" 2022-09-08 19:39:08 +00:00
Zuul
1bebf4af85 Merge "NetApp NFS ONTAP: Deprecate Copy Offload Tool" 2022-09-08 16:44:22 +00:00
yuval brave
686eb45e1e Lightos - add lightos new volume states
Lighbits volumes have a state field indicating the state of the volume
as per actions that were invoked for this
volume (create, delete, attach...).

New states were recently added to volume:
- Migrating - specifying the lightbits dynamic rebalance logic,
  is currently migrating one of the replicas of this volume
  within the cluster to better balance the cluster.
- Rollback - Rollback the data of the volume to a previously
  created snapshot of this volume.

Migrating is identical to Avaialble with respect to most operations.
Rollback has various restriction (more similiar to Updating state)
on concurrent operations while in this state.
this patch adds handling of volume actions additional
considerations of the new states.

Signed-off-by: Yuval Brave  <yuval@lightbitslabs.com>
Change-Id: Icf873eedde145de0a7e2696036bf30ed3ca36a8f
2022-09-08 18:25:26 +03:00
Felipe Rodrigues
0a33ddd688 NetApp NFS ONTAP: Deprecate Copy Offload Tool
The copy offload tool is no longer available and maintained by NetApp,
so it supports is deprecated on NFS driver.

Change-Id: I20667e0d6bcb2cd5e05a18525ae94f72c0396037
2022-09-08 11:15:14 +00:00
Nahim Alves de Souza
00481aed74 NetApp ONTAP: Add core functions on REST client
This patch contains the implementation of the core functions of the
NetApp drivers (NFS, iSCSI and FCP). The functions were migrated
from ZAPI to REST API, but ZAPI client was not removed since it is
being used as a fallback mechamism when a function does not have an
equivalent in the REST API.

In summary, the features implemented in this patch are related to:
  > Periodic tasks - methods used during driver initialization and
    executed periodically to get information about the volumes,
    performance metrics and stats
  > Basic volume operations - methods used to create, delete,
    attach, detach and extend volumes

Co-authored-by: Fábio Oliveira <fabioaurelio1269@gmail.com>
Co-authored-by: Fernando Ferraz <sfernand@netapp.com>
Co-authored-by: Luisa Amaral <luisaa@netapp.com>
Co-authored-by: Matheus Andrade <matheus.handrade15@gmail.com>
Co-authored-by: Vinícius Angiolucci Reis <angiolucci@gmail.com>

Change-Id: I67eb7f6264cf5eea94c0a364082b530b9cdc1ae3
partially-implements: blueprint netapp-ontap-rest-api-client
2022-09-06 19:01:34 -03:00
Zuul
1a231d3d2e Merge "Fix Infinidat driver to return all iSCSI portals" 2022-09-06 20:38:14 +00:00
Nahim Alves de Souza
4775ca9370 NetApp ONTAP: Add REST Client for ONTAP
As the result of adoption of a REST API by NetApp ONTAP, some client
requests are now being gradually moved to the new format. A fallback
mechanism will be used to switch back to ZAPI if a client is using
an old version with an unsupported rest endpoint.

A new module was created to handle the REST requests, but the old
ZAPI client was not removed yet to keep the compatibility with old ONTAP
systems.

In this patch the functions needed for the NetApp driver intialization
were also added.

Co-authored-by: Fábio Oliveira <fabioaurelio1269@gmail.com>
Co-authored-by: Felipe Rodrigues <felipefuty01@gmail.com>
Co-authored-by: Fernando Ferraz <sfernand@netapp.com>
Co-authored-by: Luisa Amaral <luisaa@netapp.com>

Change-Id: I2df082fc79152ade713fea2474eefe639b43b4b8
partially-implements: blueprint netapp-ontap-rest-api-client
2022-09-06 19:28:11 +00:00
Zuul
f97f7ff514 Merge "TOX: Document install_command usage" 2022-09-06 12:20:07 +00:00
Zuul
d21696be53 Merge "[Pure Storage] Add replication support for NVMe driver" 2022-09-05 22:10:45 +00:00
OpenStack Proposal Bot
f0dded4d8e Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I81960cb8c9e83e383ddd27b812f462667013b9a7
2022-09-02 04:40:05 +00:00
Zuul
469fa370a2 Merge "Update nova microversion for volume backed instance rebuild" 2022-09-01 14:42:36 +00:00
Simon Dodsley
bf3e51e5b2 [Pure Storage] Add replication support for NVMe driver
Update driver with replication support prior to initial
release of this driver in Zed.

Change-Id: I75be679ec3cabe0d93534ec3f0115875295db630
2022-09-01 10:17:39 -04:00
Takashi Natsume
f6a1b9c3ec Fix a deprecation warning about regex
Fix the following deprecation warning.

* DeprecationWarning: Flags not at the start of
  the expression '^tid:(?m)'

Change-Id: I04aede6aec12cf89addeb1c9d500f0c623bba1a5
Closes-Bug: 1987539
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2022-08-31 12:12:50 +00:00
whoami-rajat
6eb2f4fb77 Update nova microversion for volume backed instance rebuild
The cinder side change for reimaging a volume merged in yoga[1].
However, it assume the nova side change has microversion 2.91
which was correct during that time but since then many new
features have merged in nova causing the nova side microversion
to bump to 2.93 (as per current upstream change[2]).
This patch updates the nova microversion (which we use) to send
'volume-reimaged' external event to nova notifying about
completion of the operation from cinder side.

[1] d69e89ea3b
[2] https://review.opendev.org/c/openstack/nova/+/830883

Change-Id: I8fae9e2b138545e97cc60e32bbfb527c2e2072ea
2022-08-31 17:14:01 +05:30
Zuul
743385ac19 Merge "Tests: Monkey patch before logs are loaded" 2022-08-31 06:29:53 +00:00
Zuul
2aa4922bdd Merge "Add support for transferring encrypted volumes" 2022-08-30 11:02:51 +00:00
Zuul
326993bf1d Merge "Serialize message_* properties of RequestContext" 2022-08-29 13:58:37 +00:00
Jesper Schmitz Mouridsen
c46d41719e Serialize message_* properties of RequestContext
Change Idc00b125b33b added the ability to store and retrieve user
message data in the request context, but it neglected to add code to
make sure they would persist across serialization and deserialization
of the request context object, as happens in the create-backup
workflow.  As a result, when a user message needed to be created to
describe an error condition in the backup driver, instead we'd get an
exception raised: "TypeError: 'NoneType' object is not subscriptable".

This patch fixes the issue by making sure the message_* properties
persist across serialization/deserialization of RequestContext objects.

Closes-Bug: 1978729
Change-Id: Ibdaaf39abafbae6bfcb9fdf9fb7a55d968ad9f11
Signed-off-by: Jesper Schmitz Mouridsen <jesper@schmitz.computer>
2022-08-26 15:38:48 +00:00
Alan Bishop
d59e41fb3c Add support for transferring encrypted volumes
A new microversion 3.70 adds the ability to transfer a volume's
encryption key when transferring a volume to another project.

When the volume transfer is initiated, the volume's encryption
secret is essentially transferred to the cinder service.
- The cinder service creates a new encryption_key_id that contains
  a copy of the volume's encryption secret.
- The volume (and its snapshots) is updated with the new
  encryption_key_id (the one owned by the cinder service).
- The volume's original encryption_key_id (owned by the volume's
  owner) is deleted.

When the transfer is accepted, the secret is transferred to the
user accepting the transfer.
- A new encryption_key_id is generated on behalf of the new user
  that contains a copy of the volume's encryption secret.
- The volume (and its snapshots) is updated with the new
  encryption_key_id (the one owned by the user).
- The intermediate encryption_key_id owned by the cinder service
  is deleted.

When a transfer is cancelled (deleted), the same process is used
to transfer ownship back to the user that cancelled the transfer.

Implements: blueprint transfer-encrypted-volume
Change-Id: I459f06504e90025c9c0b539981d3d56a2a9394c7
2022-08-26 06:32:41 -07:00
Zuul
2e6c0dfcec Merge "Bump mypy version to 0.960" 2022-08-25 16:08:39 +00:00
Gorka Eguileor
023fa94bde Tests: Fix IBM XIV
Test test_handle_created_vol_properties_returns_vol_update can make
other XIV unit tests fail if executed before them because it changes
a class with a Mock and doesn't restore it after the test.

This patch fixes this test.

Change-Id: I3ad9e565e4bdeca2e4b6ca76d239ba96cca0cd20
2022-08-24 19:37:38 +02:00
Gorka Eguileor
493d0e6fc3 Tests: Fix 3par
3PAR tests fail depending on the order in which they are executed.

This patch fixes this.

Change-Id: I443fc54a39e8f9cba84c96abdbd31c097c660b5f
2022-08-24 19:37:38 +02:00
Gorka Eguileor
e92c4d01d7 Tests: fix quobyte breaking other tests
This patch fixes the Quobyte driver unit tests that forcefully replace
the 'convert_image' method in 'image_utils' with a Mock and then doesn't
restore it afterwards, so any method that runs afterwards and expects
'convert_image' to actually run code will fail.

This patch uses the proper mocking mechanisms that restore things
afterwards.

Change-Id: Iec1cf6ade1d97900d4db6e29555ddef8d45b9534
2022-08-24 19:37:38 +02:00
Gorka Eguileor
b50847a0cb Tests: Fix inspur unit test
Because of how stestr processes and filters tests to run there are tests
that are not being run.

The way stestr executes tests is that a parent process first builds a
list of existing tests, then splits it equally into N lists, which are
passed into as many processes via command line (not fork) and this new
process builds the list of existing tests and then uses the list for
filtering.

The problem is that if a test name changes from when the parent builds
the list to when the child builds the list then the test will not be
run.

That is the case for tests decorated with 'ddt.data' where the data is
not a static value but is dynamically built, for example if they use
'time.time()'.

This patch fixes such unit tests in the Inspur driver, where not only
the test is not run, but if will fail if it is forcefully run with:

  $ tox -epy39 -- -n cinder.tests.unit.volume.drivers.inspur.as13000.test_as13000_driver.AS13000DriverTestCase

The test in question are:

  cinder.tests.unit.volume.drivers.inspur.as13000.test_as13000_driver.AS13000DriverTestCase.test__update_volume_stats_1_#####_####
  cinder.tests.unit.volume.drivers.inspur.as13000.test_as13000_driver.AS13000DriverTestCase.test__update_volume_stats_2_#####_####

Change-Id: I3b434f8f4d515b688d70ef7c8ee3fc9aacdc4846
2022-08-24 19:37:38 +02:00
Gorka Eguileor
eb8409b3a8 Tests: Fix test runner never finishing
The tpool.killall method seems to block in some cases when running unit
tests, as observed with the Guru Meditation Reports. This has been
happening primarily on Python 3.9 and 3.10.

Moving the call from the test setUp to the cleanup after stopping
existing looping calls seems to resolve the issue.  At least we've been
unable to reproduce the issue again even when running tests with
'--random'.

We need a way to identify existing looping calls that must be stopped,
tracking them with a decorator on the LoopingCallBase class __init__
method or looking for its instances in the objects tracked by the
Garbage Collector.

Using the GC mechanisms makes tests take 12 times longer to complete, so
this patch creates a new test utils class called InstanceTracker that
allows tracking any class.

We haven't been able to reproduce the test runner freeze situation with
this patch, even when running tests with '--random', but just in case
this happens again a TPOOL_KILLALL_ISSUE flag has been created to allow
easily disabling things if this were to happen again.

Because the tests use greenthreads, debugging blocked tests with GDB is
a nightmare, so the patch also adds the Guru Meditation Reports feature
to the test runner, that way we can do:

 $ kill -USR2 <child_runner_pid>

And see the greenthreads, where in this case we would see one of them
stuck in the tpool.killall() call.

Change-Id: Idb5c428adcc1112046cc81a441c572a2e6bfa80c
2022-08-24 19:37:37 +02:00
Gorka Eguileor
9dc820f2ae TOX: Document install_command usage
This patch documents in tox.ini the change introduced by change-id
Ic9a6ac412a334710eb5e45935cd301ca80a5edb9 where we use "install_command"
to prevent installing dependencies without constraints.

We document it to prevent people from thinking that just adding the
constraints in "deps" is enough and removing the "install_command" line.

Change-Id: Iccd84cb5d4db78e4953d58a05392c61b08988d4e
2022-08-24 17:46:00 +02:00
Gorka Eguileor
81f117c55d Tests: Monkey patch before logs are loaded
Our tests don't do the eventlet monkey patching in the same way that the
Cinder services -backup, scheduler, volume- do.

This patch changes this by doing the monkey patching as soon as
possible, before cinder OVOs are loaded and bring in a number of oslo
libraries.

When copying the initialization part from the Cinder commands a fix for
'current_thread' is also copied.

Change-Id: I6c44d557466dfcb1f6507917eb88959e2ff388df
2022-08-23 22:10:20 +02:00
Gorka Eguileor
1ef8e3ddc2 Tests: Fix service stopping on cleanup
Our services don't have a 'kill' method, they have a 'stop' method, so
it doesn't make any sense to call the 'kill' method on them during test
cleanup.

This patch changes the 'kill' call with the right 'stop' call.

Change-Id: Ib1bae260b8b5289e9a6c80baf2de9e908f977d09
2022-08-23 22:10:20 +02:00
Zuul
7fa996bb66 Merge "Update volume delete api-ref" 2022-08-20 15:44:03 +00:00
Zuul
06c137d935 Merge "[docs] Add info about releases" 2022-08-19 18:36:00 +00:00
Zuul
8df3878e91 Merge "[SVf] : Fix the SVC code level for lsfcportsetmember call" 2022-08-19 18:35:53 +00:00
Zuul
6605f5a94e Merge "Move NFS job to voting" 2022-08-19 17:22:11 +00:00
tushargite96
dc6388b6fd Update volume delete api-ref
This patch update volume delete section in api-ref
to understand preconditions more correctly

Partial-Bug: #1918932
Change-Id: Icb5b4da3423555cd2ab0f5ee6d1dc881fc782484
2022-08-18 15:44:42 +05:30