In some cases, guest agents may leave temporary config files

The code in these three places manipulates the configuration files. I
was (admittedly) having more than the acceptable dose of failures in
execute_with_timeout() and one of them that failed was the move of the
my.cnf file. And this left a turd in /tmp. The failures I was having
with execute_with_timeout relate to other tests that were improperly
mocking/unmocking and some of those problems have now been fixed.

Found that the same kind of thing can happen in cassandra and
mongo. Since default umask is 664, this leaves a file with somewhat
questionable permissions and potentially (at least for MySQL) some
passwords in /tmp.

The files will now be deleted.

Some test cases have been added to exercise the code paths(s) in
mongo, cassandra and mysql. The tests verify that the files are
actually deleted by mocking the os.unlink call. setUp and tearDown
have been updated in each case to make sure that the monkey patching
is properly reversed.

Change-Id: I93302fc5b1b18c9dd7116370a945b94d1824c75a
Closes-Bug: #1354136
Updated from global requirements

Change-Id: I1b5469ec546694a4f8f48b9500a733c36d316509
Make --repo-path an optional argument for db_recreate

db_recreate uses repo-path to call db_sync, but for db_sync this
argument is optional so it should be optional for db_recreate as
well.

Closes-Bug: #1279734

Change-Id: I68b0eb3c705525a047eb6bffe8d5e1b4b083cd91
Delete backup created during replication

During replication, backup of the master instance is
taken, and a slave is created using this backup.
This patch cleans up the backup which is created
during this process (irrespective of whether it was
successfully provisioned or not).

Closes-Bug: #1359354
Change-Id: Ic636ffeb0bbfb9e6cc02690efe812ffc11bda85c
Merge "Updated from global requirements"
Updated from global requirements

Change-Id: I14ec93eaa97fc52b39e00175adcd718dfc4579b4
Fixed database migration script issues

The db downgrade scripts are currently not dropping foreign key
constraints, causing errors when the script tries to drop related
tables on downgrade.

This commit address issues in the migration scripts, and also
introduces a new test script to test the migration scripts, so that
issues can be prevented in the future. The new test script is based
on the existing migration test script implementated in Nova.

Change-Id: I240d81afc3e43fd3711de8c156cfb43fd14850bf
Closes-Bug: #1347114
loading configuration parameters from trove-manage better

It is a pain to load the configuration parameters when setting up
a new environment. Since theres no way to get the uuid of the
datastore version that is created you must get it by looking in
the database.

Closes-Bug: #1371297
Change-Id: If8cea0aaf38878bb04abe6e27b9bfd77d5684bce
Add postgresql to notification_service_id option

The Trove 'notification_service_id' option has a default value for all
supported databases, except postgresql.

PostgreSQL now has a default value as well.

Change-Id: I033884bc36ba4ffe3faaf6cc4e3496cfb757858b
Closes-Bug: #1373083
Document Trove configuration options

Many of the Trove configuration options do not have adequate help text
to describe what the configuration option can be used for, and/or what
valid values for the option are.

Since the auto-generated docs are based on this help text, they
currently look very empty and are not very helpful.

example: See "Configure the database" in chapter 4. Database Service
         under http://docs.openstack.org/trunk/config-reference/content

All options now have help strings to clarify how/when they can be used.

Also removed periodic_interval option (not referenced in the code).

DocImpact: A separate patch set will be created for the actual doc
changes.

Closes-Bug: #1334465
Change-Id: I3ea1bd255514438c3d356d23d42f3fb3ddd45274
Sync latest process and str utils from oslo

This sync required changes to fix these issues:
* Make execute method clean password in exception
* Make sure mask_password works properly

------------------------------------------------
The sync pulls in the following changes (newest to oldest):

6a60f842 - Mask passwords in exceptions and error messages (SSH)
63c99a0f - Mask passwords in exceptions and error messages
66142c34 - Make strutils.mask_password more secure

-----------------------------------------------

Closes-Bug: 1343604
Closes-Bug: 1345233
SecurityImpact

Change-Id: I3b49b1d667f6ade9ae3f6765d735440a3e838917
Merge "Delete backup created during replication"
Deprecate unused entries in cfg.py

backup_namespace and restore_namespace are now referenced on a
per-datastore basis. Having them in the common options is now no
longer useful. Deleted them from the common_options and marked them as
deprecated in the datastores.

Change-Id: I2d021d68c483b77f9426d78685a06fb0733ec5e9
Closes-Bug: #1351545
Merge "Deprecate unused entries in cfg.py"
Merge "In some cases, guest agents may leave temporary config files"
Merge "loading configuration parameters from trove-manage better"
Isolate unit tests from integration tests data

Reasons:
 - unit tests are depending on integration tests data, such as:
  - datastore and its versions;
 - distribution package maintainers are not able to package Trove since ice house RC1.

Gate behaviour:
 - gate tests are not failing because unit tests are running right after
   fake-mode tests, so sqlite still exist.

Changes:
 - fixing those unit tests that are failing while building Trove package
   (more info see at bug-report).

Change-Id: Ib9a41d68481d32cdd81fc4d7c015a63c4da33bb3
Closes-Bug: #1302784
Merge "Make --repo-path an optional argument for db_recreate"
Updated from global requirements

Change-Id: I4a445dedb3a67c0f156f90bb677219d245a78111
Merge "Fixed database migration script issues"