If we are manually creating these things, we don't want any
automatically created. This is a latent issue that was being exposed by
SQLAlchemy 2.0's tweaked session management.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I9d760ebbfcca176a39b44f20fb92e16eaf6284c5
This patch adds a delete cli command to ShareCommands
The helper CLI command checks if service if up. If service
is down, it deletes the share instance
Closes-Bug: #1867030
Change-Id: I6a0575c1ed86213010e50fe1b7a733cdf7fa1736
This is reported upstream [1] but I suspect the root cause is that we
were relying on a bug in Alembic: renaming tables doesn't really make
sense as a batch operation, which by definition works by recreating
tables with an updated schema (to support SQLite and its lack of full
'ALTER' support).
[1] https://github.com/sqlalchemy/alembic/issues/1453
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I1da6d117778bbbad64b2df2dfd2f8aeef8a7084c
Resolve the following RemovedIn20Warning warning:
Using strings to indicate relationship names in Query.join() is
deprecated and will be removed in SQLAlchemy 2.0. Please use the
class-bound attribute directly.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I155b4ce4b605720c8335d465124fd32cc973a737
Change Ie8831c04b7b4515deea27b1ceb472d07cda91ca0 replace the only users
of 'autoload' with 'autoload_with'.
Change-Id: I37bbe45d6d9ce41a3c238e33d4469f9a362491ad
after testing using an assert for DML without a transaction,
we can now turn autocommit off. enginefacade should be used
completely now
Change-Id: I2ee07c7e41ea43c2ab24a4a095550dd0b5fe47dd
Now that we have migrated all of our DB APIs to enginefacade, we can
clean up the outstanding TODOs.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Iee198a16f030f1205d38b7c232d4e3a42642c756
Thankfully the APIs being migrated here were _mostly_ sharing sessions
already, so we can simply migrate from public (decorated) methods to
private methods with minimal fuss.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Id1b555e48106662d15e8c50567a5f3acecf6a8f1
We need to maintain these on quotas (for now) but not on other
operations.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I991d6127c14b5f06ca9ca8e6caccbc392e639b42
Make use of the `get_optional_share_creation_data` driver interface
to metadata in shares' created using the cephfs protocol.
Closes-Bug: #2050010
Change-Id: I91b51f974840f593334f2dcddfcfd45adfe87780
The WalkVersionsMixin class was already removed from oslo.db, because
of removal of sqlalchemy-migrate support.
Change-Id: I952e0aed8705fd4fc0b89f6ee34f31da1b30c656
- A new config option named ``admin_metadata_keys`` was introduced
and we expect it to be set in the DEFAULT section of the manila
configuration file. It is expected that administrators will provide
a list of metadata keys that can only be updated by administrators
through this configuration option.
- Drivers will be able to set metadata while creating shares
through the `get_optional_share_creation_data` driver interface.
Closes-Bug: #2050010
Change-Id: I6412710c7db89747d23033e1a5a6be9de5886b0b
The is_valid_ipvN methods from oslo.utils raises an exception for
non-string values, because of the change in netaddr 1.0.0. This adds
a wrapper logic to retain the previous behavior, which is preferred by
manila.
Change-Id: If1297e4d54fd645969ca79690a1c558c9efdbc8d
We are failing py311 jobs with our migration checks;
and the reason is that we have some 'implied' sql defaults
that might be inconsistent with the server versions - one
of them is the charset. We recently [1] fixed a bunch of
un-annotated tables with explicit charset declarations.
This is a continuation of that attempt.
Unfortunately, we can't change history. On existing
deployments, changes to these migrations will be ignored,
and must be done manually if there are any inconsistencies
to be fixed.
While we're at it, this commit also cleans up separate
steps to set the charset and engine to pre-created
tables.
[1] I7cd6fa0cc8e054af112493746e753fef2024000f
Closes-Bug: #2053211
Change-Id: I16345f63a279549e81cbde7b60fed29521d48a02
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
The driver was added in 2016, but it has had no 3rd party CI and it has
been untested. According to git log, the driver has not get any updates
specific to it.
Cinder already removed the Tegile driver[1] because of lack of CI.
[1] https://review.opendev.org/c/openstack/cinder/+/501333
Change-Id: I25a97ee23e5ce96ca0aec15941ad26763cd8cea0
CI of these drivers has been broken since migration to Ubuntu Jammy
and no one has shown interest to fix it so far.
Because these drivers haven't been update for some time, we can assume
these drivers are no longer used.
Related-Bug: #1998493
Change-Id: I9df5b7289dcec3a0de321169e892512571e7c006
Ensure that an assert method is actually used when validating calls
in unit tests.
This also revealed an issue with the expected calls; query updated
to reflect the use of to domain attribute in the security context.
Change-Id: I7f71437330a23a2b5f178cf1980ba23260ea4a9b
Conditionally Import Parakimo
Separate SSH functions into ssh_utils.py for safe conditional import.
Change-Id: Ia1a3ee69bef76b52e4e6df1e73488c018ac0f3c9
In case of keystoneauth1 ConnectError, manila will retry the neutron
API call. For create_port(), it will make sure no duplicate ports
are created.
Closes-bug: #2049507
Change-Id: I12fece58671e9fb3705e22090187c42d9c3a74d9
This removes support for using "vmax" backends, which was translated
to "powermax" backends. This behavior was expected to be removed during
Wallaby cycle.
Also replace the remaining reference to EMC VMAX.
Change-Id: Id1187a9a99d87abefe3549e70df768f41494145f