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
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
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
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
Change default policy for volume_extension:volume_tenant_attribute

The volume_tenant_attribute extension should be accessible by
the owning tenant and the admin. Change default policy from
'rule:admin_api' to 'rule:admin_or_owner'.

Change-Id: I886cd717741c86b5083aeaf16e3e7ea5b4e525b4
Closes-bug: #1269312
Transfer creation doesn't support 'name' via xml

Change the transfer create XML deserializer to use 'name' rather than
'display_name'. This is in line with cinderclient and the json code.

Change-Id: I97ba0c4411fe4a151261ed2f657465951bcb9d7b
Closes-Bug: #1243613
GlusterFS: Synchronize additional operations

create_cloned_volume() and copy_volume_to_image() should also be
locked against other driver operations to prevent collisions
from concurrent updates of snapshot metadata or volume file data.

Closes-Bug: #1267983

Change-Id: Idd6158bfbe4dc049c33fa58b40d3d570fc244d01
Remove unused variable in os-extend api

Temp variable _val in _extend method is not being used, so remove this
'_val' variable.

Change-Id: I4a3f5e28d1882698a3efd116044c4fddff86c474
Closes-Bug: #1267423
Use a *args pass-in instead of a list one

Change-Id: Ieef972f413dcf444d26c15a02d1993acf7cbb079
Use loopingcall from openstack-common

This removes cinder.utils.LoopingCall and uses the copy in
openstack-common instead.

Change-Id: Id76b89797dffcc65fbf37fd1442f221ff5bb4668
Pull latest scheduler change from Oslo

The RetryFilter is now part of Oslo, although it's been renamed to
IgnoreAttemptedFilter.  Thanks to entry_point, we are able to maintain
backwards compatibility after pulling that commit from Oslo.

Commits in this change:
* 66fe978 2013-12-10 | Change IgnoreAttemptedHostFilter to expect 'retry' key (attempt-retry)
* 135dd00 2013-12-10 | Remove start index 0 in range()
* 45658e2 2013-12-09 | Fix violations of H302:import only modules
* 70004c6 2013-12-04 | Add IgnoreAttemptedHostsFilter to oslo
* 880acf7 2013-11-14 | Change capabilities filters to use resource type (capfilter_message)
* 06e9d98 2013-11-10 | Add some log messages to capabilities_filter.py
* 3970d46 2013-11-02 | Fix typos in oslo
* 8718763 2013-08-19 | Replace list with dict in AvailabilityZoneFilter.host_passes
* c0d052a 2013-07-12 | python3: Add basic compatibility support.
* e3545f8 2013-06-02 | Enable hacking H402 test
* 484a1df 2013-05-30 | Enable hacking H403 test
* 35660da 2013-05-30 | Enable hacking H401 test
* 5dcc43b 2013-05-05 | Break out common functionality for filters and weights
* 1f2aba5 2013-05-03 | Renames filter to base_filter and weight to base_weight

Change-Id: Ibeb685ef60e44cb6388fc460ee6a78255ed3dbae
Pull Bug #1263122 fix for service module from Oslo

Get latest service module from Oslo mainly to avoid the impact of
bug #1263122 when multi-process API service is enabled.

Follow commits are included in this change:
* 8b2b0b7 2013-12-20 | Use hacking import_exceptions for gettextutils._
* 37e46bb 2013-12-20 | disable SIGHUP restart behavior in foreground
* 12bcdb7 2013-10-11 | Remove vim header

Change-Id: I506ff809c32542520cc6ba2fa07519b1361f439c
Fix cross-import bug in cinder.db.sqlalchemy.api

Cross import in cinder.sqlalchemy.db.api module breaks
if lazy loading of db backend is removed

In oslo.incubator db.api lazy loading was removed
Check this change for details https://review.openstack.org/#/c/55985/

Change-Id: I6a75afd0b9b55097ef76ad24c53e84339b527196
Updates for version list to show correct references

Updated views to consider version while creating href.
Updated fakes to consider version while creating fake href.
Updated some test cases in v2 api which were using v1 as
expected output

Change-Id: Ib05180041309ef75c3718924969bd2354d6d8b3a
Closes-Bug: #1261849
Fix os.getlogin() problem with no tty

Catch OSError(s) from  os.getlogin() and fall back to looking at
environment variables to figure out the user's name. The OSError
is thrown where there is no tty for the python process when
os.getlogin() is called.

Related-Bug: #1221491

Change-Id: I2bd735c9669ba9d25da108da44ea602f358b2dcc
Register EMC config options globally

The registration allows the oslo sample config generator
to detect the config options and extract automatically
a config template.

Change-Id: Ib181d734dddbd9b6a664439286969b832d6536e7
Added missing accept_transfer to FC

The base class FibreChannelDriver was
missing the new accept_transfer method.
This was caught while running the devstack
driver certification tests again the
3PAR FC driver.
This patch adds the missing method to the
base VolumeDriver.

Change-Id: I0aa91a4f11edd03eee7607d15317b89c30732cb7
Closes-Bug: #1269633
Use a mirrored mirror log

By default, LVM will sync the two mirrors of a logical volume on
creation. This is I/O intensive and it takes a long time though, so we
tell it not to with --nosync. The next default behavior is to create a
mirror log which says what portions of the mirrors are in sync. But
then if a disk backing a mirror log fails, we have to deal with
resyncing the mirrors at each reboot.

This commit tells LVM to use a mirrored mirror log, which will use
approximately 4MB of extra space, but means we'll never have to
sync mirrors, ever.

Change-Id: I6586ced4e7e66ae79ae134406a4c633f8fbc8602
Fix import log_handler error with publish_errors set

Sync latest module log_handler from Oslo.
Commit Id is 2843a92a0e4007f50d5ad63d51fe574e1ba5e280

This handler sends the error to configured notifier.
The notifier could be any kind (log, RPC, no_op, None).

Note: when using publish_errors you also need to set the
notification_driver option too.

Closes-bug: #1240349
Change-Id: I4f759b049b8f34904ba11382a2e8fc1578677a8f
Fix exception log msg in attach volume method

Attach volume happened when volume's status is attaching or available, but
the exception msg only contain info about "available". So fix it.

Change-Id: I1caf83b94b3e4158eff88871a4187041a25e5d1c
Closes-Bug: #1270020