Implement stack-locking for multi-engine support

Implements a distributed stack lock using the database to avoid race
conditions when multiple engines are deployed.

Blueprint multiple-engines

Change-Id: I7fba8808d8a4efbe7fd8fdff94fd9a53f3841c8b
Refresh Cloud Server data for RackConnect check

Refresh Cloud Server data on each iteration of check_create_complete to
ensure the server metadata is up-to-date for the RackConnect check and
any subsequent checks.

Change-Id: Ia4ad04cfd5e76b639a0b98c21e381db70551090a
Closes-bug: #1250647
Shorten physical resource name to custom limit

The default limit for resources is 255, which is
determined by the column size of the name columns in
other openstack project databases.

The limit for nova servers is 53 characters due to typical default
linux HOST_NAME_MAX of 64, minus the '.novalocal' appended to the name.

The reduced name will consist of the following:
* the first 2 characters of the name
* a hyphen
* the end of the name, truncated on the left to bring
  the name length within the limit

The validation fix from bug: #1238272 has been removed.
Closes-Bug: #1250291

Change-Id: Iccaf905b2e73433a671559c49223c2b635402853
Fix server update attribute test

This is testing if an attribute not in the update_allowed_keys
results in UpdateReplace. Whilst this is true here, it's using
an attribute that is not a valid resource attribute. The only
valid resource attributes that I know of are:
(Properties, Metadata, UpdatePolicy, DeletionPolicy)

Just want to make sure we are testing the right thing.

Change-Id: Ic84239b0ff3960968293c2c367971f30d091e833
Add property doc strings for S3 bucket

Change-Id: I508a6ea45748e366c4cc4f6f47f200ac4145cee1
Closes-bug: #1224148
Revert "Implement stack-locking for multi-engine support"

This is a short term backout until it gets fixed.

This reverts commit c30530f12663302869a8f2edf979e8a8bd33ed2d.
Closes-bug: #1250797

Change-Id: Ide1dc4a9d1469dee033e8bc08d8ab4da96f79fc0
Merge "Revert "Implement stack-locking for multi-engine support""
Remove unused db/sqlalchemy/manage.py

This has been superseded by the cmd/manage.py implementation

Partial-Bug: #1241826

Change-Id: I89ff643048ef28c098483c1b7cf55c564e5d6062
Update install.sh to reflect recent oslo.db format

The previous sql_connection option has been deprecated and replaced
with the database.connection option in oslo:

[database]
connection = mysql://heat:heat@localhost/heat

The old option still works, but the default is only respected from
the new option, which is confusing if you're relying on the previous
behavior where specifying nothing got you the sql_connection default.
So update the installed config to remove the deprecated options.

Change-Id: I0f5b4587358ec99b47c8ab3ee924191bbf2760a2
Closes-Bug: #1241826
Merge "Shorten physical resource name to custom limit"
Ensure autoscaling actions occur for percentage adjustment

Fixes bug 1251007

Previously if the AdjustmentType was set to PercentChangeInCapacity,
then depending on the choice of the instance group MinSize and the
scale-up policy ScalingAdjustment, no autoscaling actions may occur
even when the under-scaled alarm fires.

This situation occurred if:

   (MinSize * ScalingAdjustment / 100.0) < 1.0

in which case the group never get gets scaled up even if the under-
scaled alarm stays in the alarm state forever.

Now we follow the rounding rules used by AWS Autoscaling:

  http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-scale-based-on-demand.html

Change-Id: I79e5e743de1944ace5ef2c4dbcb76c9cab7262bb
Merge "Fix server update attribute test"
Don't use the last server fake, but the one we want

This makes it *really* frustrating adding a new server fake.

Change-Id: I968d32ce27b34ee8dc7a6ff821de21fcee832741
Merge "Remove unused db/sqlalchemy/manage.py"
Merge "Don't use the last server fake, but the one we want"
Merge "Update install.sh to reflect recent oslo.db format"
Merge "Ensure autoscaling actions occur for percentage adjustment"
Merge "Refresh Cloud Server data for RackConnect check"
Database changes for multi-engine support

Add a stack_lock database table to use as a distributed stack lock to
avoid race conditions when multiple engines are deployed.

Blueprint multiple-engines

Change-Id: I0b8e244a73295dca307cb09ea5da2ebe709134b1
Implement stack-locking for multi-engine support

Implements a distributed stack lock using the database to avoid race
conditions when multiple engines are deployed.

Blueprint multiple-engines

Change-Id: I7fba8808d8a4efbe7fd8fdff94fd9a53f3841c8b