19830 Commits

Author SHA1 Message Date
Jenkins
48ce2b79a1 Merge "Implement volume quota support in Cinder" 2012-08-31 16:12:07 +00:00
Jenkins
f5f1824a4b Merge "Fix creation of iscsi targets" 2012-08-31 15:23:45 +00:00
Jenkins
aab103bd25 Merge "Add cinder- prefix to all binaries." 2012-08-31 15:22:33 +00:00
Jenkins
7f4cc61ceb Merge "Make glance image service check base exception classes" 2012-08-31 15:06:31 +00:00
Unmesh Gurjar
8c30edff98 Removed unnecessary call to ensure_export
Removed the extra call to 'ensure_export' from '_copy_image_to_volume' while
creating a volume from an image.

Fixes LP: #1044399

Change-Id: I189a4cb66b965367289c2f677147ee085e431190
2012-08-31 07:25:39 -07:00
Dan Prince
560b650fa8 Add cinder- prefix to all binaries.
Renames clear_rabbit_queues and volume-usuage-audit binaries
so that they are prefixed with 'cinder-'.

As part of this change the clear_rabbit_queues binary was changed
to use dashes instead of underscores for consistency with the rest
of the cinder binaries.

Fixes LP Bug #1044386.

Change-Id: I7692a543cc67af2d342a64b84626de38c0a64f81
2012-08-31 09:56:50 -04:00
Duncan Thomas
b84d623772 Make size optional when creating a volume from a snap
Changing the size of a volume when cloning a snapshot doesn't
make a great deal of sense *and isn't part of the ec2 api).

This patch makes the field optional, defaulting to the same
size as the snapshot (and therefore the origination volume).

Change-Id: I3fea7fe1c0415d10e549c66a242cf2a336a7204e
2012-08-31 13:51:12 +00:00
Chuck Short
9785963c84 Fix creation of iscsi targets
Previously when creating iscsi volumes, we were using

tgt-admin -e -c <config file> --update volume-id

Unfortunately the side affect of this is that tgt-admin
removed other volumes that weren't connected to an iscsi
connector. Which is obvlously not what we want.

In order to fix this we create the targets.conf for the
volume but we call tgt-admin --update icssi qualified name.

We're dropping the use of iscsi_targets table when using TgtAdm.
Compatability for other target admin types is maintained.

Fixes LP: #1038062

Change-Id: I9060a43208df5b79e9b17dadcab8bc0a8eeef55e
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2012-08-30 14:58:32 -06:00
Joe Gordon
cabb54c580 Spelling: Persistant=>Persistent
Change-Id: Id8e1bef634fe66e06624b5b3bcd82f59735d76e3
2012-08-30 13:35:37 -07:00
John Griffith
a3af3f87f5 Implement volume quota support in Cinder
parital fix for bug 1023311
  * To use needs cinderclient https://review.openstack.org/#/c/11509/
  * Updates quota classes with changes in Nova
  * Adds needed quota related DB tables
  * Updates test_quota to reflect changes in Nova
  * Adds absolute limits and empty rate limit functions
  * Updates test/integration/test_volume to make it work w/ above changes

Change-Id: I221c7a9dc51a2bb9bf7228c056f63ba9546cf5f9
2012-08-30 13:24:26 -06:00
Jenkins
a55430ce28 Merge "Fix PEP8 issues." 2012-08-30 17:02:44 +00:00
Jenkins
6db3732323 Merge "Add 'detaching' to volume status" 2012-08-30 17:01:50 +00:00
Jenkins
cc252878f2 Merge "Remove unused return values and commented out code from NFS driver" 2012-08-30 17:01:28 +00:00
Jenkins
c13d0d2d19 Merge "Remove unused exceptions from cinder/exception.py" 2012-08-30 15:43:42 +00:00
Ben Swartzlander
198a91a5e4 Remove unused return values and commented out code from NFS driver
bug 1037622

Change-Id: Idea3005ad94fd6bfc76fd0f3969ee78e3031767e
2012-08-29 19:10:11 -04:00
Rongze Zhu
91311d5c2c Remove unused flags
* region_list
* aws_access_key_id
* aws_secret_access_key
* osapi_scheme
* osapi_path
* metadata_host
* metadata_port
* default_project
* default_image
* default_instance_type
* vpn_image_id
* vpn_key_suffix
* auth_token_ttl
* bandwith_poll_interval
* start_guests_on_host_boot
* resume_guests_state_on_host_boot
* default_ephemeral_format
* use_ipv6
* allow_resize_to_same_host
* zombie_instance_updated_at_window
* isolated_images
* isolated_hosts

Change-Id: Ia3d5ac7d7c983845b5411e2fc1f49eb579e3280f
2012-08-29 09:55:48 +00:00
lrqrun
3ed4d0b628 Fix PEP8 issues.
Fix some pep8 issues in doc/ext/cinder_todo.py make the code looks pretty.

Change-Id: I137c8bf5af30eb54a44cbff7f1fbc35bc2c3ed9e
2012-08-28 23:28:48 +08:00
Jenkins
4533e5b450 Merge "Migrate volume related quota info in db migration" 2012-08-27 16:04:14 +00:00
Jenkins
eb9a58d3ea Merge "Fix PEP8 issues." 2012-08-25 17:57:27 +00:00
Jenkins
56b2e78a12 Merge "Typo fix in cinder: existant => existent" 2012-08-25 17:49:37 +00:00
Jenkins
5b34c99c73 Merge "Fix incorrect tgt-admin call in create_iscsi_target" 2012-08-25 17:49:02 +00:00
John Griffith
3034247a4e Fix incorrect tgt-admin call in create_iscsi_target
* Fixes bug 1039826
  * Missed one of the execute cmds that was using 'val %s' as args

Change-Id: I5e6af737ada1c2bcf7a495710e2b10c8c74bb534
2012-08-23 13:35:46 -06:00
Rongze Zhu
5475debcf7 Add 'detaching' to volume status
Fixes bug #1004382

When attach a volume , the volume status is "available -> attaching ->
in-use", But when detaching a volume , the volume status is "in-use ->
available". So We need 'detaching' volume status, it make the change of
state of the volume more clearly.

Change-Id: Idf8c38413135bf8e8cd025f11937f8c7250557c1
2012-08-23 16:49:23 +00:00
Rongze Zhu
8b92df9feb Typo fix in cinder: existant => existent
Impact:
* locale message in cinder/locale/*/LC_MESSAGES/nova.po
* locale message in cinder/locale/nova.po
* Test function names
* Test strings and comments

Change-Id: I623af176d3b556a1ea9f8bde2c609fc4f752d7da
2012-08-23 03:00:08 +00:00
John Griffith
4aebd529f9 Make glance image service check base exception classes
Fixes bug 1039675

glanceclient can raise HTTPNotFound (as well as NotFound) it appears,
but glance image service is only converting NotFound ->
InstanceNotFound.  Same applies to 'Forbidden' and other exceptions.

This patch converts 'exc_type is NotFound'-like checks to use
'isinstance' instead, which will cover HTTPNotFound, etc.

Also add missing glance/image tests that weren't in Cinder

Change-Id: I8787598daccf401a26d9397946ecd55f89ff62b3
2012-08-22 16:27:56 -06:00
Ray Chen
f80f8dfecb Fix PEP8 issues.
Fix some pep8 issues in doc/ext/cinder_todo.py and
doc/source/conf.py and make the code looks pretty.

Change-Id: Ie164bc7328507e20b0ab5993ba97eaadbd74bf63
2012-08-22 11:57:42 +08:00
RongzeZhu
938d92e8a9 Remove unused exceptions from cinder/exception.py
find cinder/ -type f -name "*pyc" -exec rm {} \;
exceptions=`cat cinder/exception.py| grep -E '^class' |\
 awk {'print $2'} | awk -F '(' {'print $1'}`
for exc in $exceptions
do
    i=`find cinder/ -type f -exec grep -R $exc {} \; |wc -l`
    if [ $i -eq 1 ]
    then
        echo $exc
    fi
done

First removed exceptions:

DecryptionFailure
ImagePaginationFailed
VirtualInterfaceCreateException
VirtualInterfaceMacAddressException
MelangeConnectionFailed
VolumeUnattached
InvalidKeypair
InvalidSignature
InvalidInstanceType
InvalidIpProtocol
InvalidCidr
InvalidAggregateAction
InvalidGroup
InstanceInvalidState
InstanceNotRunning
InstanceNotSuspended
InstanceNotInRescueMode
InstanceSuspendFailure
InstanceResumeFailure
InstanceRebootFailure
InstanceTerminationFailure
VolumeServiceUnavailable
UnableToMigrateToSelf
DestinationHostUnavailable
SourceHostUnavailable
InvalidHypervisorType
DestinationHypervisorTooOld
DestinationDiskExists
InvalidDevicePath
DeviceIsBusy
InvalidCPUInfo
InvalidIpAddressError
InvalidVLANTag
InvalidVLANPortGroup
InvalidDiskFormat
InstanceUnacceptable
FlagNotSet
NoVolumeTypesFound
VolumeDriverNotFound
ListingImageRefsNotSupported
KernelNotFoundForImage
ProjectNotFound
ProjectMembershipNotFound
UserRoleNotFound
StorageRepositoryNotFound
DatastoreNotFound
FixedIpNotFoundForAddress
FixedIpNotFoundForInstance
FixedIpNotFoundForNetworkHost
FixedIpNotFoundForSpecificInstance
FixedIpNotFoundForHost
FixedIpAlreadyInUse
FixedIpInvalid
NoMoreFixedIps
NoFixedIpsDefined
FloatingIpDNSExists
FloatingIpNotFoundForAddress
FloatingIpNotFoundForHost
NoMoreFloatingIps
FloatingIpAssociated
FloatingIpNotAssociated
NoFloatingIpsDefined
NoFloatingIpInterface
KeypairNotFound
CertificateNotFound
AuthTokenNotFound
AccessKeyNotFound
SecurityGroupNotFoundForProject
SecurityGroupNotFoundForRule
SecurityGroupExistsForInstance
SecurityGroupNotExistsForInstance
NoInstanceTypesFound
InstanceTypeNotFoundByName
FlavorNotFound
CellNotFound
SchedulerHostFilterNotFound
SchedulerCostFunctionNotFound
SchedulerWeightFlagNotFound
InstanceMetadataNotFound
InstanceTypeExtraSpecsNotFound
LDAPUserNotFound
LDAPGroupNotFound
LDAPGroupMembershipNotFound
NoFilesFound
SwitchNotFoundForNetworkAdapter
NetworkAdapterNotFound
GlobalRoleNotAllowed
ImageRotationNotAllowed
RotationRequiredForBackup
LDAPUserExists
LDAPGroupExists
LDAPMembershipExists
ProjectExists
InstanceExists
InstanceTypeExists
InvalidSharedStorage
CannotResizeToSameSize
ImageTooLarge
ZoneRequestError
InstanceTypeMemoryTooSmall
InstanceTypeDiskTooSmall
InsufficientFreeMemory
CouldNotFetchMetrics
AggregateError
AggregateNotFound
AggregateNameExists
AggregateHostNotFound
AggregateMetadataNotFound
AggregateHostConflict
AggregateHostExists
InstanceTypeCreateFailed
SolidFireAPIStatusException
DuplicateVlan
InvalidInstanceIDMalformed
CouldNotFetchImage

Search again, Second removed exceptions:

UserNotFound
FixedIpNotFoundForNetwork
FloatingIpNotFound
SecurityGroupNotFound
InstanceTypeNotFound
LDAPObjectNotFound
UserExists

Search again, Third removed exceptions:

FixedIpNotFound

Change-Id: I028122c6132340b2fef2c144da787b7c4efddccf
2012-08-22 11:37:26 +08:00
Clark Boylan
53de0dd77e Add nosehtmloutput as a test dependency.
Adding nosehtmloutput as a test dependency allows nose to output its
results to an html file. This will be used by Jenkins to save logs
on a different server.

Change-Id: I03f61fe4a8f0daa4a43fc9e7d41456b65018cf66
2012-08-21 14:27:15 -07:00
John Griffith
ca25ea4778 Migrate volume related quota info in db migration
* Fixes bug 1039615
  * Now that quotas are back we need to handle migration
    of volume related quota data in the cinder-manage migrate helper
  * Only resource types transferred are volumes and gigabytes

Change-Id: Idd9aab834612e929683491f47fa1e1861bdbd0d1
2012-08-21 14:05:15 -06:00
Jenkins
4e81c907bb Merge "Add declare for xiv driver in fake_flags" 2012-08-21 00:19:27 +00:00
Jenkins
d2db1e9c40 Merge "Remove logging in volume tests" 2012-08-20 17:12:40 +00:00
unicell
5da61a7ad9 Use event.listen() instead of deprecated listeners kwarg
Fixes bug 1031405

The listeners kwarg is deprecated in SQLAlchemy 0.7.0. Since 0.7.3 is
the minimum required version of SQLAlchemy, use the new event.listen()
API instead.

Change-Id: I1b851e197c04b131ae96e814780b04e6dcdeeb1a
2012-08-20 19:46:18 +08:00
John Griffith
bace7fb1b6 Add declare for xiv driver in fake_flags
fixes bug 1038183

Change-Id: I324a8e4df61782c903146cc8e0bb1d1bbae46c2f
2012-08-17 13:50:31 -06:00
Jenkins
d0c6448cbc Merge "Call driver for attach/detach_volume." 2012-08-17 16:34:33 +00:00
Jenkins
68aaff4c74 Merge "Remove unused function" 2012-08-17 15:35:03 +00:00
RongzeZhu
e958531929 Remove logging in volume tests
Fixes bug #932137

Usage of logging seems to be limited to the check_for_export() tests and
should be to cleanup. check_for_export() raises an exception if there's
a problem and it does nothing if it succeeds. The tests should just
check whether an exception was raised.

Change-Id: I72bc3d97aa75950c7f31fae03535c541059501c2
2012-08-17 22:24:43 +08:00
Cory Stone
17538890dc Call driver for attach/detach_volume.
The volume driver may want to know which guest is going to be
attached to a volume. The manager now calls down into the driver
on attach_volume and detach_volume.

Fixes bug 1038109.

Change-Id: I084c2d09a1871fa158312f9ba479abb474da1d28
2012-08-17 09:18:52 -05:00
RongzeZhu
e5b3ef5622 Fix spelling typos
Fixes for:
* cinder/locale/*/LC_MESSAGES/nova.po
* cinder/locale/nova.pot
* cinder/testing/README.rst

Change-Id: Ib50432a72b2300742169ebe4c77584466be7bfba
2012-08-17 11:20:09 +08:00
RongzeZhu
b192cfebb8 Remove unused function
'wait_creation' function in cinder.volume.api.API is unused.

Change-Id: I4062e026b3e227513321be18ee920a4e5882cbd7
2012-08-17 10:07:05 +08:00
Jenkins
d2babbfd4b Merge "Remove unused imports" 2012-08-16 04:58:27 +00:00
Jenkins
f276d01946 Merge "Implements bp migrate-nova-volumes-to-cinder" 2012-08-16 04:48:41 +00:00
Jenkins
d05ef8007b Merge "blueprint zadara-volume-driver" 2012-08-16 04:01:24 +00:00
Jenkins
e5910c6491 Merge "Add driver for using files on a generic NFS server as virtual block devices Add NetApp-specific NFS virtual block driver" 2012-08-16 04:01:23 +00:00
Jenkins
cfc79c784d Merge "Update SolidFire volume driver" 2012-08-16 03:23:24 +00:00
Vladimir Popovski
7ea56d2154 blueprint zadara-volume-driver
Adds support for Zadara VPSA storage arrays as a BackEnd for Cinder

Change-Id: I8c2a163079853d4003223eb2c156cfd2ccef3129
2012-08-15 21:21:21 -06:00
Jenkins
bc5c955036 Merge "add ability to clone images" 2012-08-16 01:37:28 +00:00
Jenkins
a75d75b5cf Merge "Add proper support for deprecation messages" 2012-08-16 01:23:36 +00:00
Craig Vyvial
6ad360741f Adding the volume notifications to cinder
adding the volume notifications
added unit tests for notifications
added context for notify with rabbit

blueprint cinder-notifications

Change-Id: I5aef1e718eebb9a61e0670d524fcd5f438dee016
2012-08-15 17:21:53 -05:00
Josh Durgin
edc11101cb add ability to clone images
Given the backend location from Glance, drivers can determine
whether they can clone or otherwise efficiently create a volume
from the image without downloading all the data from Glance.

For now implement cloning for the RBD driver. There's already a
Glance backend that stores images as RBD snapshots, so they're
ready to be cloned into volumes. Fall back to copying all the
data if cloning is not possible.

Change-Id: I71a8172bd22a5bbf64d4c68631630125fcc7fd34
Implements: blueprint efficient-volumes-from-images
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-15 14:32:19 -07:00
John Griffith
df5c4ba864 Update SolidFire volume driver
Implements blueprint update-solidfire-driver

* Updates driver to reflect changes in the release version of SF API
* Modify SF naming scheme
* Implement snapshot functionality
* Implement setting qos on create via metadata
* Update/Add tests

Change-Id: I08f7aac31e9d95f971d297a19c285dfa7151b931
2012-08-15 14:15:29 -06:00