Commit Graph

6292 Commits

Author SHA1 Message Date
Zuul d8987589ae Merge "Add job to test with SQLAlchemy master (2.x)" 2024-04-11 18:54:01 +00:00
Stephen Finucane 2a9ac87cc4 Add job to test with SQLAlchemy master (2.x)
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ib67538ebd0f8ebbea5a700343f52655b0f7fecd4
2024-04-10 16:41:55 -04:00
Zuul 28bb87ff77 Merge "tests: Don't (always) auto-create snapshot instances" 2024-04-09 18:56:41 +00:00
Zuul 56db40e344 Merge "db: rename_table is not a batch operation" 2024-04-09 18:49:54 +00:00
Zuul 221d4d940d Merge "Add delete CLI helper to ShareCommands" 2024-04-09 17:09:35 +00:00
Zuul 9d7bf9b1c1 Merge "db: Don't use strings to indicate relationship names" 2024-04-08 21:42:43 +00:00
Zuul fdfdb3f33d Merge "db: Remove unnecessary warning filter" 2024-04-08 03:42:31 +00:00
Stephen Finucane 16b02bc706 tests: Don't (always) auto-create snapshot instances
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
2024-04-06 09:51:36 +01:00
Zuul 78272c7570 Merge "db: turn off autocommit" 2024-04-05 21:50:51 +00:00
Okeke Christian 23de7b4b0c Add delete CLI helper to ShareCommands
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
2024-04-05 16:08:55 +01:00
Zuul e15eb1cbf4 Merge "db: update migrations to use SQLA 2.0 patterns" 2024-04-05 13:15:36 +00:00
Stephen Finucane 825ee37432 db: rename_table is not a batch operation
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
2024-04-05 13:00:28 +01:00
Zuul dd308df3d2 Merge "db: Remove final use of legacy facade" 2024-04-04 21:49:09 +00:00
Zuul ffcf694881 Merge "db: Post-migration cleanup" 2024-04-04 20:56:42 +00:00
Zuul 08758bc949 Merge "db: Remove 'get_session'" 2024-04-04 20:56:40 +00:00
Stephen Finucane 9c94a9adfc db: Don't use strings to indicate relationship names
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
2024-04-04 13:30:27 +01:00
Stephen Finucane 96274a077a db: Remove unnecessary warning filter
Change Ie8831c04b7b4515deea27b1ceb472d07cda91ca0 replace the only users
of 'autoload' with 'autoload_with'.

Change-Id: I37bbe45d6d9ce41a3c238e33d4469f9a362491ad
2024-04-04 13:30:24 +01:00
Mike Bayer 505719a50a db: turn off autocommit
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
2024-04-03 19:33:24 -04:00
Mike Bayer 0ce2857d0f db: update migrations to use SQLA 2.0 patterns
All tests in test_migration.py pass with either SQLAlchemy 1.4
or SQLAlchemy 2.0 installed.

Change-Id: Ie8831c04b7b4515deea27b1ceb472d07cda91ca0
2024-04-03 19:26:23 -04:00
Zuul a30697d3e7 Merge "db: Remove session arguments from AZ methods" 2024-04-03 21:11:12 +00:00
Stephen Finucane cae5ac7be1 db: Remove final use of legacy facade
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I1251a5c0b2f073604ae61f378992fea7df51c07d
2024-04-03 16:23:12 +01:00
Stephen Finucane 98ef4c7755 db: Post-migration cleanup
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
2024-04-03 16:23:12 +01:00
Stephen Finucane 1330a5e34a db: Remove 'get_session'
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I2a1a8b8eb933fc750ff8b3fc9d7ff1c7686625e6
2024-04-03 16:22:19 +01:00
Zuul c78ce51654 Merge "[doc] add instructions regarding healthchecks" 2024-04-03 13:08:21 +00:00
Stephen Finucane d581714351 db: Remove session arguments from AZ methods
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I38ae324d5edb3705b559c3706d6888f08473a633
2024-04-03 11:29:58 +01:00
Stephen Finucane d74c804121 db: Migrate "share" APIs to enginefacade
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ie5035546c3d640e3558446ad082510c249d0ce65
2024-04-02 15:40:18 +01:00
Stephen Finucane f3805e2a13 db: Migrate "share snapshot metadata" APIs to enginefacade
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I3fa8e4e1e526d75051cb323702e3532d99008313
2024-04-02 15:40:18 +01:00
Stephen Finucane a55cafae8e db: Migrate "share snapshot export location" APIs to enginefacade
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I3d29b5426c5a633b5590367b56d00847215d8201
2024-04-02 15:40:07 +01:00
Stephen Finucane b8f5d6199d db: Migrate "share * access" APIs to enginefacade
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I590f4c7f78851b20a339294b820d0c223e298f3d
2024-04-02 14:12:34 +01:00
Stephen Finucane 685acf6013 db: Migrate "share snapshot", "share snapshot instance" APIs to enginefacade
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
2024-04-02 14:11:07 +01:00
Zuul 13b4c31117 Merge "[doc] Mount options in the ceph native driver" 2024-03-29 18:50:38 +00:00
silvacarloss dd615466ef [doc] Mount options in the ceph native driver
CephFS native shares will now have the cephfs filesystem name
added to its metadata through `__mount_opts`.

We are also warning and instructing administrators how to prevent
less privileged users to update such metadata.

Signed-off-by: silvacarloss <ces.eduardo98@gmail.com>

Closes-Bug: #2057707
Change-Id: Ica80d80d9a3709814c1ba1c9e5d942ab0c97aec7
2024-03-28 18:15:34 +00:00
Zuul c9cf3540ff Merge "db: Unwind unnecessary independent transactions" 2024-03-27 17:19:26 +00:00
Zuul b0d6056282 Merge "[DOC] Add snapshot metadata to user guide" 2024-03-26 20:51:56 +00:00
Zuul c7dcf18319 Merge "[doc] Admin only modifiable metadata" 2024-03-26 20:21:33 +00:00
ashrod98 5b3c29548f [DOC] Add snapshot metadata to user guide
Add code block for share snapshot create, list,
set and unset to user guide.

Closes-Bug: 2058941
Change-Id: Ibed2063a92a9f338553f1db879c45545fcdbf2ee
2024-03-25 15:52:15 +00:00
Stephen Finucane 3be71e3e07 db: Unwind unnecessary independent transactions
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
2024-03-25 11:32:49 +00:00
Goutham Pacha Ravi ea5afedce8 [doc] add instructions regarding healthchecks
Change-Id: Ib92a56387829a67847e9d1e9fb03d155934228fe
Closes-Bug: #1915083
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2024-03-21 01:37:18 +00:00
silvacarloss e5e3b10656 [doc] Admin only modifiable metadata
Updates to the administrator and configuration metadata to address
the new configuration option, which allows administrators to
specify metadata items that should not be updated by less
privileged users.

Signed-off-by: silvacarloss <ces.eduardo98@gmail.com>

Partial-Bug: #2057707
Change-Id: If8d51d50630f0581d588e07c3c086442b451c360
2024-03-20 17:43:33 -03:00
Zuul 4dc5f6b730 Merge "Fix the link to get the next share replica" 2024-03-20 17:46:58 +00:00
OpenStack Release Bot 0c8cc2333b Update master for stable/2024.1
Add file to the reno documentation build to show release notes for
stable/2024.1.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2024.1.

Sem-Ver: feature
Change-Id: If6933ad6a578042eef9c56652d5273dafd29602e
2024-03-14 11:55:18 +00:00
Zuul 18ffa38116 Merge "Change admin metadata config option name" 2024-03-13 22:27:21 +00:00
Zuul 12a4c6627c Merge "[doc] Update CephFS admin guide" 2024-03-13 22:27:19 +00:00
Zuul 6c04a9621f Merge "Deprecate the Ceph NFSProtocolHelper" 2024-03-13 22:27:17 +00:00
Zuul adf48763db Merge "Add more tests for share/snapshot deferred deletion" 2024-03-13 19:56:47 +00:00
Zuul 0ca91f11b6 Merge "Human readable export location NetApp driver changes" 2024-03-13 18:04:30 +00:00
Zuul 1bfbfac266 Merge "[CI] Drop glusterfs jobs" 2024-03-13 16:42:38 +00:00
Zuul bd3b074aa5 Merge "Forbid resetting state of active replicas" 2024-03-13 14:08:49 +00:00
Kiran Pawar a0bcf312f3 Add more tests for share/snapshot deferred deletion
Partially-implements: bp/deferred-deletion
Change-Id: I49c7916d4823c691f3fffe6797a779b086589188
2024-03-13 12:35:28 +00:00
Okeke Christian c8236141f8 Fix the link to get the next share replica
The url to get the next share replica is broken when performing
pagination. The new API uses underscore to represent resource.
This fix resolves the broken link for share replicas by using alias.

Closes-bug: #2023754
Change-Id: I31e32c0bcfb60b53121da9a96df3b44ad2b3ac67
2024-03-13 11:45:11 +01:00