]> review.fuel-infra Code Review - openstack-build/cinder-build.git/log
openstack-build/cinder-build.git
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 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 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 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 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 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 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

10 years agoAdjust RBD delete log level
Mike Perez [Mon, 2 Dec 2013 21:42:52 +0000 (13:42 -0800)]
Adjust RBD delete log level

Set notice of volume no longer existing in RBD backend when attempting
to delete to log INFO level. Also move a comment next to related code.
This is a follow-up to suggestions from
3de7da12d1098ef777305099e5f4a039e536bf99.

Change-Id: I3ff854e0ead79e208106a371e14ec6ac7603d387

10 years agoBump to sqlalchemy-migrate 0.8.2
Dan Prince [Tue, 3 Dec 2013 00:14:43 +0000 (19:14 -0500)]
Bump to sqlalchemy-migrate 0.8.2

This allows us to drop some unsightly sqlalchemy-migrate 0.7.3
patching.

The related requirements change is here:

  Icde6248ca102884323d7912bab0f4a716aa294ec

Change-Id: I5f80dfc07f8256716d025002fc1a1f47e58b2142

10 years agoAdd unit tests for volume reserve and unreserve
Mike Perez [Fri, 22 Nov 2013 06:55:34 +0000 (22:55 -0800)]
Add unit tests for volume reserve and unreserve

This adds unit tests for successful reserving and unreserving, and vice
versa for not being in the right status.

Change-Id: Iaa777055315251efa4a14976e25b9baab222f934

10 years agoDon't stop volume service for failed re-export operations
Eric Harney [Mon, 2 Dec 2013 19:58:57 +0000 (14:58 -0500)]
Don't stop volume service for failed re-export operations

Commit b71570 "Set vol driver initialized before deleting volumes"
changed the manager behavior to call set_initialized() before
attempting to re-export volumes.

Drivers should not be considered initialized before re-export has
succeeded.  Otherwise a failure to export causes the volume
service to stop, when that failure should be handled like any other
failure to initialize.

Closes-Bug: 1257049
Related-Bug: 1232177
Change-Id: Ic6bc89ef3f15dbbc971fdd8c91117cccb5c2801b

10 years agoMerge "Removes dublicated assert from test_migrations.py"
Jenkins [Mon, 2 Dec 2013 15:31:55 +0000 (15:31 +0000)]
Merge "Removes dublicated assert from test_migrations.py"

10 years agoMerge "Fix typo in cinder"
Jenkins [Mon, 2 Dec 2013 10:43:06 +0000 (10:43 +0000)]
Merge "Fix typo in cinder"

10 years agoFix typo in cinder
huangtianhua [Fri, 29 Nov 2013 04:21:48 +0000 (12:21 +0800)]
Fix typo in cinder

tranfers -> transfers
recurse -> recursive
satisified -> satisfied

There are other typos will be fixed in Oslo. The commit is:
https://review.openstack.org/#/c/59319/

Change-Id: I6fc2be0414962f456a827d294e258637af665524
Closes-Bug: #1255908

10 years agoMerge "Fix _update_volume_stats typos"
Jenkins [Mon, 2 Dec 2013 05:44:04 +0000 (05:44 +0000)]
Merge "Fix _update_volume_stats typos"

10 years agoImported Translations from Transifex
OpenStack Jenkins [Sun, 1 Dec 2013 06:16:40 +0000 (06:16 +0000)]
Imported Translations from Transifex

Change-Id: Ia998d21f646311717eda6301be51ec8bf1cb7034

10 years agoAdd attach/detach notifications
Mathieu Gagné [Mon, 7 Oct 2013 20:16:13 +0000 (16:16 -0400)]
Add attach/detach notifications

Add the following notifications:
  - attach.start
  - attach.end
  - detach.start
  - detach.end

Blueprint: attachment-notifications
Change-Id: I4a4b123468c139bc2bcd948a1e7438c3830b5e42

10 years agoRemoves dublicated assert from test_migrations.py
Andrei V. Ostapenko [Sat, 30 Nov 2013 13:49:29 +0000 (15:49 +0200)]
Removes dublicated assert from test_migrations.py

Change-Id: I1f05a0a79827c50d4d826207fafd7330dc89c308

10 years agoMerge "Redundant body validation for volume_upload_image"
Jenkins [Sat, 30 Nov 2013 06:45:02 +0000 (06:45 +0000)]
Merge "Redundant body validation for volume_upload_image"

10 years agoMerge "Fixing check order for empty body in get_body()"
Jenkins [Sat, 30 Nov 2013 05:43:04 +0000 (05:43 +0000)]
Merge "Fixing check order for empty body in get_body()"

10 years agoMerge "GlusterFS: Ensure Cinder can write to shares"
Jenkins [Sat, 30 Nov 2013 05:22:56 +0000 (05:22 +0000)]
Merge "GlusterFS: Ensure Cinder can write to shares"

10 years agoMerge "Make volume_glance_metadata_create compat with DB2"
Jenkins [Sat, 30 Nov 2013 05:22:48 +0000 (05:22 +0000)]
Merge "Make volume_glance_metadata_create compat with DB2"

10 years agoMerge "Updates .gitignore"
Jenkins [Fri, 29 Nov 2013 08:53:18 +0000 (08:53 +0000)]
Merge "Updates .gitignore"

10 years agoMerge "Fix Storwize terminate_connection with no host"
Jenkins [Fri, 29 Nov 2013 08:52:46 +0000 (08:52 +0000)]
Merge "Fix Storwize terminate_connection with no host"

10 years agoMerge "Fix suppressed exceptions for migration downgrade"
Jenkins [Fri, 29 Nov 2013 08:51:13 +0000 (08:51 +0000)]
Merge "Fix suppressed exceptions for migration downgrade"

10 years agoUse assertAlmostEqual instead of failUnlessAlmostEqual in unit tests
Sergio Cazzolato [Fri, 29 Nov 2013 05:38:44 +0000 (00:38 -0500)]
Use assertAlmostEqual instead of failUnlessAlmostEqual in unit tests

The method failUnlessAlmostEqual has been deprecated since python 2.7.
http://docs.python.org/2/library/unittest.html#deprecated-aliases
Also in Python 3, a deprecated warning is raised when using
failUnlessAlmostEqual therefore we should use assertAlmostEqual instead.

Change-Id: Ic9947028afdb5b1ba8f19103018a6f1bc3fc551f
Closes-Bug: #1257068

10 years agoMerge "Add chance weigher to scheduler"
Jenkins [Fri, 29 Nov 2013 03:39:35 +0000 (03:39 +0000)]
Merge "Add chance weigher to scheduler"

10 years agoFixing check order for empty body in get_body()
Andres Buraschi [Thu, 28 Nov 2013 14:35:07 +0000 (11:35 -0300)]
Fixing check order for empty body in get_body()

Cinder API logged the following debug message for each request with
empty body:
"Unrecognized Content-Type provided in request get_body"
Check order was fixed in get_body function to follow the correct flow
and display the right message (empty body).

Change-Id: Ie561983a4da791a412fea3fc390dab718dfce191
Closes-Bug: #1252692

10 years agoUpdates .gitignore
Sushil Kumar [Thu, 28 Nov 2013 07:42:52 +0000 (07:42 +0000)]
Updates .gitignore

To ignore swap files from getting into repository
currently the implemented ignore is *.swp
however vim adds more swap files if .swp exists,
so improving this with .*.sw?

Closes-Bug: #1255857

Change-Id: I22b6fa351dd565d4783f432c01785c706acd8397

10 years agoRemove unused import and CinderNode sqlalchemy model
Olga Kopylova [Wed, 27 Nov 2013 11:45:32 +0000 (13:45 +0200)]
Remove unused import and CinderNode sqlalchemy model

Class CinderNode is never used,
attribute_mapped_collection from sqlalchemy.orm.collections imported but unused.

Change-Id: I5d72aaf0922eab001f2db5b884b65632481df937

10 years agoFix suppressed exceptions for migration downgrade
Rushi Agrawal [Tue, 26 Nov 2013 06:18:38 +0000 (11:48 +0530)]
Fix suppressed exceptions for migration downgrade

In SQLAlchemy migration versions 009, 010 and 020, we missed
reraising exceptions while logging errors in case of a downgrade.
We don't want exceptions to pass silently. This patch fixes that.

Closes-bug: 1227881

Change-Id: Id11b1c5d2e26d208e88bb84e5b46c4b7affc3f9f

10 years agoMerge "Add volume migration code to Nexenta iSCSI volume driver"
Jenkins [Thu, 28 Nov 2013 06:38:11 +0000 (06:38 +0000)]
Merge "Add volume migration code to Nexenta iSCSI volume driver"

10 years agoMerge "Parse out '@' in volume['host'] to do discovery"
Jenkins [Thu, 28 Nov 2013 06:35:55 +0000 (06:35 +0000)]
Merge "Parse out '@' in volume['host'] to do discovery"

10 years agoMerge "Fix the wrong verification for 'readonly'"
Jenkins [Thu, 28 Nov 2013 06:32:36 +0000 (06:32 +0000)]
Merge "Fix the wrong verification for 'readonly'"

10 years agoMerge "Handle NotFound exception in snapshots API code"
Jenkins [Thu, 28 Nov 2013 04:25:23 +0000 (04:25 +0000)]
Merge "Handle NotFound exception in snapshots API code"

10 years agoFix the wrong verification for 'readonly'
zhangyanzi [Thu, 28 Nov 2013 02:02:16 +0000 (10:02 +0800)]
Fix the wrong verification for 'readonly'

A mistake verification for 'readonly', fix it, and add some tests.

Change-Id: Iea20245eef2e884cf4c0d8e62c2da4f1cd967106
Closes-Bug: #1255802

10 years agoMerge "Remove the redundant judgment for 'restore'"
Jenkins [Thu, 28 Nov 2013 00:16:27 +0000 (00:16 +0000)]
Merge "Remove the redundant judgment for 'restore'"

10 years agoParse out '@' in volume['host'] to do discovery
john-griffith [Wed, 27 Nov 2013 23:38:22 +0000 (16:38 -0700)]
Parse out '@' in volume['host'] to do discovery

The backup method of getting iscsi info is to use
iscsiadm discovery, however currently that method
just uses volume['host'] which in the case of
multi-backend will use "host@backend-name".

This will cause the discovery to fail of course, so
this change just parses out the '@' symbol if it's present
and avoids the problem in the first place.

This also beefs up the error logging and exception catching
a bit.

Parsing out the '@' symbol all the time should be safe as
the accepted valid chars for hostnames are digits, a-z and
hyphens.

Change-Id: Ic45a38bf4c56a4aec6847ab0d29e3b41d35bd3d2
Closes-Bug: #1250673

10 years agoAdd volume migration code to Nexenta iSCSI volume driver
keystone [Mon, 11 Nov 2013 17:21:30 +0000 (09:21 -0800)]
Add volume migration code to Nexenta iSCSI volume driver

Utilize ZFS-specific optimizations for direct host-to-host
volume migration

DocImpact
Implements: blueprint nexenta-iscsi-volume-migrate
Change-Id: Ib9f2fa7e1ccb93dbdbc951ddc3a0eda55cb001d5

10 years agoHandle NotFound exception in snapshots API code
john-griffith [Wed, 27 Nov 2013 21:02:48 +0000 (14:02 -0700)]
Handle NotFound exception in snapshots API code

Passing tests in the gate leave unhandled trace/error messages
for a VolumeNotFound issue.

These are caused by the test_volumes_snapshots_negative test
which requests a non-existent volume and the tests pass however
the log files are a bit messed up due to the unhandled exception.

This change just adds a try/catch block around the volume get calls
in the snapshot modules and raises HTTPNotFound as appropriate.

Change-Id: I2096f2da7c68ef7924fc8e69b2d5c2afea578512
Closes-Bug: #1255214

10 years agoMerge "Imported Translations from Transifex"
OpenStack Jenkins [Wed, 27 Nov 2013 20:45:16 +0000 (20:45 +0000)]
Merge "Imported Translations from Transifex"

10 years agoAdd chance weigher to scheduler
Stephen Mulcahy [Wed, 27 Nov 2013 10:26:03 +0000 (10:26 +0000)]
Add chance weigher to scheduler

Adds chance weigher to scheduler to allow distribution of requests
randomly between a number of volume managers.

Change-Id: I3f652caf200c406965b52b94cebb244d3bc1779a

10 years agoMerge "The param 'readonly' is incorrect checked"
Jenkins [Wed, 27 Nov 2013 10:16:56 +0000 (10:16 +0000)]
Merge "The param 'readonly' is incorrect checked"

10 years agoRedundant body validation for volume_upload_image
zhangyanzi [Tue, 26 Nov 2013 06:39:18 +0000 (14:39 +0800)]
Redundant body validation for volume_upload_image

The body validation is redundant for os-volume_upload_image,should remove
the redundant validation.

Change-Id: Iba7a4d5f917615f8a8d6320b5fe18af66e4011e0
Closes-Bug: #1254975

10 years agoImported Translations from Transifex
OpenStack Jenkins [Wed, 27 Nov 2013 06:16:11 +0000 (06:16 +0000)]
Imported Translations from Transifex

Change-Id: Icbaec16425abf1dfbeba7e3581998dbac5cc89e0

10 years agoFix Storwize terminate_connection with no host
Avishay Traeger [Tue, 26 Nov 2013 19:10:22 +0000 (21:10 +0200)]
Fix Storwize terminate_connection with no host

Nova may pass a connector to Cinder with no 'host' field, which was
causing a KeyError in the Storwize driver. This patch resolves this case
by doing the following:
1. If the volume is mapped to only 1 host, unmap it
2. If the volume was not mapped or mapped to multiple hosts, print a
   warning but don't raise an exception

Change-Id: I0ec1c24adbdfbcf1c4868b4981a2e2618d4b411c
Closes-Bug: #1244257

10 years agoFix _update_volume_stats typos
KIYOHIRO ADACHI [Tue, 26 Nov 2013 06:54:17 +0000 (15:54 +0900)]
Fix _update_volume_stats typos

Fix _update_volume_stats typos in 'cinder/volume/driver.py' and
'cinder/volume/drivers/eqlx.py'.
'_update_volume_status' to '_update_volume_stats'

Change-Id: I0642bdb911ca72517ed655f795e0055f4c4654b8
Closes-Bug: #1254978

10 years agoMerge "Brick connector revised fix for NFS drivers"
Jenkins [Tue, 26 Nov 2013 20:41:32 +0000 (20:41 +0000)]
Merge "Brick connector revised fix for NFS drivers"

10 years agoMerge "GlusterFS: Set correct permissions for volume file created via clone"
Jenkins [Tue, 26 Nov 2013 17:56:18 +0000 (17:56 +0000)]
Merge "GlusterFS: Set correct permissions for volume file created via clone"

10 years agoMerge "Fix docstring for Snapshot model"
Jenkins [Tue, 26 Nov 2013 11:56:00 +0000 (11:56 +0000)]
Merge "Fix docstring for Snapshot model"

10 years agoMerge "Pull latest service module from Oslo"
Jenkins [Tue, 26 Nov 2013 11:55:52 +0000 (11:55 +0000)]
Merge "Pull latest service module from Oslo"

10 years agoRemove the redundant judgment for 'restore'
zhangyanzi [Mon, 25 Nov 2013 11:13:52 +0000 (19:13 +0800)]
Remove the redundant judgment for 'restore'

In the function 'restore', there is redundant judgment for the body, it
should be removed.

Change-Id: Icfc5ae20141fad9d72de227cf5c06ca8504bd22c
Closes-Bug: 1254671

10 years agoMake volume_glance_metadata_create compat with DB2
zhuzhubj [Wed, 3 Jul 2013 10:07:43 +0000 (18:07 +0800)]
Make volume_glance_metadata_create compat with DB2

As DB2 does not support SQL insert via raw number type if
table column data type is "CLOB" ("TEXT" in sqlalchemy), we need
to convert numerical values to string before insert operations.

This problem was discovered through the
test_volume_create_get_update_delete_from_image test case in
tempest.api.volume.test_volumes_get.  The test case fails with
a DBError without this change in place.

Partial-blueprint db2-database

Change-Id: I5b378cce5b639df23d7003548f49bdab1eecf6a0

10 years agoGlusterFS: Set correct permissions for volume file created via clone
Eric Harney [Mon, 25 Nov 2013 21:39:03 +0000 (16:39 -0500)]
GlusterFS: Set correct permissions for volume file created via clone

This is currently done when creating a new volume from scratch,
but not when cloning a new volume.

Closes-Bug: #1254768
Change-Id: I8506dc0824bacdb6cc42b4cadd41c2cad3a74b5b

10 years agoGlusterFS: Ensure Cinder can write to shares
Eric Harney [Tue, 19 Nov 2013 23:01:55 +0000 (18:01 -0500)]
GlusterFS: Ensure Cinder can write to shares

Ensure the Cinder user can write to the GlusterFS share.  This
is required for snapshot functionality, and means the admin
does not have to set this permission manually.

Closes-Bug: #1236966
Change-Id: I4a9ea40df9681ca6931ad6b390aa21b09d6cfec9

10 years agoThe param 'readonly' is incorrect checked
zhangyanzi [Mon, 25 Nov 2013 11:33:49 +0000 (19:33 +0800)]
The param 'readonly' is incorrect checked

In the function os-update_readonly_flag, the param 'readonly' is incorrect
checked, without the param in request, i think it should raise exception
with message like "Must specify readonly in request."

Change-Id: I19e15e988ffa2d093d374f6a33ce94d45ffe2c30
Closes-bug: 1254682

10 years agoFix docstring for Snapshot model
huangtianhua [Mon, 25 Nov 2013 09:55:08 +0000 (17:55 +0800)]
Fix docstring for Snapshot model

"Represents a block storage device that can be attached to a VM." as the
description of model Snapshot is incorrect.

Change-Id: I1d7c985869f0829b9305a18a3570928a9da40519
Closes-Bug: #1254635

10 years agoMerge "To fix test_get_dss_rp in test_vmware_vmdk.py"
Jenkins [Mon, 25 Nov 2013 09:19:21 +0000 (09:19 +0000)]
Merge "To fix test_get_dss_rp in test_vmware_vmdk.py"

10 years agoMerge "Remove dead code from test_get_volume_stats()"
Jenkins [Mon, 25 Nov 2013 09:19:05 +0000 (09:19 +0000)]
Merge "Remove dead code from test_get_volume_stats()"

10 years agoMerge "Add greenthread.sleep() to parent wait()"
Jenkins [Mon, 25 Nov 2013 09:02:40 +0000 (09:02 +0000)]
Merge "Add greenthread.sleep() to parent wait()"

10 years agoMerge "Update openstack/common/periodic_task"
Jenkins [Mon, 25 Nov 2013 08:51:17 +0000 (08:51 +0000)]
Merge "Update openstack/common/periodic_task"

10 years agoMerge "Pass the size when fetching image in xenapi driver"
Jenkins [Mon, 25 Nov 2013 05:31:20 +0000 (05:31 +0000)]
Merge "Pass the size when fetching image in xenapi driver"

10 years agoMerge "NetApp fix free space as zero during 1st vol stats update"
Jenkins [Mon, 25 Nov 2013 05:31:04 +0000 (05:31 +0000)]
Merge "NetApp fix free space as zero during 1st vol stats update"

10 years agoMerge "Fix docstring for _migrate_volume_completion"
Jenkins [Mon, 25 Nov 2013 05:30:33 +0000 (05:30 +0000)]
Merge "Fix docstring for _migrate_volume_completion"

10 years agoMerge "Initialize and terminate connection raise 500 err"
Jenkins [Mon, 25 Nov 2013 05:30:25 +0000 (05:30 +0000)]
Merge "Initialize and terminate connection raise 500 err"

10 years agoMerge "Migrate volume should check para "host" in request"
Jenkins [Mon, 25 Nov 2013 05:30:18 +0000 (05:30 +0000)]
Merge "Migrate volume should check para "host" in request"

10 years agoMerge "Fix ./run_tests.sh -V --virtual-env-name"
Jenkins [Mon, 25 Nov 2013 04:56:54 +0000 (04:56 +0000)]
Merge "Fix ./run_tests.sh -V --virtual-env-name"

10 years agoMerge "Ensure 'status' in update_snapshot_status"
Jenkins [Mon, 25 Nov 2013 02:32:52 +0000 (02:32 +0000)]
Merge "Ensure 'status' in update_snapshot_status"

10 years agoMerge "Remove unused code in test_admin_actions.py"
Jenkins [Sun, 24 Nov 2013 10:31:24 +0000 (10:31 +0000)]
Merge "Remove unused code in test_admin_actions.py"

10 years agoEnsure 'status' in update_snapshot_status
zhangyanzi [Fri, 22 Nov 2013 08:41:39 +0000 (16:41 +0800)]
Ensure 'status' in update_snapshot_status

The function os-update_snapshot_status doesn't check whether the param
"status" is in request body. It throws 500 error. We should catch the
KeyError and return 400 (HTTPBadRequest) instead.

Change-Id: If3775e3c0299cf0edbdda5081a6633b38462011b

10 years agoUpdate openstack/common/periodic_task
Michael Still [Sat, 16 Nov 2013 11:33:55 +0000 (22:33 +1100)]
Update openstack/common/periodic_task

The following commits are in this update:

1771a77 Adjust import order according to PEP8 imports rule
4bfb7a2 Apply six for metaclass
0ea069e Removed calls to locals()

Change-Id: Ied20ce735af79b52e7674a3dfe3b097b84b61533

10 years agoInitialize and terminate connection raise 500 err
huangtianhua [Fri, 22 Nov 2013 09:02:32 +0000 (17:02 +0800)]
Initialize and terminate connection raise 500 err

Initialize and terminate connection should check whether "connector" is
in request body. It throws 500 error if "connector" is not present. We
should catch the KeyError and transfer it to 400 (HTTPBadRequest)
instead of.

Closes-Bug: #1253944
Change-Id: If38419592701c8a14df52f94fd46ed0fc7a17e04

10 years agoFix docstring for _migrate_volume_completion
huangtianhua [Fri, 22 Nov 2013 07:40:11 +0000 (15:40 +0800)]
Fix docstring for _migrate_volume_completion

"Migrate a volume to the specified host." as the description of
_migrate_volume_completion func is incorrect.

Closes-Bug: #1253910
Change-Id: Ica944d9a7fa962ff56a9f0107ac1519623d2e551

10 years agoMigrate volume should check para "host" in request
huangtianhua [Fri, 22 Nov 2013 07:22:07 +0000 (15:22 +0800)]
Migrate volume should check para "host" in request

The server doesn't check whether the parameter "host" is in request
body. So the 500 error has been thrown.

We should catch the KeyError and transfer the KeyError to
400 (HTTPBadRequest) instead of 500.

Closes-Bug: #1253904
Change-Id: I3fb07113816a87f284b47e32bacd57f78a32676c

10 years agoContinue to delete volumes that DNE in rbd backend
Mike Perez [Sat, 23 Nov 2013 18:50:15 +0000 (10:50 -0800)]
Continue to delete volumes that DNE in rbd backend

If a volume has already been deleted in the RBD backend, catch the
exception and let Cinder continue removing it in the database.

Closes-Bug: #1254318
Change-Id: I99b591ce78d82c6eaabff0459d9c523e85c8e65f