Fix ip6tables support in xenapi bug 934603

Change-Id: Id7c4b0c4f8710652249b5c4fcb82abd5cccde6dd
Set default keystone auth_token signing_dir loc.

Updates the nova api-paste.ini file with a custom signing_dir
for Nova. This works around potential multi-service permission issues which
can occur when multiple OpenStack services share a common signing directory.

Change-Id: I99df63838fd41a4cade99b54da9511978b0d1a86
Tidy up nova.image.glance

* Add comment explaining relevance of _is_image_available
* Drop superfluous log statements
* Drop GlanceImageService.delete_all as it has never been implemented
* Drop the 'features' kwarg for GlanceImageService.update
* Code simplification

Change-Id: Ie538dd93dec729fb060bbcddfbddcba6cf303e52
Add check exit codes for vlans

Add check_exit_code to check the ip address
creation in ensure_vlan.

Ignores error code '2' and '0' and '254'
from iproute2, which means the address
has been added or removed.

A further audit of return codes will come later.

LP: #1011640

Change-Id: Ie95b106446c9f136fa079d95df7a14fe50046696
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Send a full instance in unrescue_instance.

Change the unrescue_instance method of the compute
rpc API to take a full instance over rpc instead of just
the instance UUID.  This cuts down on database access needed
by nova-compute.

Part of blueprint no-db-messaging.

Change-Id: I9a693b347ce583aa350f4c10531b53e0f9813577
Send a full instance in change_instance_metadata.

Change the change_instance_metadata method of the compute
rpc API to take a full instance over rpc instead of just
the instance UUID.  This cuts down on database access needed
by nova-compute.

These methods were moved in rpcapi.py and test_rpcapi.py but only because
the rest of the file was in alphabetical order.  The move puts it in the
right place to maintain that order.

Part of blueprint no-db-messaging.

Change-Id: I7dd2fb7480010893f66c753b3d31a4556009efe0
Avoid recursion from @refresh_cache

Previously the decorator current called out indirectly to
nova.api.network.api.API.get_instance_nw_info(), which is also
decoratored by @refresh_cache.

Change-Id: I8b71e2f6c85d007cde0da32890168c922102a7d8
Update targets information when creating target.

tgt-admin needs to use --execute --update to tell
tgtd to re-read its configuration files when target
is created.

(LP: #1031509)

Change-Id: I71fe4d90a8cc9bcf7a4817aefd6de52e216102a4
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Merge "Send a full instance in unrescue_instance."
Merge "Send a full instance in change_instance_metadata."
Merge "Update targets information when creating target."
Merge "Tidy up nova.image.glance"
XenAPI: Fix race-condition with cached images.

The core problem is that XenServer's `VDI.copy` call drops the
destination file directly into the SR. This means that half-completed
files are visible with no way to distinguish these from fully-copied
files.

We had some code that attempted to mitigate this issue by checking
physical_utilisation against an expected value. The problem with this
code is that it didn't account for VDI chaining where the
physical_utilisation would not necessarily match the parent.

The net effect of this was that 'cloned' VDIs would never be found
because their physical_utilisation was far below what was expected.

The work around is to create our own `_safe_copy_vdi` which is isolated
and atomic. Long term, `VDI.copy` should be fixed so that half-completed
files are never stored in the SR.

Change-Id: I6eb3cb5259f9ee1c7394e58f76105a8b39bfc720
Merge "Set default keystone auth_token signing_dir loc."
Merge "Fix ip6tables support in xenapi bug 934603"
Setting root passwd no longer fails silently.

Fixes LP 1022961

Previously an attempt to set the root password would fail silently if
for example the driver did not support this action.

To avoid the user being misled that the password change had succeeded,
we now report any failure by changing the MEP for set_admin_password
RPC from cast to call.

Change-Id: I1fd7b925e9226d30892f3a7cc4ddb938ff678a55
Use instance_get instead of instance_by.

Updates the network manager to use db.instance_get instead of
db.instance_by (which doesn't exist). This change seems to have
slipped in in the recent vifs UUID conversion code.

Fixes LP Bug #1031756.

Change-Id: Ie487a2f845a722a5e7923e26a550d74f553e8afc
Fix get_diagnostics RPC arg ordering.

Updates the ordering of the compute managers get_diagnostics
call so it works correctly with the current wrap_instance_fault and
checks_instance_lock decorators. To work correctly 'instance' needs
to be the first argument after the context.

Fixes LP Bug #1031788.

Change-Id: Ia7105eb272cd2932fc4f25b297ecab9e5ab8dbe2
Merge "Setting root passwd no longer fails silently."
Merge "Add check exit codes for vlans"