Pass to vms the migration_url when doing a discard for post_migration

fixes VMS-357

We should pass in the migration_url to the vms discard command when
calling it from post_migration to avoid a warning. Otherwise the discard
will reconstruct where the memory objects should be, and in the case
of a migration this reconstruction is wrong.

Change-Id: I31bcec52764458a3a9d0c4c32113d2ce7c10d1ca
Add RPM based packaging to the build script

fixes issue OS-8

Updates to the make file to allow rpm based packages
to be built. Also added an init.d script that is installed
by the rpm packages instead of the upstart one used in the
debs. The init.d script was based off of opensuse openstack
scripts.

Change-Id: I547e70014bbb64b5636e79347418f3cd6358b708
Attempt to restart the nova-api-os-compute service during post-install

Fixes OS-80

The osapi_compute component of Nova can either be started using the
nova-api service or the nova-api-os-compute service depending upon how
the user installed their cluster. Currently we were only restarting the
nova-api service during the post install, but we should also attempt
to restart the nova-api-os-compute.

Change-Id: Id80eb8299d12b0dfc86d070579bcbdd4110ae6ed
Adding the rpm target to the main package target

Fixes issue OS-8

Hooking in the rpm targets into the main packaging target so that
rpm artifacts are built along with everything else. Also updated
the clean target to remove the rpms.

Change-Id: I885eba11f5990ee46c987f8454623691ff8836cf
Refactoring error logging so that messages are more consistent.

Refactored out calls to LOG.error into a separate method so that a
consistent format can be applied when logging exceptions. Also upgraded
some debug log messages to error when exceptions were being logged.

Change-Id: I3209625ceff9f4626240d3201b7afeb75dfea05e
Merge "Pass to vms the migration_url when doing a discard for post_migration" into stable/diablo
Merge "Adding the rpm target to the main package target" into stable/essex
Merge "Refactoring error logging so that messages are more consistent." into stable/diablo
Adding the root nova log handlers to the vms logger

Fixes issue OS-3

Due to a bug in Essex, the root logger loses all of its hanlders and
as a side effect all non nova-based loggers do not log any messages.
We correct this behaviour for the vms logger when configuring the
vms connection so that it will get redirected to the base nova handlers.

Note this has been fixed in Folsom.

Change-Id: I11b5a9e2a212f1e7fb083d8c9bc63f078c657a54
Refactoring notification into a single "safe" method.

Fixes issue VMS-369

In an effort to make the operations more fail-safe we have refactored
the notfications in a common method that logs, and ignores, exceptions.
The operation should not fail if it is unable to send a notification.
Instead the error is logged and the operation continues normally.

Change-Id: I3bdd614368014cbde179a6982394f9780ee09ed5
Removing libvirt_user flag and path permission configuration

The path permission configuration done to ensure that libvirt can
access the various vms paths (e.g. vmsfs mount point, descriptor files,
etc.) is now done within the vms library. As a result it is no longer
required in the extension.

Change-Id: Ia42aa19cb2956727c18729f1fa522bf500663888
Merge "Adding the root nova log handlers to the vms logger" into stable/essex
Merge "Refactoring notification into a single "safe" method." into stable/diablo
Change to how the openstack user is autodiscovered

Fixes issue OS-77

The openstack user is now determined based on the ownship of the instances
directory instead of previous ps aux strategy. This should be more robust.

Change-Id: Ie9e30bb0a5fae624ff10ae2597539ca3be6e4a14
Add instance locks around the main operations

Fixes issue VMS-369

The main operations of bless, launch, discard and migrate are now
decorated by instance locks. This is a way to ensure that for a single
manager instance (i.e. for a single host) gridcentric operations on
an instance are synchronized.

The instance locks are created on demand when the manager is asked
to perform an operation on the instance. They are removed from a local
cache by a periodic tasks when that instance is no longer associted
with the manager's host.

This should help prevent race conditions in the API layer sending
duplicate, or competing, requests to the manager. At the manager
level they will be synchronized.

Change-Id: I5cf453d3c28e4f25b14ce800624584cd58e96e5d
Allows instance refs to be passed to the main function

Fixes VMS-369

Instead of only being able to passed in instance_ids and having the
instance ref reloaded from the database, this allows the instance ref
itself to be passed into the main action functions. For compatibility
instance ids are still accepted.

Change-Id: I2aabd204d7812ddf6f8d2a5b213e1f7e1ef5f6d3
Makefile cleanups.

Change-Id: I9bfa1512a13b592dbab0843a3878c5f406eec8ec
Fix-ups for working services on Folsom.

This patch gets us to fully-functional services on Folsom.

However, there are a couple of small problems that remain after these fix-ups,
which will be addressed seprately:
* OS-81 -- The scheduler is being side-stepped.
* OS-82 -- The tests no longer have network dependency injection.
           (now addressed in this commit with fake_networkinfo())

Change-Id: Iff5ef35e312246c971e6dc87582a7bf71b2f6695

Change-Id: I25baef60a31f04945538f2097f9791615edc8a34
Refactor OpenStack services for failure (VMS-369).

Change-Id: I997c9dc84f564dd541388d1294b9bcaf021e3ca7
Merge "Refactor OpenStack services for failure (VMS-369)." into stable/diablo