VMDK:Using host mount info for datastore selection

Currently the VMDK driver picks a datastore for volume creation based
on space utilization. The shadow VM corresponding to the volume is
migrated to a different host and datastore if the volume is attached
to an instance created in a host which cannot access the volume's
current datastore. To reduce these migrations, this fix selects a
datastore which is connected to maximum number of hosts, provided
there is enough space to accommodate the volume. Ties are broken
based on space utilization; datastore with low space utilization
is preferred.

Closes-Bug: #1250816
Change-Id: I5ecf22d782857fca0889799229465c49afe188a0
LVM: Activate source snap LV when cloning from volume

Similar to the change made in:
01a2199 LVM: Activate source LV before cloning from it

Previous change only fixed this issue for clone-from-snapshot.

This activates the source snapshot LV when cloning from volume
as well, fixing the problem where cloning fails due to inability
to open the source LV device.

Change-Id: If48be8516fd71738cb83a91683c33d02f227b9d6
Related-Bug: 1252423
Closes-Bug: 1260786
Switch to Oslo's config generator

This fixes the sample configuration to contain proper
config groups alongway.

Regenerate sample config with oslo's config generator.

DocImpact: Removes the deprecated memcached_server
option from DEFAULT (now in keystone_authtoken group)

Closes-Bug: #1206650
Closes-Bug: #1260322

Change-Id: I170715bfe6ec7dad9f7317e7bb56cbb68034c4ec
LVM: update iscsi target on volume attach

This patch updates the existing iSCSI target for a LVM volume during
attach.  This is necessary in the event that a user extended the volume
after creation so that the correct size is visible to the host.

This adds support only for tgtadm.  Other changes may be needed for
ietadm/lioadm to provide the same functionality.

Change-Id: I185a90ffc4d50dd9f91381df07289476fa792043
Closes-Bug: #1248415
Raise max header size to accommodate large tokens.

The max header is exceeded in the following scenario
- Auth tokens built with a keystone v3 API catalog
- A catalog with approximately 8 or more endpoints defined

An equivalent fix will be required for all projects which use
eventlet.wsgi.

Copied from https://review.openstack.org/#/c/33362/

Closes-Bug: 1190149

Change-Id: I3fcb196b25a7a477b799c8dfa2ff5115977ca06d
Fix Brick LVM test command parsing

The case reporting only one fake-volumes VG was never hit, which also
caused us to not test the lvcreate -T path.

Change-Id: If43d6aff5f90d6eca24b3df790d8ad3a86bfc8f3
Fixed a problem in iSCSI multipath

Multipathing during copy image to volume and copy volume to image
operations doesn't work properly if there are different targets
associated with different portals for a mulitpath device.

Change-Id: I65c93f3788020c944db0d3a55063a6415554ff11
Closes-Bug: #1266048
Hiding postgresql password in connection string

Closes-Bug: #1266804
Change-Id: Iafc820d6201acf5b563b62bd9f20a715901f1ab4
Add bool_type dictionary to test_migrations

A number of MySQL migration tests fail because the test case
is verifying that an sqlalchemy.types.BOOLEAN column was created.
When the column type is checked, however, mysql reports the type as
sqlalchemy.dialects.mysql.TINYINT.  The mismatch causes numerous
test cases to fail for MySQL.

This creates a dictionary for each engine being tested to handle the
different boolean types.

postgresql and DB2 encounter similar issues.  Subsequent patches
will make the appropriate changes for those databases.

Change-Id: I81cb3c6feeacf887f1f473ec54414e0e215d2c24
Closes-bug: 1260126
3PAR: Raise Ex when del snapshot with depend vol

Deleting a 3PAR snapshot can result in an HTTP Conflict error message,
such as when a volume is dependent on it.
Previously, this exception was not caught, and the state was set
to "Error_Deleting" with no recovery path.
The code was updated to catch this exception and raise a
SnapShotIsBusy exception with an appropriate error message.
The state reverts back to 'Available' allowing the user to try again
after removing the dependency.

Change-Id: Ibe8c5d581af10c85397c37993c49f8fc3bce8620
Closes-Bug: #1250249
Add time_type dictionary to test_migrations

A number of postgresql migration tests fail because the test case
is verifying that an sqlalchemy.types.DATETIME column was created.
When the column type is checked, however, postgresql reports the type as
sqlalchemy.types.TIMESTAMP.  The mismatch causes numerous
test cases to fail for postgresql.

This creates a dictionary for each engine being tested to handle the
different time types.

Change-Id: Ic9921ff9fda001a66c0ea3a6a75c8adefa60b107
Closes-bug: 1262426
Modify default prefix for solidfire account

The SolidFire driver creates a unique account at volume
creation composed of <cinderhost-tenantID>.This is fine
until one tries to implement HA Cinder or moves their
Cinder node to another machine.

This patch changes the default setting to be an empty string
(ie no prefix), but still allows backward compatability by setting
the config option to 'hostname'.

DocImpact: Changes default for account-prefix, for backwards compatability
use the non-default 'hostname'

Change-Id: I500ea14c1b4e9e3efd51c035cc3c4e6232da9dd6
Closes-Bug: 1265208
Remove legacy config option 'connection_type'

'connection_type' is a legacy config option originated from Nova.
Nova used this option to specify underlying virtualization type for
compute service and had deprecated it (with 'compute_driver') in
Folsom and had it removed in later release.  In Cinder Folsom release,
the XenSMDriver in Cinder used this config option to verify the target
hypervisor but in Grizzly XenSMDriver has been renamed and refactored
and no longer used this config.  Therefore, this option is dead for
a long time, and should be removed.

Change-Id: I4d72f31302fa813df42e71224151148a9c4a76c7
Remove unused message from iogrp_data setup

The iogrp_data is initialized during do_setup loaded.
The vdisk_count is originally used but later removed.
In ValueException raised, the variable is no longer required.
Remove this will give a clearer message when 
ValueException raised.

Change-Id: Ib7b6c6a870ddd7932e8da1436d615f9ee458bd93
Closes-Bug: #1266321
Merge "Modify default prefix for solidfire account"
NFS/GlusterFS: Skip incorrectly formatted shares

Shares should always be of the form address:/volume.  If they are
not (i.e., are missing the '/'), then skip them and issue a warning
message.  This will prevent us from sending incorrect connection_info
dicts to Nova.

Closes-Bug: #1267253

Change-Id: Ic40cd0cdc862b44b0a7d3e5b1d7c4fee8ea1b28d
Fix sheepdog copy_image_to_volume method

The sheepdog driver fails when trying to
create volume from image due to a bug in
SheepdogDriver.copy_image_to_volume.

The utils.convert method is being passed the
tempfile object, but should only be passed
the name of the tempfile.

Change-Id: I6b261d29895bf9c2c30b2d95d74e5be58b8e9b10
Closes-Bug: 1261941
Fix sqlalchemy bug in transfer_get_all_by_project

Because of incorrect use of the sqlalchemy methods joinedload and filter,
incorrect lists of volume transfers were being returned by
transfer_get_all_by_project().

Change-Id: I378a512611591eec896edd5f217e75f9ff0f8ad3
Closes-Bug: 1262432
Drop Chance/SimpleScheduler Implementation

This patch removes the implementation of ChanceScheduler and SimpleScheduler
as previous changes have made sure they are internally replaced by
FilterScheduler.

The "max_gigabytes" config option is deprecated and will leave it like that
for one more release before we can remove it.

DocImpact: "ChanceScheduler and SimpleScheduler have been deprecated and
their implementation have been removed from Cinder."

Implement bp: deprecate-chance-and-simple-schedulers

Change-Id: Ifb1cb25e3bb4cdf26fa3283336b83fce5c97141e
Merge "Fix sqlalchemy bug in transfer_get_all_by_project"