Set share instance replica_state to 'active' after successful migration
if the share is involved in a replication setup.
Change-Id: I6cf8a08379b2f2b0fd1bcada4cd20c39adc01f47
Closes-Bug: #1927060
To create a share with protocol CIFS it is mandatory to add a security
service to the share network beforehand. If this is forgotten the share
ends up in error. Validate the security service association based on
share protocol from given driver. Raise invalid request exception if
needed association between share_network and security_service is
missing for given driver e.g. ONTAP.
DocImpact
Closes-Bug: #1900752
Change-Id: Ib7e9850e6439ee5d04f826d129afb1ab06950ce7
The various test cases and mixins in 'oslo_db.sqlalchemy.test_base' have
been deprecated since oslo.db 4.34.0 (March 2018). Remove use of these.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I67eff8c9733500813435cde2dbda28a3c4a3ccf3
Adds message id, expires_at, created_at parameters to user messages in
response body.
Updates share_types response body to account for extra_specs object including
snapshot_support, create_from_snapshot_support, mount_snapshot_support,
revert_to_snapshot_support, replication_type, and
driver_handles_share_servers.
Change-Id: I408dcf5fdbf2f12eb1dc0ce80232d4e710cef765
manila.scheduler.filter_scheduler.*Scheduler was deprecated long ago[1]
in favor of new manila.scheduler.drivers.filter.*Scheduler.
[1] 3ffb4979f328259793079a5ece6f3b79e23f5187
Change-Id: I40349cbe106f688a67043a73f8563f87f069831b
... to get rid of the following warning in unit test jobs.
DEPRECATED: The `allowed_origin` keyword argument in `add_origin()`
should be a list, found String.
Change-Id: I6265fa1bea2c05d9b46f45802e8766d702ae1ff7
Deprecate the create snapshot from share group feature
in CephFS drivers (both Native and NFS Ganesha).
This needs to be done since the subvolume group snapshot
feature is no longer supported in mainline CephFS, meaning that,
if we leave the call in place, an exception will be raised
from the backend and lead to an error status for the attempted
snapshot from share group.
Existing group snapshots can still be listed and deleted, so these
operations stay the same.
Closes-Bug: #1925332
Change-Id: I49efb7042d38257416875f40c03923e974b2eb8e
ABCs in collections should be imported from collections.abc and direct
import from collections is deprecated since Python 3.3.
Closes-Bug: #1936667
Change-Id: Ie82a523b4f8ab3d44d0fc9d70cb1ca6c059cc48f
Attempting to create a share without identifying a share type results in an
error.This adds a user message informing the user that no default share type
was identified while attempting to create a share.
Closes-Bug: #1870280
Change-Id: Ib417499d4394b939eb289460ac8dbb6b22d789f4
The oslo_utils.fnmatch module was added to solve an issue in py2.7 but
it is no longer required because py2.7 is no longer supported.
The module was deprecated since oslo.utils 4.9.1[1] and the stdlib's
fnmatch module should be used instead.
[1] 4c893c92f551c9dd2a7cfbe7ae8171ad8139df0b
Change-Id: Ie1601bfe79f744c553c25d7724cc9bf1894bc59b
In python3.8.11 and python3.9.6, the behavior of the
ipaddress.ip_network.hosts() method changed. Now /32
addresses are returned by that method as a single
element list. This was apparently done as a bugfix [1]
Change-Id: Iab6d96351fa21131d834ccf07ffddd70555f25a7
Closes-Bug: #1934345
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
[1] https://bugs.python.org/issue27683
When an operator sets a limit that is greater than 2147483647, an
explicit error message "Quota limit should not exceed 2147483647"
is communicated. This is better than the initial error message
which was "ERROR: The server has either erred or is
incapable of performing the requested operation. (HTTP 500)."
Closes-Bug: #1908352
Change-Id: I0d301c5f527c3e16e14021b679c85bd51833a1d6
The config `use_scheduler_creating_share_from_snapshot` has the
help message with wrong name of the scheduler filter that the user must
enable with the option. The filter name is `CreateFromSnapshotFilter`,
instead of `CreateShareFromSnapshot`.
Change-Id: I3e6170f8def53aabd4bc5858fa297061e2873477
CephFS drivers in OpenStack Manila are directing
mgr commands to the mgr by specifying mon-mgr as
the target [0]. This target (mon-mgr) was added
to Ceph in Octopus [1].
We would need a version check in order to set the
correct target while we wait on the backport on Ceph
to land [2].
[0] 3ea5d50a23
[1] 4000d500c0
[2] https://tracker.ceph.com/issues/51039
Closes-Bug: #1930459
Change-Id: I1a1079df8e104c5ddba29cb614eb4e02a304082e
Authorization errors when connecting
to nova/glance/neutron/cinder can be raised as
BadConfigurationExceptions in the logs. We shouldn't
be raising exceptions derived from the service client
libraries.
Change-Id: I2d47dbb1251dfa8d529f813724fb7fd97d7d3a0b
Closes-Bug: #1921927
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
This change fixes the query being used to filter share
types. We were using an "or" clause instead of an "and" clause,
and that was causing all the extra specs to be shown instead of
the ones that the user specified. With this fix, manila users will
be able to filter shares by share type extra_specs accurately.
Closes-Bug: #1929121
Change-Id: I5cf9788dcafebdf88426617d2824f4be42dbb412
Fixes bug #1915706 that was discovered in Manila UI.
Issue is invalid input error being raised, even when
availability_zone provided is the same, as parent share's.
The reason is availability_zone is name and source_share_az
is id in the filter [1]. Now, regardless of availability_zone
provided is id or name, it will be always converted to a name.
And if availability_zone is the same as parent share's
operation will complete successfully.
[1] 2e27c71877/manila/share/api.py (L200)
Closes-Bug: #1915706
Change-Id: I5039b7adf563d926053b423a4cc6e175d3f1e5cf
This change adds a new hook to Manager class called init_host_with_rpc()
to allow services like scheduler to do something once RPC is ready.
Copied from cinder 65fa80c361
and 60c563f72d
Change-Id: Iac6507a6e395c55f0fec453650009f08c2bb6563
Closes-Bug: #1271568
With newer sphinx the pdf build fails and gives the following error:
! Dimension too large.
This could be memory issue, that can be fixed by not generating the
sample_policy file as that can be large.
This patch also sets back the tox-docs job as voting.
Closes-Bug: #1918707
Change-Id: I4f22fe7b45394045f672d5bbd3b46c4e5e4b2fd3