Update openstack/common/lockutils

The following commits are in this update:

79e6bc6 fix lockutils.lock() to make it thread-safe
ace5120 Add main() to lockutils that creates temp dir for locks
537d8e2 Allow lockutils to get lock_path conf from envvar

Change-Id: I2190d0aae72ef4a29daf8f7d960da82a33b331b4
Remove deprecated instance_type alias from nova-manage

Was deprecated in Havana, so now that we are in Icehouse lets
remove it.

UpgradeImpact
Change-Id: Ieb3775e0a43084d00624f9e1d8b879c312e32b3c
Handle UnicodeEncodeError in validate_integer

validate_integer can be potentially passed user
supplied data which causes a UnicodeEncodeError
exception during validation rather than just ValueError.
This change handles the UnicodeEncode exception
so validate_integer treats it as invalid input.

Change-Id: I5177789299b02448ed53e1b7fc23ccdaee1b70d3
Partial-Bug: 1243037
Set is_public to False by default for volume backed snapshots

This update results in the same behavior that is already implemented
in _create_image where the meta_data for is_public is set to False.

Change-Id: Ie0720d5c847871527db7d9477ca6cb05abe7a1a5
Closes-Bug: #1255316
Failure during termination should always leave state as Error(Deleting)

Delete is a non-reversible operation for the user, and once the
user has indicated that they want to delete the instance from that
point on is the system's problem to complete the delete as soon as
possible.

If anything fails during the delete that the system cannot recover
from then the instance should be left in an Error(Deleting) state.
Anything else, in particular reverting to an Active(None) state, makes
it look like the system has ignored the request.

Currently InstanceTerminationFailure is explicitly caught, but the
exception does not propagate so the instance_fault wrapper does not
get a chance to log the failure.  Also terminate_instance is wrapped
by reverts_task_state which resets the state to Active(None)

This change removes the revert_task_state wrapper and catches all
exceptions so that unhandled exceptions always leave the instance
in Error(Deleting)

Change-Id: I5fb1bbd56035792f566a6e076edfe7a69df006ef
Closes-Bug: 1254122
Make test_evacuate from compute API DRYer

test_evacute creates a context in almost every test
and sets its properties. Move that to a method to avoid extra
copy/paste.

Change-Id: Ib75575061bddf2546c46a6ef788ab85b5926ce69
Fix docstring on SnapshotController

Change-Id: I66a8b15ef700253bbad54ee3955550aeb2a522b7
Closes-Bug: #1257151
Use utils method when getting instance metadata and system metadata

Change-Id: Idab1ba25a8ec4c7dcc9efbb9d86e7248ae3c351e
Fix monkey_patch docstring bug

Modify Flags.monkey_patch to CONF.monkey_patch

Change-Id: I773a94d97d206bf78ac52de8e22d9e6db7650eb9
Closes-Bug: #1258048
Enforce permissions in snapshots temporary dir

Live snapshots creates a temporary directory where libvirt driver
creates a new image from the instance's disk using blockRebase.
Currently this directory is created with 777 permissions making this
directory accessible by all the users in the system.

This patch changes the tempdir permissions so they have the o+x
flag set, which is what libvirt needs to be able to write in it and

Closes-Bug: #1227027
Change-Id: I767ff5247b4452821727e92b668276004fc0f84d
Delete iSCSI devices after volume detached

Previously, after detaching from a volume, the iSCSI device
remains attached on the compute node until all LUNs for a given
IQN are detached -- causing issues when LUNs are reused for
different volumes. This change will delete the device(s)
associated with the detached volume so LUNs can be reused.

Fixes bug 1112483
Change-Id: Icae3ec4d1ee2036fbba7b9eb5c03a1c86014fcc0
Correct uses of :params in docstrings

Replace all occurrences of :params with :param alongway
(matches http://sphinx-doc.org/domains.html#info-field-lists)

Change-Id: Ia01e563dd54cce1e763c076b15d1a47b790eb802
Add error as not-in-progress migration status

When a migration status becomes "error" the migration is no longer
in progress, i.e. it is in a terminal state.  However, the
migration_get_in_progress_by_host_and_node method returns migrations
that have an "error" status, causing, among other things, the
Resource Tracker to continually log messages about how an
Instance is not resizing, creating excessive noise in the logs,
especially since the fact that a migration is entering the "error"
status is already logged.  This change causes "error"-status
migrations to not be included when retrieving "in progress"
migrations.

Closes-Bug: #1258275

Change-Id: I67bfec9f91f89ff38422469a5d86e14c4fffa40b
Deprecate/remove scheduler select_hosts()

This call is no longer used and can be removed from the scheduler api and
drivers. For backwards compatibility, the existing manager method is kept
but instead call driver.select_destinations() and convert the result to
the old format.

Conductor manager, as the last user of this call, used it to select
a target for live migration, but now instead makes calls to
select_destinations() to get the same information. The related change
to conductor manager is here: https://review.openstack.org/#/c/52311/

Change-Id: I702515a086e7f33c48fa9ee106271c868b660540
Add boolean convertor to cells sync_instances API

cells sync_instances API contains "deleted" as the parameter, and the
parameter should be boolean. There are the other boolean parameters
such as "on_shared_storage" of evacuate API, they can be passed with
either boolean or string(e.g. "True").
For the consistency of whole Nova APIs, this patch adds boolean conv-
ertors to cells sync_instances API.

Change-Id: I4776539cfd723f302d10350757e1c341384c9ba2
Closes-Bug: #1261287
Changed error message to match usage

InstanceDiskTypeTooSmall is not the proper error message, it should be
FlavorDiskTooSmall.

Change-Id: Id928015534161cba296c17114ef2d19d96e8781d
Allow some instance polling periodic tasks to hit db slave

If your deployment has a slave configured, poll_*instance* periodic
tasks will send their reads to the slave. If you have no slave
configured, there is no change to behavior.

Note for developers, I have targeted all the easy tasks. By this I
mean tasks that were already using the InstanceList object and the
get_all_by_filters or get_all_by_host methods. I will slaveify the
other tasks in seperate reviews since they also require conversion
to using objects.

Change-Id: I4bead5d350d633d726d4564b4bc1baec2e2977b7
Partially-implements: blueprint periodic-tasks-to-db-slave
Pass rbd_user id and conf path  as part of RBD URI for qemu-img

Unlike rados.py, qemu-img does not use id from CEPH_ARGS and has to be
given a ceph user id and conf path explicitly in RBD URI

Closes-Bug: #1261675
Change-Id: I9226515f2a860ed45d12012fd5b6bc7e842f6d32
Change RPC post_live_migration_at_destination from call to cast

We don't expect post_live_migration_at_destination to return anything,
so change call to cast.

Change-Id: Iccdb6e195d1d5d9b96e1372206823d414caae872
Spelling fix resouce=>resource

Change-Id: I369d925573e6ce7b48f610051f3b53a4afbb3d0d