Zane Bitter [Tue, 12 Mar 2013 09:03:29 +0000 (10:03 +0100)]
Use internal DB management
Use our own internal code for managing database migrations, rather than
calling sqlalchemy-migrate's command line directly. This allows us to
automatically specify the initial version of the database, which is
required in order to be able to squash migrations (bug 1072949).
Zane Bitter [Mon, 11 Mar 2013 15:54:21 +0000 (16:54 +0100)]
Register DB options independently of engine
We need a script that will just manage database migrations (for bug 1072949), so for this purpose we want to register only the DB options, not
all of the engine options.
Zane Bitter [Mon, 11 Mar 2013 15:54:21 +0000 (16:54 +0100)]
Avoid manipulating DB directly in unit test
Use the parser.Stack class for inserting data into the database in the
watch rule unit tests. If there is direct database manipulation in the unit
tests, it risks falling out of step with the implementation in the code (in
this case, by not supplying the disable_rollback value).
Aaron Rosen [Fri, 8 Mar 2013 18:12:14 +0000 (10:12 -0800)]
Update to Quantum Client 2.2.0
This patch updates tools/pip-requires to use the python-quantumclient 2.2
It also limits the version to <3.0.0 to prevent breaking something accidently
when 3.0.0 is released.
Steve Baker [Fri, 8 Mar 2013 00:06:04 +0000 (13:06 +1300)]
Add tests to validate REST path to action mapping.
The Routes mapping performs some brittle regexp manipulation
to build the parameter mapping on the path, so its nice to validate
that it is doing what is expected.
Steven Hardy [Thu, 7 Mar 2013 11:14:45 +0000 (11:14 +0000)]
heat common : quieten policy logging
Policy logs the currently loaded policy for every request, which is
too noisy even for debug - we already log the file which contains
the policy when we load it, so this is probably sufficient.
Steven Hardy [Thu, 7 Mar 2013 12:08:08 +0000 (12:08 +0000)]
heat common : BaseClient respect host argument
Currently the BaseClient class ignores any host argument and overwrites
it with the host from the keystone catalog URL, we should respect the
host parameter if it is passed, but make it optional
Currently if properties.validate() fails causing the resource
to go to CREATE_FAILED state, we get an error when creating
the event, because the bad properties are evaluated in the event
constructor. Instead create a dummy Error property with the
error string for the event.
Steven Hardy [Tue, 5 Mar 2013 15:46:08 +0000 (15:46 +0000)]
heat tests : move GenericResource into tests directory
The resource.py GenericResource type is only used in tests, so
move it into the tests area, such that it can't accidentally be
used in the main heat codebase when we fail to import any resource
plugins..
Steven Hardy [Wed, 6 Mar 2013 14:55:12 +0000 (14:55 +0000)]
heat engine : watchrule quietly discard unused metric data
Some cfn-push-stats options try to send multiple metrics to a
watch, which won't work with our simplified CW implementation
which expects exactly one Metric associated with each watch
(since that's all you can define via the template)
So quietly discard any metric data we aren't interested in.
Steven Hardy [Wed, 6 Mar 2013 14:14:53 +0000 (14:14 +0000)]
heat engine : Loadbalancer template watch reference should be Ref
Replace hard-coded reference to latency_watcher with Ref, otherwise
the name is not fully qualified for the nested stack and the engine
fails to lookup the watchrule
Angus Salkeld [Wed, 6 Mar 2013 05:28:00 +0000 (16:28 +1100)]
make parsed template snapshots before updating
This is to make sure that as the update progresses and dependant
resources are modified/replaced that we compare the original
dynamic data with the current.
Steve Baker [Wed, 6 Mar 2013 02:29:12 +0000 (15:29 +1300)]
Allow instance NetworkInterfaces to be list of str or dict
It should be possible to specify NetworkInterfaces of an instance either
as an array of strings or as an array of dicts.
The following should now be possible:
This will define nics in the order specified by DeviceIndex
"NetworkInterfaces" : [
{ "NetworkInterfaceId" : {"Ref" : "controlXface"}, "DeviceIndex" : "0" },
{ "NetworkInterfaceId" : {"Ref" : "controlXface2"}, "DeviceIndex" : "1" },
],
This will define nics in the order specified by list position
"NetworkInterfaces" : [{"Ref" : "controlXface"}, {"Ref" : "controlXface2"}],
Mixing the 2 forms is supported but the resulting order is not defined.
Amazon documentation is ambigious about which form is actually supported
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-networkinterfaces
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-ec2.html#cfn-template-snippets-eni Fixes: Bug #1096013
Change-Id: Id387d2e750cbe533a9b8a1fedc49d5bcf690fbcf
Steven Dake [Tue, 5 Mar 2013 16:01:56 +0000 (09:01 -0700)]
Stop heat services from logging to stderr by default
Change the configuration files to set use_stderr to False by
default. Oslo's log sets use_stderr to True by default, and
the only reasonable way to override is via the config files.
Steven Hardy [Mon, 4 Mar 2013 15:29:36 +0000 (15:29 +0000)]
heat clients : Make heat-boto rollback disabled by default
The boto library always sends the DisableRollback parameter,
defaulted to False, which is the opposite of the engine
default now, so we have to set DisableRollback to True in
the boto client wrapper
Steven Hardy [Mon, 4 Mar 2013 15:27:57 +0000 (15:27 +0000)]
heat clients : Change --disable-rollback to --enable-rollback
Since the engine default is now rollback disabled, flip this
switch so the user can opt-in to rollback functionality via
the --enable-rollback cli option to heat-cfn/heat-boto
Angus Salkeld [Mon, 4 Mar 2013 06:00:47 +0000 (17:00 +1100)]
Use oslo logging setup.
The one reason we kept our own version was because of the qpid
logging that is quite useful. But this is now easily done via
the "default_log_levels" option.
I have setup the api servers with:
ampqlib,qpid.messaging,keystone,eventlet
and the engine with:
ampqlib,qpid.messaging,keystone,eventlet,sqlalchemy
Zane Bitter [Fri, 1 Mar 2013 14:24:19 +0000 (15:24 +0100)]
Fix flaky unit test
This was failing intermittently during the gate tests because there was no
dependency in the template for the Instance on the WaitConditionHandle, nor
for the WaitCondition on the Instance, so the order in which resources
would be created was somewhat random.
This patch fixes the test template, and tests updating the metadata should
occur *during* creation of the stack, as well after, to replicate a real
wait condition (which won't finish creation until the metadata update
occurs).