IBM Spectrum Scale cinder driver (GPFS) support copy-on-write feature
in all the configuration. Resolving the bug mentioned below will
enable mmclone feature of the IBM Spectrum Scale filesystem to provide
better performance while configured in GPFS NFS mode.
Closes-Bug: #1947134
Closes-Bug: #1947123
Change-Id: I3e77c890c7abca85dab92500eae989b4dff9824d
test.py was previously not in the tests
directory. This means that downstream packagers
of Cinder have to specifically exclude it from
the main Cinder package (which does not typically
include unit tests).
Move it under the cinder/tests/unit/ dir where it
should be, to clean this up.
Change-Id: I65c50722f5990f540d84fa361b997302bbc935c5
Glance now has ability to configure multiple stores at a
time. To use this feature in cinder for uploading volume to image, operator
need to define a new field named 'image_service:store_id' in the
volume-type extra-specs. At a time of volume upload to image request, if
'image_service:store_id' is present in the associated volume type, then
image will be uploaded to specified 'store_id'. The value 'store_id' is
nothing but store identifier defined in glance-api.conf. If the value
of 'image_service:store_id' is null or not set in volume-type then the
image will be uploaded to default store in glance.
Co-authored-by: Sagar Waghmare <sawaghma@redhat.com>
Co-authored-by: Abhishek Kekane <akekane@redhat.com>
DocImpact
Implements: bp support-glance-multiple-backend
Change-Id: Ica56833a1d9fb9f47b922dbbc6558901bb3a2800
This adds usage of the flake8-import-order extension to our flake8
checks to enforce consistency on our import ordering to follow the
overall OpenStack code guidelines.
Since we have now dropped Python 2, this also cleans up a few cases for
things that were third party libs but became part of the standard
library such as mock, which is now a standard part of unittest.
Some questions, in order of importance:
Q: Are you insane?
A: Potentially.
Q: Why should we touch all of these files?
A: This adds consistency to our imports. The extension makes sure that
all imports follow our published guidelines of having imports ordered
by standard lib, third party, and local. This will be a one time
churn, then we can ensure consistency over time.
Q: Why bother. this doesn't really matter?
A: I agree - but...
We have the issue that we have less people actively involved and less
time to perform thorough code reviews. This will make it objective and
automated to catch these kinds of issues.
But part of this, even though it maybe seems a little annoying, is for
making it easier for contributors. Right now, we may or may not notice
if something is following the guidelines or not. And we may or may not
comment in a review to ask for a contributor to make adjustments to
follow the guidelines.
But then further along into the review process, someone decides to be
thorough, and after the contributor feels like they've had to deal with
other change requests and things are in really good shape, they get a -1
on something mostly meaningless as far as the functionality of their
code. It can be a frustrating and disheartening thing.
I believe this actually helps avoid that by making it an objective thing
that they find out right away up front - either the code is following
the guidelines and everything is happy, or it's not and running local
jobs or the pep8 CI job will let them know right away and they can fix
it. No guessing on whether or not someone is going to take a stand on
following the guidelines or not.
This will also make it easier on the code reviewers. The more we can
automate, the more time we can spend in code reviews making sure the
logic of the change is correct and less time looking at trivial coding
and style things.
Q: Should we use our hacking extensions for this?
A: Hacking has had to keep back linter requirements for a long time now.
Current versions of the linters actually don't work with the way
we've been hooking into them for our hacking checks. We will likely
need to do away with those at some point so we can move on to the
current linter releases. This will help ensure we have something in
place when that time comes to make sure some checks are automated.
Q: Didn't you spend more time on this than the benefit we'll get from
it?
A: Yeah, probably.
Change-Id: Ic13ba238a4a45c6219f4de131cfe0366219d722f
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Much of our code renames this at import already --
just name it "volume_utils" for consistency, and
to make code that imports other modules named "utils"
less confusing.
Change-Id: I3cdf445ac9ab89b3b4c221ed2723835e09d48a53
This reverts commit a62c9dfdd4.
This did not account for cases where truncate is
called w/o elevated privileges.
Related-Bug: #1818504
Change-Id: I3cb85be854e68fda525cfebe254ce7c85d8e3d37
Our cinder.conf.sample lists all of the options that are defined by
drivers in the [DEFAULT] section. Since removal of single-backend config
(without enabled_backends) this is misleading as those options are
functional only when defined in [<backend_name>] section. This commit
aims to move all of the driver options to [backend_defaults] section.
Assumption is that this will affect only sample config generation and
should not break anything else.
Change-Id: Ia4766eb313e15adc92a92875519b22db64e95d65
self.assertTrue(string) is fairly dangerous because
things like self.assertTrue('False') will pass.
Require a more specific assertion when passing a
string to assertTrue, which should help prevent mistakes.
Fix up tests that do this currently, some of which
appear to not be testing what they intended.
Change-Id: I0cd29b9f3247ae5b7b3c478b96970b73d69a72c0
This patch adds the consistency group capability to generic group in
GPFS driver. Consistency groups will be used as generic groups.
Change-Id: I31b210a7186e9212b85ce4ec17693c1ae4bed908
Closes-bug: #1682249
This patch fix the force delete for a consistency group
when the backend object (fileset) doesn't exist.
Change-Id: I81c4fc8fd913be11d88dcbcdd38dde88144af8bd
Closes-bug: #1694189
This patch adds a support to fail the unsupported CG operations
for GPFS driver with GPFSDriverUnsupportedOperation exception.
Change-Id: Icd5a693ac75eca0f55cc3ecb014feb192e9e84d7
Closes-bug: #1691526
For a operation of deleting consistency group when it contain
one or more volumes, GPFS driver is currently returning a list
of Volume objects to cinder volume manager which is expecting
a list of dictionaries to use for updating the volumes.
With this patch, GPFS will be able to delete consistency group
forcefully too.
Change-Id: Ie56c443a2a07c86001cbb9269058aaa0ccca6e84
Closes-bug: #1685355
Commit faee0520a4 removed
backup_volume() and restore_backup() volume driver calls
in the backup manager to reduce the coupling between the
backup service and the volume service. Removing the
obsolete backup-restore code in drivers.
Change-Id: I984de3df803f12dbb95e3309e668b3fbd519e70f
This patch enhances the GPFS driver to support the
use case when cinder service is running inside Linux
container hosted on Nova-Compute node (This kind of an
environment is deployed by OpenStack Juju Charm).
With this change, driver would talk to GPFS client
on Nova-Compute nodes over ssh.
Change-Id: Ib3235999d1b34502cdcc8efc359cfc6f5df0412a
Config option gpfs_images_share_mode with parameter choices=['copy',
'copy_on_write', None], that means any other value will raise
ValueError, the check is done by the configuration parser, so no
invalid value will be accepted and the driver doesn't need to check it
again. For more details when we set method set_override with paramter
enforce_type=True, please see: http://paste.openstack.org/show/523740/
Related-Bug: 1517839
Change-Id: I000ab639e68534e7be111cc3759b6ae1dffd5520
This change makes our tests directory cleaner a bit and
helps to find tests faster.
Some of these tests freeze for a long time, so they are skipped.
Related-Bug: #1578986
Change-Id: Ic292b9608cd3d174a2b9b30e7d941e728f32547c