This code was originally written for Nova by Joe Gordon
<joe.gordon0@gmail.com> and Sean Dague <sean@dague.net>.
This enables debug logging that is exercised by unit test
runs to be handled and detect formatting errors. The debug
logging does not actually go to the console unless the
OS_DEBUG environment variable is set.
As a result, a few formatting errors are detected and
cleaned up with this change.
This also fixes a problem where debug logging from stevedore
is dumped to the console every time an extension is loaded,
which in a gate-cinder-python27 job is 65K+ times.
Change-Id: I989f9d591d1483a56a1bab3c20de583e85997562
Closes-Bug: #1551325
We've merged replication v2.1 (Cheesecake) code with two little issues
in RPC API layer:
* volume.rcpapi have list_replication_targets method, which is unused
and not handled by volume.manager.
* There are no tests for new methods in test_volume_rpcapi module.
This commit sorts this out.
Change-Id: I2ba6ee68e1e729c9d391a846941ae6bdbbefbc9b
Related-Blueprint: replication-update
This flips the tox.ini to always use constraints installation for
all targets. It drops the extra -constraints targets in the process.
This makes it so there is no developer change required to operate in our
new world order.
Change-Id: I2b56835edb2d75b7c871aae030e909578dbb958d
Depends-On: Iecd35d6bc3b1e9e0ed31b48a34e4149d34d55ac2
This adds the 'cascade' parameter to volume delete,
which deletes snapshots along with a volume in
one call.
This is done in the volume manager, and not in
a driver-optimized way, which will be a later
improvement.
Blueprint: del-vols-with-snaps
Change-Id: I33d15b76d4bd0de14c635d404b2c97096c977a58
A bug was introduced where ssh_known_hosts file is created when the unit
tests in test_netapp.py are run. This patch adds mocks to the ssh init
calls to prevent this file creation.
Change-Id: Ie8ac4e7a5236e6735c7c2f4f50c5383f5f23d38e
Closes-bug: #1550542
The unit tests under cinder/tests/unit/volume/drivers/disco
contain three "timeout" tests, each of which runs more than 4s
while waiting for timeouts to expire.
This commit mocks time.time() in those tests using a utility
method that ensures an immediate timeout.
Change-Id: I8453e0231d7563d70732816bd3931140bcc01f4f
Erroneous space in "rule: admin_api" was introduced in change Ibbd6f47c370d8f10c08cba358574b55e3059dcd1
oslo_policy regards space as a separator,
and fails to parse this rule: http://paste.openstack.org/show/488452/
Change-Id: I5de45c97a06b7ddecb36c2a1793c4f3fd5fd21d6
Add back support for -1 limits of child projects. The way that we
support the -1 child limits requires the following changes:
* Continue quota validation up the hierarchy if the current limit is
-1 until we hit a hard limit or no more parents, and update the
any relevant parents' allocated value along the way
* When updating limits, special care needs to be taken when updating
child limit to be -1, or when changing from a -1 limit
* Enable support for creating reservations for "allocated" values
to support the scenario that:
- a volume is created on a project with a limit of -1
- the parent's allocated value has been updated appropriately
- the volume create fails and the child's in_use quota rolls back
- now we must also rollback the parent's allocated value
NOTE: There is a race condition between validation the NestedQuotas
and when the driver may be switched into use, and if -1 quotas are used
the validation could be out of date. Will look into better support for
switching on of NestedQuotas on live deployment with -1 limits, which
would likely leverage the "allocated" reservation system.
Closes-Bug: #1548645
Closes-Bug: #1544774
Closes-Bug: #1537189
Change-Id: I2d1dba87baf3595cc8f48574e0281ac17509fe7d
Currently delete_snapshot return True or False to indicate
whether the snapshot is really deleted on the array. This
is useless and just write for unit tests. Now we will remove
the return value and add another unit test for delete_snapshot.
Closes-Bug: #1549584
Change-Id: I17fea61e3c0f5565ab04bc82f172e638480f45dc