]> review.fuel-infra Code Review - openstack-build/cinder-build.git/log
openstack-build/cinder-build.git
10 years agoMerge "Fix and enable gating on F401"
Jenkins [Mon, 23 Dec 2013 08:16:41 +0000 (08:16 +0000)]
Merge "Fix and enable gating on F401"

10 years agoFix QoS information in initialize_connection() result
Zhiteng Huang [Wed, 11 Dec 2013 15:56:14 +0000 (23:56 +0800)]
Fix QoS information in initialize_connection() result

Currently the entire QoS information (if any) is included in the result of
initialize_connection() even if the consumer of the QoS is 'back-end'. Also
the format for QoS specs also is changed so that front-end (Nova) can
parse correctly. Add unit test to cover initialize_connection().

Closes-bug: 1259957

DocImpact

Change-Id: Ibc5e92cc1ddf6404e5b234ef524698feae282eec

10 years agoFix and enable gating on F401
Dirk Mueller [Fri, 13 Dec 2013 12:29:12 +0000 (13:29 +0100)]
Fix and enable gating on F401

Do not allow unused imports in modules, and remove those
that are currently unused.

Change-Id: I7600b1cce22eaef87633f98a89db2086a3ec2b55

10 years agoMerge "Add exception logging if flow creation fails"
Jenkins [Wed, 18 Dec 2013 07:19:23 +0000 (07:19 +0000)]
Merge "Add exception logging if flow creation fails"

10 years agoMerge "Do not clone non-raw images in rbd backend"
Jenkins [Wed, 18 Dec 2013 00:39:23 +0000 (00:39 +0000)]
Merge "Do not clone non-raw images in rbd backend"

10 years agoMerge "Fix and enable gating on H402"
Jenkins [Wed, 18 Dec 2013 00:21:24 +0000 (00:21 +0000)]
Merge "Fix and enable gating on H402"

10 years agoAdd exception logging if flow creation fails
Joshua Harlow [Tue, 17 Dec 2013 23:20:02 +0000 (15:20 -0800)]
Add exception logging if flow creation fails

If the create_XYZ_flow fails in being created
its useful to log exactly what the error was in
detail (instead of trapping it and only raising
a generic error). The more detailed error shows
what the real problem was during the flows
construction (which usually is some larger
problem).

Change-Id: I9cd6b8e2c6298d8791ba3063be78f9b4c4a7c5d0

10 years agoMerge "make delete recovery messages debug level"
Jenkins [Tue, 17 Dec 2013 17:12:16 +0000 (17:12 +0000)]
Merge "make delete recovery messages debug level"

10 years agoMerge "Fix KeyError while generating a WSGI response"
Jenkins [Tue, 17 Dec 2013 13:15:02 +0000 (13:15 +0000)]
Merge "Fix KeyError while generating a WSGI response"

10 years agomake delete recovery messages debug level
Sean Dague [Tue, 17 Dec 2013 12:29:46 +0000 (07:29 -0500)]
make delete recovery messages debug level

lvm.delete has recovery logic within it to do a second attempt
if it should fail the first time. It is currently however logging
those second attempts at error and warn levels. However, as this
is normal flow these should be debug level instead.

This is currently causing a few resets in the gate because this
is a non whitelisted error.

Change-Id: Ie684331d9d97c089ec23569d06981e90eb7f6a67
Closes-Bug: #1261731

10 years agoMerge "Remove unused code from volume manager (reset_stats)"
Jenkins [Tue, 17 Dec 2013 08:45:49 +0000 (08:45 +0000)]
Merge "Remove unused code from volume manager (reset_stats)"

10 years agoMerge "Pylint fixes for Brick iSCSI/LVM"
Jenkins [Tue, 17 Dec 2013 08:33:28 +0000 (08:33 +0000)]
Merge "Pylint fixes for Brick iSCSI/LVM"

10 years agoMerge "Pylint fixes for GlusterFS driver"
Jenkins [Tue, 17 Dec 2013 08:33:25 +0000 (08:33 +0000)]
Merge "Pylint fixes for GlusterFS driver"

10 years agoMerge "Imported Translations from Transifex"
OpenStack Jenkins [Tue, 17 Dec 2013 05:02:38 +0000 (05:02 +0000)]
Merge "Imported Translations from Transifex"

10 years agoMerge "3PAR FC: add ability to add WWNs to host"
Jenkins [Tue, 17 Dec 2013 04:41:14 +0000 (04:41 +0000)]
Merge "3PAR FC: add ability to add WWNs to host"

10 years agoMerge "Use mock for scheduler tests"
Jenkins [Tue, 17 Dec 2013 03:58:29 +0000 (03:58 +0000)]
Merge "Use mock for scheduler tests"

10 years agoMerge "[Netapp/Nexenta] Move registration of config options"
Jenkins [Tue, 17 Dec 2013 03:47:42 +0000 (03:47 +0000)]
Merge "[Netapp/Nexenta] Move registration of config options"

10 years agoMerge "Adds unit tests for drivers.rbd.RBDImageIOWrapper"
Jenkins [Tue, 17 Dec 2013 00:39:52 +0000 (00:39 +0000)]
Merge "Adds unit tests for drivers.rbd.RBDImageIOWrapper"

10 years agoRemove unused code from volume manager (reset_stats)
Eric Harney [Mon, 16 Dec 2013 22:50:49 +0000 (17:50 -0500)]
Remove unused code from volume manager (reset_stats)

self._last_volume_stats appears to be unused, now that we don't
use _volume_stats_changed().  This means reset_stats() also does
nothing.

This triggered a pylint 'attribute-defined-outside-init' warning.

Change-Id: I4c4f7497e72f726f3430f90df61188bf2f1073c1

10 years agoPylint fixes for GlusterFS driver
Eric Harney [Mon, 16 Dec 2013 22:44:02 +0000 (17:44 -0500)]
Pylint fixes for GlusterFS driver

Remove unused 're' import
Remove unused parameter for _create_snapshot()

Change-Id: I40411b6206d282ae07c905faa44dcccecb45c120

10 years agoPylint fixes for Brick iSCSI/LVM
Eric Harney [Mon, 16 Dec 2013 22:29:32 +0000 (17:29 -0500)]
Pylint fixes for Brick iSCSI/LVM

Fixes a few of the more straightforward pylint errors
in these files.  (anomalous-backslash-in-string,
attribute-defined-outside-init, and bad-indentation)

Change-Id: Ic131717a83fe182fe578b63eccf364d300a8989c

10 years ago3PAR FC: add ability to add WWNs to host
Jim Branen [Fri, 6 Dec 2013 23:32:53 +0000 (15:32 -0800)]
3PAR FC: add ability to add WWNs to host

When a host is created on the HP 3PAR array,
at initialize connection time, the host is
created with all WWNs provided in the connector
structure. However, the driver did not have
the ability to add new WWNs after a host is created.

This patch adds the ability to add WWNs to a
host, at initialize connection time, if a new
WWN is provided in the connector structure.

Change-Id: I6fd8a5511f83d5460da30ff5558a3e95964a95f5
Closes-bug: 1258229

10 years agoImported Translations from Transifex
OpenStack Jenkins [Mon, 16 Dec 2013 06:14:18 +0000 (06:14 +0000)]
Imported Translations from Transifex

Change-Id: I2554bd4a076f855c8f2026d98ecb649b35edcbf8

10 years agoAdjust import order according to PEP8 imports rule
Jay Lau [Sat, 14 Dec 2013 15:54:16 +0000 (10:54 -0500)]
Adjust import order according to PEP8 imports rule

This patch just adjust import order to follow PEP8 imports rule.
See http://www.python.org/dev/peps/pep-0008/#imports

Imports should be grouped in the following order:
1) Standard library imports
2) Related third party imports
3) Local application/library specific imports

Change-Id: Ifa3f219207b02d60e757e17c42dae1fef2f628fe

10 years agoDo not clone non-raw images in rbd backend
Dmitry Borodaenko [Wed, 27 Nov 2013 22:33:00 +0000 (14:33 -0800)]
Do not clone non-raw images in rbd backend

RBD backend only supports booting from images in raw format. A volume
that was cloned from an image in any other format is not bootable. The
RBD driver will consider non-raw images to be uncloneable to trigger
automatic conversion to raw format.

Includes conversion of the corresponding unit test to use mock (instead
of mox) and expanded comments and error messages based on change #58893
by Edward Hope-Morley.

Change-Id: I5725d2f7576bc1b3e9b874ba944ad17d33a6e2cb
Closes-Bug: #1246219
Closes-Bug: #1247998

10 years agoAdds unit tests for drivers.rbd.RBDImageIOWrapper
Edward Hope-Morley [Sat, 14 Dec 2013 22:52:52 +0000 (22:52 +0000)]
Adds unit tests for drivers.rbd.RBDImageIOWrapper

Change-Id: Id256ec6ed20c1f52eb67cf5a807f67b01a641962
Closes-bug: 1238614

10 years agoMerge "GlusterFS: Complete snapshot_delete when info doesn't exist"
Jenkins [Sun, 15 Dec 2013 08:38:17 +0000 (08:38 +0000)]
Merge "GlusterFS: Complete snapshot_delete when info doesn't exist"

10 years agoMerge "Remove test that was no longer used for long"
Jenkins [Sun, 15 Dec 2013 08:38:12 +0000 (08:38 +0000)]
Merge "Remove test that was no longer used for long"

10 years agoMerge "Add disabled_reason field to services table"
Jenkins [Sat, 14 Dec 2013 14:47:48 +0000 (14:47 +0000)]
Merge "Add disabled_reason field to services table"

10 years ago[Netapp/Nexenta] Move registration of config options
Dirk Mueller [Thu, 12 Dec 2013 13:17:43 +0000 (14:17 +0100)]
[Netapp/Nexenta] Move registration of config options

This doesn't really make a difference in practice, but
makes it possible for the sample config generator to figure
out the config group relationship when options are in one
file.

Change-Id: I3bc6ab5bcc85a8c11c9261b0d8c520fb846a7864

10 years agoFix and enable gating on H402
Dirk Mueller [Sat, 14 Dec 2013 11:33:24 +0000 (12:33 +0100)]
Fix and enable gating on H402

Summary docstrings should end with punctuation.
Also changed it to command-style in a few places.

Change-Id: Id94fe995aa05356106ad09899b0ada27d608ff21

10 years agoMerge "make help text more meaningful for cinder docs"
Jenkins [Sat, 14 Dec 2013 08:32:27 +0000 (08:32 +0000)]
Merge "make help text more meaningful for cinder docs"

10 years agoMerge "Switch create volume commands to Taskflow 0.1.1"
Jenkins [Sat, 14 Dec 2013 05:55:24 +0000 (05:55 +0000)]
Merge "Switch create volume commands to Taskflow 0.1.1"

10 years agoMerge "Make sure report_interval is less than service_down_time"
Jenkins [Sat, 14 Dec 2013 03:22:17 +0000 (03:22 +0000)]
Merge "Make sure report_interval is less than service_down_time"

10 years agoMerge "Remove LANG=C from rootwrap invocations"
Jenkins [Fri, 13 Dec 2013 19:30:50 +0000 (19:30 +0000)]
Merge "Remove LANG=C from rootwrap invocations"

10 years agoRemove test that was no longer used for long
Zhiteng Huang [Fri, 13 Dec 2013 14:20:47 +0000 (22:20 +0800)]
Remove test that was no longer used for long

test_too_big_volume() case in test_volume.py was legacy from nova-
volume, it was never actually testing anything.  This change removes
this case for good.

Change-Id: I66e0eb80326f039ddc580dec0409fd4090ba5102

10 years agoMerge "Lazy log the fixed_key warnings"
Jenkins [Fri, 13 Dec 2013 14:09:00 +0000 (14:09 +0000)]
Merge "Lazy log the fixed_key warnings"

10 years agomake help text more meaningful for cinder docs
Bob Callaway [Thu, 12 Dec 2013 15:39:39 +0000 (10:39 -0500)]
make help text more meaningful for cinder docs

Change-Id: I5ccb7801a6df8039c59c7a2f2aacd72907a076a4
Closes-Bug: 1260373

10 years agoMerge "Add the driver name to get stats log output"
Jenkins [Thu, 12 Dec 2013 18:24:42 +0000 (18:24 +0000)]
Merge "Add the driver name to get stats log output"

10 years agoSwitch create volume commands to Taskflow 0.1.1
anastasia-karpinska [Tue, 10 Dec 2013 21:12:31 +0000 (23:12 +0200)]
Switch create volume commands to Taskflow 0.1.1

- Old TaskFlow code was removed from Cinder.

- TaskFlow 0.1.1 was added to Cinder requirements.

- Create volume flows for volume.api, volume.manager and
  scheduler.manager were updated to use taskFlow 0.1.1

Partially implements: blueprint create-volume-flow
Change-Id: Idbac8d001436f02978b366fbb3205ce84c847267

10 years agoUse mock for scheduler tests
Avishay Traeger [Tue, 10 Dec 2013 08:43:07 +0000 (10:43 +0200)]
Use mock for scheduler tests

In our effort to move from mox to mock, this patch will convert the
scheduler unit tests to use mock exclusively.  Also fixed some pylint
errors along the way.

Change-Id: If5a94838981a04a38c2797ced07f23abfafbedb7

10 years agoRemove LANG=C from rootwrap invocations
Dirk Mueller [Wed, 11 Dec 2013 23:49:27 +0000 (00:49 +0100)]
Remove LANG=C from rootwrap invocations

For more than a decade already, systems support LC_ALL=C,
which overwrites LANG=C, so setting both is only confusing.

Change-Id: I5640b9cb747892162a856315ea7331cfea7cba5a

10 years agoAdd the driver name to get stats log output
Walter A. Boring IV [Mon, 9 Dec 2013 19:58:40 +0000 (11:58 -0800)]
Add the driver name to get stats log output

When the manager call tries to update the driver
stats, it checks to ensure the driver is initialized.
When the driver hasn't been initialized, it logs
a warning without the driver name.  This is confusing
for multiple backends.   This patch adds the driver
name, version and the config group name, to the log output,
so the admin can see which driver is failing.

Change-Id: I82e8aa969e7baa55db9c8dddc1c08db2a1a41091
Closes-Bug: #1259279

10 years agoRemove hashbang (#!) at beginning of python modules
Dirk Mueller [Wed, 11 Dec 2013 23:02:30 +0000 (00:02 +0100)]
Remove hashbang (#!) at beginning of python modules

Change-Id: I8f138f82952938fcfaa0e9fc150cb97471febb31

10 years agoFix KeyError while generating a WSGI response
huangtianhua [Wed, 11 Dec 2013 09:35:13 +0000 (17:35 +0800)]
Fix KeyError while generating a WSGI response

The KeyError exception raised while generating a WSGI response based on
the 413 exception. Because there may be no "Retry-After" attribute in the
exception headers.

Change-Id: I89eb1878acc2195775be17fbcba8088f2e00bac1
Closes-Bug: #1259867

10 years agoUpdated from global requirements
OpenStack Jenkins [Tue, 10 Dec 2013 00:16:34 +0000 (00:16 +0000)]
Updated from global requirements

Change-Id: I2d8f240009d2f847b321baa011880f753783be83

10 years agoLazy log the fixed_key warnings
Dan Prince [Tue, 10 Dec 2013 19:51:32 +0000 (14:51 -0500)]
Lazy log the fixed_key warnings

Cinder currently spews quite a bit of WARNINGs like this with
the default settings:

WARNING cinder.keymgr.conf_key_mgr [-] config option keymgr.fixed_key
has not been defined: some operations may fail unexpectedly

Many users may not be using features that require key manager...
so logging the WARNING message a bit more lazily seems reasonable.

Change-Id: I5ab72285c7d4bc2ec3196dd94fabf977b3a4ebaf
Closes-bug: 1252512

10 years agoMerge "delete.start/delete.end notification for hostless"
Jenkins [Tue, 10 Dec 2013 05:58:10 +0000 (05:58 +0000)]
Merge "delete.start/delete.end notification for hostless"

10 years agoMerge "GlusterFS: Remove glusterfs_disk_util option"
Jenkins [Tue, 10 Dec 2013 05:46:55 +0000 (05:46 +0000)]
Merge "GlusterFS: Remove glusterfs_disk_util option"

10 years agoMerge "Catch TypeError when new_size is None on extend"
Jenkins [Tue, 10 Dec 2013 05:46:47 +0000 (05:46 +0000)]
Merge "Catch TypeError when new_size is None on extend"

10 years agoMerge "Sync matchmaker_ring.py from oslo-incubator"
Jenkins [Tue, 10 Dec 2013 04:23:57 +0000 (04:23 +0000)]
Merge "Sync matchmaker_ring.py from oslo-incubator"

10 years agoAdd disabled_reason field to services table
Jay Lau [Tue, 10 Dec 2013 00:45:30 +0000 (08:45 +0800)]
Add disabled_reason field to services table

Add a column (String 255) in the services table to store
disabled_reason field.

Change-Id: I3cc03029831bdf6a52e9b65c673794430807aeee
Implements part of bp record-reason-for-disabling-service

10 years agoMerge "Add RBD test for volume not existing during delete"
Jenkins [Tue, 10 Dec 2013 00:16:03 +0000 (00:16 +0000)]
Merge "Add RBD test for volume not existing during delete"

10 years agoCatch TypeError when new_size is None on extend
john-griffith [Mon, 9 Dec 2013 23:00:20 +0000 (16:00 -0700)]
Catch TypeError when new_size is None on extend

The volume_actions extend method does not catch/handle TypeError
exceptions.  The tempest volume_actions test includes a negative
test that doesn't pass in a new-size so the result is we get an
unhandled exception/trace in the log files for these runs.

Change-Id: I8b699a28e06e62126da02c3318d3129412dffa6b
Closes-Bug: #1259336

10 years agoMerge "LVM migration: Check if name is equal to dest_vg"
Jenkins [Mon, 9 Dec 2013 22:15:45 +0000 (22:15 +0000)]
Merge "LVM migration: Check if name is equal to dest_vg"

10 years agoSync matchmaker_ring.py from oslo-incubator
Paul Mathews [Tue, 3 Dec 2013 22:35:18 +0000 (15:35 -0700)]
Sync matchmaker_ring.py from oslo-incubator

Cinder does not currently include the matchmaker driver, which is the
preferred configuration with ZeroMQ.

Change-Id: I8514f1780e6492f9d37134d282a5196709347bd8
Partial-Bug: #1185690

10 years agoMerge "Brick LVM: Set C locale when gathering PV info"
Jenkins [Mon, 9 Dec 2013 18:24:01 +0000 (18:24 +0000)]
Merge "Brick LVM: Set C locale when gathering PV info"

10 years agoMerge "Adds lock for create from vol/snap to avoid race conditions"
Jenkins [Mon, 9 Dec 2013 18:19:11 +0000 (18:19 +0000)]
Merge "Adds lock for create from vol/snap to avoid race conditions"

10 years agoMerge "Sync rpc fix from oslo-incubator"
Jenkins [Mon, 9 Dec 2013 18:12:49 +0000 (18:12 +0000)]
Merge "Sync rpc fix from oslo-incubator"

10 years agoMerge "Returns thin pool free space calculated from actual usage"
Jenkins [Mon, 9 Dec 2013 16:26:04 +0000 (16:26 +0000)]
Merge "Returns thin pool free space calculated from actual usage"

10 years agoMerge "Fixes case insensitive for resp body"
Jenkins [Mon, 9 Dec 2013 07:17:28 +0000 (07:17 +0000)]
Merge "Fixes case insensitive for resp body"

10 years agoMerge "Convert lvm_mirrors to int"
Jenkins [Mon, 9 Dec 2013 07:07:40 +0000 (07:07 +0000)]
Merge "Convert lvm_mirrors to int"

10 years agoMerge "LVM migrate: Use keywords for the brick instance"
Jenkins [Sun, 8 Dec 2013 08:03:07 +0000 (08:03 +0000)]
Merge "LVM migrate: Use keywords for the brick instance"

10 years agoAdd RBD test for volume not existing during delete
Mike Perez [Fri, 6 Dec 2013 19:13:09 +0000 (11:13 -0800)]
Add RBD test for volume not existing during delete

For cases when the volume does not exist in the backend, but Cinder
still knows about it, we just return from the rbd driver and let Cinder
do its thing.

Change-Id: I6150756bdd48259ec8d550fa7a5dc7a9f882ca22

10 years agoMerge "LVM: Create thin pools of adequate size"
Jenkins [Fri, 6 Dec 2013 19:12:59 +0000 (19:12 +0000)]
Merge "LVM: Create thin pools of adequate size"

10 years agoSync rpc fix from oslo-incubator
Flavio Percoco [Fri, 6 Dec 2013 10:06:09 +0000 (11:06 +0100)]
Sync rpc fix from oslo-incubator

Sync the following fixes from oslo-incubator:

ef406a2 Create a shared queue for QPID topic consumers
e227c0e Properly reconnect subscribing clients when QPID broker restarts

Change-Id: I934a6ea6e9eb510513640870750ea37e6f076df9
Closes-bug: #1251757
Closes-bug: #1257293

10 years agoReturns thin pool free space calculated from actual usage
Giulio Fidente [Tue, 3 Dec 2013 12:44:20 +0000 (13:44 +0100)]
Returns thin pool free space calculated from actual usage

This change adds a hidden method which calculates the thin
pool free space from the data_percent LVM options and reports it
accordingly in _update_volume_stats()

Change-Id: Id6a69644505ca10811db458ea90ed10f643054b2
Closes-Bug: 1249782

10 years agoMerge "Catch ImageBusy exception when deleting rbd volume"
Jenkins [Fri, 6 Dec 2013 00:00:42 +0000 (00:00 +0000)]
Merge "Catch ImageBusy exception when deleting rbd volume"

10 years agoBrick LVM: Set C locale when gathering PV info
Eric Harney [Thu, 5 Dec 2013 23:12:33 +0000 (18:12 -0500)]
Brick LVM: Set C locale when gathering PV info

Some locales use commas as decimal separators, which means
that code breaks when someone expects to be able to use the
PV size as a float.

Change-Id: Idceb405e021ea8a0f44e19be43bad1307fbbb51c
Related-Bug: 1219963

10 years agoLVM migration: Check if name is equal to dest_vg
Flavio Percoco [Thu, 5 Dec 2013 16:05:33 +0000 (17:05 +0100)]
LVM migration: Check if name is equal to dest_vg

The existence check of the destination volume group is wrong. It
currently checks if there's a VG with a name equal to the source's vg
name instead of checking if it's equal to the dest_vg.

Closes-bug: #1258203
Change-Id: Ia5d4acb24b94c6aa832107c7eb4b6996985af97f

10 years agoConvert lvm_mirrors to int
Flavio Percoco [Thu, 5 Dec 2013 15:14:39 +0000 (16:14 +0100)]
Convert lvm_mirrors to int

When the location_info is parsed and `lvm_mirrors` extracted, it is not
being converted to int. This causes some boolean checks to return True
even when there are not mirrors enabled because of the u'0'.

Closes-bug: #1258133
Change-Id: I67c463d9f139fe326bbcab4d193c45459129b514

10 years agoLVM migrate: Use keywords for the brick instance
Flavio Percoco [Thu, 5 Dec 2013 12:48:24 +0000 (13:48 +0100)]
LVM migrate: Use keywords for the brick instance

In the `migrate_volume` method a new instance is created when the
dest_vg is not equal to the source vg. This new brick instance is
created using positional arguments instead of keywords. However, some of
those arguments are passed in the wrong positions.

This patch uses keywords for the misplaced arguments.

The patch also changes `test_lvm_migrate_volume_proceed` in order to
fully test the happy path and catch things like this.

Closes-bug: #1258128
Change-Id: I75cf91171709554053fd5b52a4aae4e176e8364e

10 years agoLVM: Create thin pools of adequate size
Jon Bernard [Thu, 21 Nov 2013 22:58:13 +0000 (17:58 -0500)]
LVM: Create thin pools of adequate size

Thin pools in LVM are quite different from volume groups or logical
volumes and their differences must be taken into account when providing
thin LVM support in Cinder.

When you create a thin pool, LVM actually creates 4 block devices.  You
can see this after thin pool creation with the following command:

    $ dmsetup ls

    volumes--1-volumes--1--pool       (253:4)
    volumes--1-volumes--1--pool-tpool (253:3)
    volumes--1-volumes--1--pool_tdata (253:2)
    volumes--1-volumes--1--pool_tmeta (253:1)

In the above command, a thin pool named 'volumes-1-pool' was created in
the 'volumes-1' volume group.  Despite this, the 'lvs' command will only
show one logical volume for the thin pool, which can be misleading if
you aren't aware of how thin pools are implemented.

When you create a thin pool, you specify on the command line a size for
the pool.  LVM will interpret this size as the amount of space requested
to store data blocks only.  In order to allow volume sharing and
snapshots, some amount of metadata must be reserved in addition to the
data request.  This amount is calculated by LVM internally and varies
depending on volume size and chunksize.  This is why one cannot simply
allocate 100% of a volume group to a thin pool - there must be some
remaining space for metadata or you will not be able to create volumes
and snapshots that are pool-backed.

This patch allocates 95% of a volume group's free space to the thin
pool.  By doing this, we allow LVM to successfully allocate a region for
metadata.  Additionally, any free space remaining will by dynamically
used by either data or metadata if capacity should become scarce.

The 95/5 split seems like a sane default.  This split can easily (and
probably should) be made user-configurable in the future if the user
expects an abnormal amount of volume sharing.

Change-Id: Id461445780c1574db316ede0c0194736e71640d0
Closes-Bug: #1245909

10 years agoGlusterFS: Remove glusterfs_disk_util option
Eric Harney [Thu, 5 Dec 2013 18:45:46 +0000 (13:45 -0500)]
GlusterFS: Remove glusterfs_disk_util option

The glusterfs_disk_util option lets one choose whether to
use df or du to calculate space usage.  This serves no real
useful purpose.  Should remove this option to simplify things.

Since this does not meaningfully impact behavior, removal of
this option shouldn't require any special deprecation efforts.

(This same change was made for the NFS driver in 5bf7b9be.)

DocImpact: Remove config option

Change-Id: I302692454b43de15688d65873a72a3dada0c67cb

10 years agoCatch ImageBusy exception when deleting rbd volume
Edward Hope-Morley [Wed, 4 Dec 2013 18:13:06 +0000 (18:13 +0000)]
Catch ImageBusy exception when deleting rbd volume

If we try to delete an rbd volume that has 'watchers' on it
i.e. client connections that have not yet been closed
possibly because a client crashed, the remove() will throw an
ImageBusy exception. We now catch this exception and raise
VolumeIsBusy with a useful message.

If the volume delete fails in this way it will now stay as
'available' instead of going to 'error_deleting' so that the
delete can be retried (since it is expected to work on a
retry after waiting for the connection to timeout).

Change-Id: I5bc9a5f71bdb0f9c5d12b5577e68377e66561f5b
Closes-bug: 1256259

10 years agoAdds lock for create from vol/snap to avoid race conditions
Edward Hope-Morley [Thu, 14 Nov 2013 19:00:00 +0000 (19:00 +0000)]
Adds lock for create from vol/snap to avoid race conditions

This patch protects create from volume/snapshot by using a
lockfile to protect the operation from concurrent deletes of
the volume/snapshot used in the create operation.

Currently, if a volume/snapshot is deleted while a volume is
being created from it that delete may complete during the
create operation thus leaving the new volume in error or stuck
state. This lock will ensure that:

(a) if a create of VolA from snap/volB is in progress, any
    delete requests for snap/volB will wait until the create
    is complete.

(b) if a delete of snap/volA is in progress, any create from
    snap/volA will wait until snap/volA delete is complete.

Co-authored-by: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Closes-Bug: 1251334
Change-Id: Ie4bc0af789ab232593f55aa2f6b34345eb9b9929

10 years agoFix docstring for snapshot_metadata controller
huangtianhua [Thu, 5 Dec 2013 02:14:16 +0000 (10:14 +0800)]
Fix docstring for snapshot_metadata controller

Change-Id: I8227c79c35688da03f5b850daec3215d7c79b2a6
Closes-Bug: #1258000

10 years agoMerge "NetApp fix for vsadmin role failure for ssc"
Jenkins [Thu, 5 Dec 2013 08:36:19 +0000 (08:36 +0000)]
Merge "NetApp fix for vsadmin role failure for ssc"

10 years agoMerge "Update hacking to hacking>=0.8.0,<0.9"
Jenkins [Thu, 5 Dec 2013 08:36:11 +0000 (08:36 +0000)]
Merge "Update hacking to hacking>=0.8.0,<0.9"

10 years agoFixes case insensitive for resp body
huangtianhua [Thu, 5 Dec 2013 03:15:11 +0000 (11:15 +0800)]
Fixes case insensitive for resp body

Create metadata for a volume with key-value set, which key in uppercase
and lowercase(e.g.{"key": "v1", "KEY": "V1"), the server accept the
request and return the key-value set {"key": "v1", "KEY": "V1"}. But the
server just add one metadata because the server is not case sensitive.

The patch will modify the resp body with the one which the server added.

update_all has the same ploblem.

Fixes errors on v2 unittest without difficulty.

DocImpact
Closes-Bug: #1258004

Change-Id: Ic337c0a351ac234493e1d73b86ba87520f32289a

10 years agoMerge "All API controllers inherit from wsgi.Controller"
Jenkins [Thu, 5 Dec 2013 03:53:43 +0000 (03:53 +0000)]
Merge "All API controllers inherit from wsgi.Controller"

10 years agoMerge "Fixes case insensitive for resp body"
Jenkins [Wed, 4 Dec 2013 22:16:17 +0000 (22:16 +0000)]
Merge "Fixes case insensitive for resp body"

10 years agoFixes case insensitive for resp body
huangtianhua [Fri, 29 Nov 2013 08:56:35 +0000 (16:56 +0800)]
Fixes case insensitive for resp body

Create metadata for a snapshot with key-value set, which key in uppercase
and lowercase(e.g.{"key": "v1", "KEY": "V1"), the server accept the
request and return the key-value set {"key": "v1", "KEY": "V1"}. But the
server just add one metadata because the server is not case sensitive.

The patch will modify the resp body with the one which the server added.

update_all has the same ploblem.

DocImpact
Change-Id: I684049412a4aa84f593e970c87157c74fffdfffe
Closes-Bug: #1255917

10 years agoMerge "Change method name to test_get_volume_stats"
Jenkins [Wed, 4 Dec 2013 07:05:13 +0000 (07:05 +0000)]
Merge "Change method name to test_get_volume_stats"

10 years agoAll API controllers inherit from wsgi.Controller
ling-yun [Tue, 3 Dec 2013 08:19:17 +0000 (16:19 +0800)]
All API controllers inherit from wsgi.Controller

Most of the Cinder Public API Controllers inherit from wsgi.Controller,
but still some Cinder Public APIs controllers directly inherit from
object. So it's necessary to unify all the Cinder Public API Controllers
inherit from wsgi.Controller.
1. For code cleanup.
2. When we try to do body valid check in api's put/post method later, we
can use the helper function is_valid_body instead of using try...catch
block.

Change-Id: I88812224e0b182939cfccce63982cb8f95792891
Closes-Bug: #1257198

10 years agodelete.start/delete.end notification for hostless
Jay S. Bryant [Wed, 4 Dec 2013 03:31:17 +0000 (21:31 -0600)]
delete.start/delete.end notification for hostless

Third party GUIs may rely on notifications to track the
progress of volume creation and deletion.  In the case that
a volume is being deleted after a failed attempt to create
(the volume is listed in the database but is not actually
resident in a backing store) the path that is taken in
volume.api.delete() makes no notifications of deletion
occurring.

This patch adds a volume_utils.notify_about_volume_usage
call to the beginning and end of the delete with a
delete.start and delete.end respectively.  The notifications
serve as triggers for GUIs to refresh the state of the
volume.  This change makes the hostless delete path's
functionality more consistent with the other paths through
the delete code.

Change-Id: I091b9d277834b341105569d41a48ef5c1fc105ce
Closes-Bug: 1257053

10 years agoMerge "Add attach/detach notifications"
Jenkins [Wed, 4 Dec 2013 01:44:58 +0000 (01:44 +0000)]
Merge "Add attach/detach notifications"

10 years agoMerge "Add unit tests for volume reserve and unreserve"
Jenkins [Wed, 4 Dec 2013 00:42:41 +0000 (00:42 +0000)]
Merge "Add unit tests for volume reserve and unreserve"

10 years agoMerge "Bump to sqlalchemy-migrate 0.8.2"
Jenkins [Tue, 3 Dec 2013 21:59:14 +0000 (21:59 +0000)]
Merge "Bump to sqlalchemy-migrate 0.8.2"

10 years agoMerge "Don't stop volume service for failed re-export operations"
Jenkins [Tue, 3 Dec 2013 21:58:07 +0000 (21:58 +0000)]
Merge "Don't stop volume service for failed re-export operations"

10 years agoMerge "Add more logging to migrate_volume_completion"
Jenkins [Tue, 3 Dec 2013 20:42:16 +0000 (20:42 +0000)]
Merge "Add more logging to migrate_volume_completion"

10 years agoMerge "Use model_query() in db.*****_destroy"
Jenkins [Tue, 3 Dec 2013 20:42:09 +0000 (20:42 +0000)]
Merge "Use model_query() in db.*****_destroy"

10 years agoMerge "Adjust RBD delete log level"
Jenkins [Tue, 3 Dec 2013 18:47:30 +0000 (18:47 +0000)]
Merge "Adjust RBD delete log level"

10 years agoFix typo/misspelled words
Zhiteng Huang [Tue, 3 Dec 2013 14:49:12 +0000 (22:49 +0800)]
Fix typo/misspelled words

Fix type/misspelled words found by this handy tools:
https://github.com/lyda/misspell-check

Some 'typo's were intentional since they are part of function name,
so they are left alone.

Change-Id: I4badda869521659b541d018727a6f71f518e2ee0

10 years agoUpdate hacking to hacking>=0.8.0,<0.9
Avishay Traeger [Tue, 3 Dec 2013 07:44:35 +0000 (09:44 +0200)]
Update hacking to hacking>=0.8.0,<0.9

Update hacking version to match version specified in requirements repo.

Fixed the following issues, which the newer version checks for:
print "" -> print("")
self.assertEquals -> self.assertEqual
self.assertNotEquals -> self.assertNotEqual

Change-Id: Ic4b70fd8f565cda28e23fe6b1da0e278f949373c
Closes-Bug: #1256738
Closes-Bug: #1256737
Closes-Bug: #1257274

10 years agoAdd more logging to migrate_volume_completion
Avishay Traeger [Tue, 3 Dec 2013 08:47:33 +0000 (10:47 +0200)]
Add more logging to migrate_volume_completion

Add a debug message on entering the function, and an info message if
it was called to clean up an error. This is useful because Nova copies
the data of in-use volumes, and if it fails there will only be a
message in the Nova logs.

Change-Id: I546d0bae8639072727ebe23394885d40255ba1d4

10 years agoMerge "Use assertAlmostEqual instead of failUnlessAlmostEqual in unit tests"
Jenkins [Tue, 3 Dec 2013 08:00:06 +0000 (08:00 +0000)]
Merge "Use assertAlmostEqual instead of failUnlessAlmostEqual in unit tests"

10 years agoUse model_query() in db.*****_destroy
ling-yun [Sat, 30 Nov 2013 09:09:28 +0000 (17:09 +0800)]
Use model_query() in db.*****_destroy

Use model_query() instead of session.query in db.volume_destroy,
db.volume_type_destroy, db.transfer_destroy and db.snapshot_destroy as
other methods use.
model_query function is the query helper which is used in most part of
cinder/db/sqlalchemy/api.py.

Change-Id: I97be252df9d40bb97231e3341d5cedec26af2d93
Closes-Bug: #1256483

10 years agoMerge "Remove unused import and CinderNode sqlalchemy model"
Jenkins [Tue, 3 Dec 2013 03:47:47 +0000 (03:47 +0000)]
Merge "Remove unused import and CinderNode sqlalchemy model"

10 years agoChange method name to test_get_volume_stats
KIYOHIRO ADACHI [Tue, 3 Dec 2013 01:33:57 +0000 (10:33 +0900)]
Change method name to test_get_volume_stats

Change test method name from test_update_volume_stats2 to
test_get_volume_stats in cinder/tests/test_eqlx.py.

It was pointed out by Change-Id:
I0642bdb911ca72517ed655f795e0055f4c4654b8

Change-Id: Id21c67e3e1151573e69ef21714fbf493f62ad425