1091 Commits

Author SHA1 Message Date
John Griffith
b2371aeff9 Catch and report errors from copy image to volume.
The copy image-to-volume errors weren't being handled
properly and the result was the lvcreate being retried
even though the lvcreate itself succeeded.

The result of this was misleading errors stating that
the volume couldn't be created because it already existed
(which it did, becuase the create itself was succesful).

Fixes bug: 1183283

Change-Id: I23f05fe64475c3efe285e05a258c4625b801375c
2013-05-28 22:57:48 -07:00
Jenkins
77a77456af Merge "Update cloned volumes QoS settings." 2013-05-29 02:46:47 +00:00
Xing Yang
b782597725 Remove cinder_emc_config.xml.sample
Remove this sample config file from emc folder based on discussions
at the IRC meeting. Parameters specified in this sample file are
already documented in Cinder Admin Guide.

Change-Id: I4f742eedde962aefc6d5ab14d08a955859ae0e4f
2013-05-28 00:35:02 -04:00
John Griffith
37fa1ef51e Update cloned volumes QoS settings.
The SolidFire device inherits all settings (including QoS) from
the parent on a clone.  This meant that although we were expecting
QoS to be updated when a clone was issued with a different Volume
Type than the parent volume it was never acted upon.

This change fixes that bug by simply adding the *new* qos settings
to the ModifyVolume call after cloning.

Fixes bug: 1184235

Change-Id: I81786a07312027d543b9f06e54dfbf57e6085bc9
2013-05-27 12:04:26 -06:00
Jenkins
05ce36aa24 Merge "Improve "service is down or disabled" warning message" 2013-05-27 02:24:18 +00:00
Mukul Patel
525fad649a Added '%' before snapshot variable
In function create_snapshot for cinder volume, '%' was missed
before variable snapshot from message defination. It was causing
an error during translation of debug message. Included '%'
for getting proper debug log.

Fixes: bug #1183736
Change-Id: I894639a4e5a69be80f4f53ec9d4f9f8648870173
2013-05-27 00:02:50 +05:30
Jenkins
434ed6a971 Merge "Don't throw ValueError for invalid volume id" 2013-05-26 13:29:07 +00:00
Jenkins
e3136a37a6 Merge "Implement scheduler hints for API v2" 2013-05-25 16:07:42 +00:00
Jenkins
58f3df0072 Merge "Make NFS share selection more intelligent." 2013-05-25 04:35:08 +00:00
Jenkins
e3e536dbbd Merge "Add "_" builtin method for config generation" 2013-05-25 04:31:11 +00:00
OpenStack Jenkins
10a7d956ea Merge "Imported Translations from Transifex" 2013-05-25 04:20:20 +00:00
Jenkins
1af469e6bc Merge "ModifyVolume attributes on Clone." 2013-05-24 23:20:44 +00:00
John Griffith
2be0b9c39c Hack run_tests.sh to work with single tests again.
Even though we're moving to testr and this will eventually
go away, we should maintain our ability to run and debug
individual tests until the broader change is released.

This just adds some text around the nosetests call
to get us back where we were.

Fixes bug: 1181996

Change-Id: Id0082ca8954664679430cc602425b1fadd29151b
2013-05-24 13:56:28 -06:00
OpenStack Jenkins
79e95e046c Imported Translations from Transifex
Change-Id: I468b17530bc8db03df53e8d098dfb5ea0765894e
2013-05-24 18:11:04 +00:00
Eric Harney
6c80ab5bdb Don't throw ValueError for invalid volume id
If a user runs something like "cinder-manage volume delete a1234",
a ValueError is thrown because it fails to cast to int.
Catch this and treat the parameter as an id which will result in a
later VolumeNotFound error rather than breaking this way.

Change-Id: I95a9b9d7628cebe4b6d855ea925b0ad3a5f1c4c4
2013-05-24 11:57:45 -04:00
John Griffith
f4b7b7e590 ModifyVolume attributes on Clone.
Clones copy over the attributes from the source volume,
we want to keep some admin data like source-volid and if
it's a clone or not.  To do that we just need to call modifyvolume
after the clone operation and update this info.

Change-Id: I903fe6f8a57880abad8d315d091c1e57624a519c
2013-05-24 09:07:47 -06:00
Eric Harney
c3eb788637 Improve "service is down or disabled" warning message
Include "volume" and host in this message to make it more useful.

Change-Id: I2cacc7373de3a1b51762df2844a46b393d96c6cc
2013-05-24 10:07:09 -04:00
Ann Kamyshnikova
9cdccf36c6 Add "_" builtin method for config generation
extract_opts.py fails to generate config without this

bug 1183731

Change-Id: Icf3b45d5d7262607336f5d5e7a0a14b0dee9741d
2013-05-24 13:29:54 +04:00
Jenkins
1df6516dce Merge "Add common Oslo DB code to the source tree" 2013-05-24 08:14:55 +00:00
Monty Taylor
6ae520677d Replace custom skip_ methods.
testtools has these built in - so we should use them.

Change-Id: I2a9f6dbd69d5acef9a0dfbe5e90e9dbf706d8677
2013-05-24 00:29:54 -06:00
Monty Taylor
11b184f01d Migrate base test class to testtools.
This is step one in moving towards testr.

Change-Id: Ieac7fbe34ddc9ca05812faca76b68ff7d37ca708
2013-05-23 19:24:02 -06:00
Mathieu Gagné
af023fe0cc Fix ownership transfer when cloning with SolidFire
When cloning a volume with SolidFire driver, the owner of
the cloned volume is not set correctly in SolidFire when there is
a transfer of ownership.

This results in inconsistent states where the cloned volume
is owned by the new tenant in Cinder but SolidFire thinks it is still
owned by the original volume's tenant.

This patch adds the newAccountID parameter to all CloneVolume calls.

If the cloned volume is owned by the same tenant, newAccountID will
be set to the same value as the original SolidFire volume. There
will be no change of ownership done by the cloning process in SolidFire.

If the cloned volume should be owned by a different tenant, newAccountID
will be set to the appropriate SolidFire account corresponding
to the new tenant. If the SolidFire account does not exist already,
it will be created.

Fixes: bug #1183521
Change-Id: I622ca2962478298e3e0c5a26866e39919805075f
2013-05-23 15:37:39 -04:00
Morgan Fainberg
5bf7b9be79 Make NFS share selection more intelligent.
Make the NFS share selection more intelligent by using a used_ratio
and oversub_ratio to determine the valid target.  The used_ratio
is a hard-cap of maximum "actual" used space, oversub_ratio allows
for oversubscription of the share based upon the apparant-allocated
space for sparse files.

Removed Options: nfs_disk_util

New options added:
* nfs_used_ratio:
    Float representation of the maximum allowed usage (e.g. 0.95
    calculated by available_space / total_space) before the share
    is no longer concidered a valid target.  Default: 0.95

* nfs_oversub_ratio:
    Float representation of the oversubscriotion ratio allowed when
    utilizing sparse files (determined via "du").  This gets
    multiplied against the total_capacity before comparing the
    apparant space used by the backing volume files.  Default
    ratio is 1.0 (meaning reserved/allocated space cannot exceed
    total space available on the mount).

DocImpact: New Configuration Options / Removal of Config Option

bp nfs-share-selection-logic-improvement

Change-Id: I3572e106eb4c794b08bf6f499e2da2d494c4072d
2013-05-23 12:23:26 -07:00
Roman Podolyaka
b5173e267c Add common Oslo DB code to the source tree
Blueprint: db-session-cleanup

Change-Id: I1e2e6d66474f0f8a655a055d5b2150699d66f1dd
2013-05-23 17:54:10 +03:00
Vincent Hou
561520447d Add the service_state into test_schedule_happy_day.
Since the fake filter scheduler does not update the capabilities, the sevice
states remains empty. To avoid the None value for free_capacity_gb, we set the
host_manager to a fake host manager with a list of service states.

Fixed Bug 1171906.

Change-Id: I359ea6952392cc5e6b8eff513f3ca4d8161a30e3
2013-05-23 20:38:14 +08:00
Nikolaj Starodubtsev
463aa30b3d Implement scheduler hints for API v2
We've done this implementation because we need to use scheduler hint in
cinder with some specific filters. So, most part of code have been
imported from nova.

bp scheduler-hints
docimpact

Change-Id: I4c8a78ade4ff668d79e7aa6d0d358029754e3d90
2013-05-23 16:05:37 +04:00
Jenkins
b6b43b7170 Merge "Added a test for bad limit param" 2013-05-23 01:03:15 +00:00
Jenkins
451c401112 Merge "Added test for nonnumerical limit param" 2013-05-23 01:03:12 +00:00
John Griffith
647aab40a4 Update log.py and jsonutils.py from oslo-incubator
The update of log was mostly to get coloring to work again
in devstack, and jsonutils was picked up as well.

The update to jsonutils also requires the six dependency
which is added to pip-requires.

Change-Id: I95d23aafe19b12d4a427149aa5f7a66394d178c6
2013-05-22 14:15:25 -06:00
Derek Chiang
e5c7e3c01d Added a test for bad limit param
Change-Id: Ic9a93779d5623644ccf210de622d59f999571dd2
2013-05-22 18:11:11 +00:00
Derek Chiang
960e7d37b1 Added test for nonnumerical limit param
Change-Id: Ie9ef0b2ddcf9945f4065e76fddba763470ffdb81
2013-05-22 18:11:06 +00:00
Mathieu Gagné
b3db10f0ee Raise VolumeNotFound with correct volume_id
Make sure VolumeNotFound is raised with the correct volume_id
in the SolidFire driver. Some exceptions were wrongfully referring
to an undefined variable named uuid.

Fixes: bug #1182966
Change-Id: Ied101fc9778f51dfb74b39f466c2c13d6e775a40
2013-05-22 12:30:00 -04:00
Jenkins
96f91b8a23 Merge "Support mount options for NFS/GlusterFS volumes" 2013-05-22 06:51:41 +00:00
annegentle
e7846829f8 Removes a broken link from the sidebar of Sphinx built pages.
Change-Id: I1c24f015bd8b67b1dc85eda67a0669ac79ca282b
2013-05-21 20:05:11 -05:00
OpenStack Jenkins
3e914889c7 Imported Translations from Transifex
Change-Id: I85bdbb3aef9f4f16f28ab31753cd7935a471f3a7
2013-05-21 18:11:02 +00:00
Eric Harney
553e0d92c4 Support mount options for NFS/GlusterFS volumes
This patch adds support for mount options for NFS/GlusterFS volumes.

To set options, append them to the line for the volume in the
nfs_shares_config or glusterfs_shares_config file:
 192.168.175.166:/testvol -o backupvolfile-server=192.168.175.177
 host1:/testvol2 -o backupvolfile-server=host2,rw,other_option

These options are used when mounting from the cinder-volume
service and the nova-compute service.  (There is an associated
nova-compute patch to enable the same.)

This is a useful change for GlusterFS because the
backupvolfile-server option enables a mount to succeed even if
the first server specified is offline.

Change-Id: I13bb0a930d6a05e803ccb50e6dc5d4b2b412ac11
2013-05-21 09:33:13 -04:00
Jenkins
bc807a2d2e Merge "Hide v1/v2 version entities in API when disabled" 2013-05-21 04:42:03 +00:00
Jenkins
36ea843d57 Merge "Adds notifiers to both volumeTypes and volumeTypeExtraSpecs" 2013-05-21 04:31:12 +00:00
Brian Waldon
c2ee6e2187 Hide v1/v2 version entities in API when disabled
Fixes bug 1181413

Change-Id: Ia8aaa78a0e0d222c268e9ca780816eb1c26feb3f
2013-05-20 13:03:34 -07:00
Jenkins
9c1e7bacd5 Merge "Convert to oslo strutils.bool_from_string." 2013-05-20 19:53:22 +00:00
Jenkins
3b5fc961d6 Merge "Allow flake8 to run in venv" 2013-05-20 18:55:48 +00:00
Jenkins
b8d053ed28 Merge "Update import of strutils from oslo." 2013-05-20 17:16:10 +00:00
Eric Harney
1f0b83e2dd Allow flake8 to run in venv
flake8 should be able to run within the venv.

Change-Id: Ife269e54947f0283adceca15af60f38688e1ee64
2013-05-20 11:33:53 -04:00
OpenStack Jenkins
5d54b7ad39 Merge "Imported Translations from Transifex" 2013-05-20 15:33:21 +00:00
Jenkins
563ec59ec3 Merge "Add thin provisioning support checks." 2013-05-20 06:30:25 +00:00
OpenStack Jenkins
49247a62f9 Imported Translations from Transifex
Change-Id: Ice855f70d3c22db39357dfe8101b5d68741ed6ce
2013-05-19 18:10:58 +00:00
OpenStack Jenkins
0d97245481 Imported Translations from Transifex
Change-Id: Ic15dca6e7a5a291c4babea403e1a45b2299ce263
2013-05-18 18:11:00 +00:00
Jenkins
65ab5416e3 Merge "RemoteFsDriver: copy_image_to_volume and copy_volume_to_image" 2013-05-18 18:04:16 +00:00
Michael Still
b0325eb772 Convert to oslo strutils.bool_from_string.
The only functional difference here is that the value '2' is now
treated as False instead of True. I suspect that's ok.

Change-Id: I30e75470cb3c312d7f92d389995eb6d845dd2fb0
2013-05-18 21:09:14 +10:00
Michael Still
a1d5902117 Update import of strutils from oslo.
Change-Id: Iee18c2226cf1f5c3ea0653c9e13d94b02650bc0d
2013-05-18 20:55:32 +10:00