]> review.fuel-infra Code Review - openstack-build/heat-build.git/log
openstack-build/heat-build.git
12 years agoStore instance resource-id earlier
Zane Bitter [Tue, 29 Jan 2013 18:48:22 +0000 (19:48 +0100)]
Store instance resource-id earlier

If creation is interrupted during startup, we will need the ID of the
instance stored in order to delete it later.

bug 1072932

Change-Id: I56b8d285bba43d6e2466705956f85c06f119d65c
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMerge "Make flavor-list regexp more robust"
Jenkins [Tue, 29 Jan 2013 09:30:05 +0000 (09:30 +0000)]
Merge "Make flavor-list regexp more robust"

12 years agoMerge from Oslo-incubator
Dirk Mueller [Mon, 28 Jan 2013 17:06:55 +0000 (18:06 +0100)]
Merge from Oslo-incubator

Change-Id: I2ef3bb9acdfb5bcae574d812e06fd689d0a7c890

12 years agoMake sure failures in groups (autoscaling & static) are raised.
Angus Salkeld [Mon, 28 Jan 2013 10:57:27 +0000 (21:57 +1100)]
Make sure failures in groups (autoscaling & static) are raised.

Fixes bug 1104617

Change-Id: Iebd2b0c6a4adf8c252db31348e4dc241c0479765

12 years agoheat engine : AutoScalingGroup implement Cooldown property
Steven Hardy [Fri, 25 Jan 2013 11:30:31 +0000 (11:30 +0000)]
heat engine : AutoScalingGroup implement Cooldown property

AutoScalingGroup schema accepts Cooldown but it doesn't do anything
so implement Cooldown in a similar way to Scaling Policy

fixes bug 1097850

Change-Id: I0dae79fad5c13b0ae588b1a2ea4fe67eb06e3746
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoMerge "heat engine : ScalingPolicy implement Cooldown property"
Jenkins [Fri, 25 Jan 2013 06:46:12 +0000 (06:46 +0000)]
Merge "heat engine : ScalingPolicy implement Cooldown property"

12 years agoMerge "heat tests : autoscaling test add missing VerifyAll"
Jenkins [Fri, 25 Jan 2013 06:42:05 +0000 (06:42 +0000)]
Merge "heat tests : autoscaling test add missing VerifyAll"

12 years agoMerge "heat tests : WatchRule test add missing VerifyAll"
Jenkins [Fri, 25 Jan 2013 06:40:57 +0000 (06:40 +0000)]
Merge "heat tests : WatchRule test add missing VerifyAll"

12 years agoMake flavor-list regexp more robust
Steve Baker [Fri, 25 Jan 2013 05:07:17 +0000 (18:07 +1300)]
Make flavor-list regexp more robust

This was failing for me due to different amounts of
whitespace in the output.

Change-Id: Id8cb7b63f770504df535542dd420f20a70b4b071

12 years agoMerge "A native Swift container resource type."
Jenkins [Fri, 25 Jan 2013 02:44:47 +0000 (02:44 +0000)]
Merge "A native Swift container resource type."

12 years agoMake a dedicated InstanceGroup
Angus Salkeld [Fri, 25 Jan 2013 00:56:29 +0000 (11:56 +1100)]
Make a dedicated InstanceGroup

Make it the basis of the autoscaling group, the
main difference is you change the number of instances
via update (manually) or not at all.

This can be achieved using the autoscaling group, but
this is clearer from the user's perspective.

Implements blueprint static-inst-group

Change-Id: I72680e92183ba87a76efa64383269afb083a446a

12 years agoheat engine : ScalingPolicy implement Cooldown property
Steven Hardy [Thu, 24 Jan 2013 09:37:04 +0000 (09:37 +0000)]
heat engine : ScalingPolicy implement Cooldown property

Implement the Cooldown property, which the schema currently
marks as implemented, but it doesn't actually do anything

ref bug 1097850

Change-Id: I0cb1b24baa4377be4a78b2a7b92fb1ed5371fb6f
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : autoscaling test add missing VerifyAll
Steven Hardy [Wed, 23 Jan 2013 16:56:09 +0000 (16:56 +0000)]
heat tests : autoscaling test add missing VerifyAll

Add logic to verify stubbed calls to loadbalancer reload,
also break up the tests a bit into functionally related
chunks instead of having two mega-tests

Change-Id: I94897b6ec23cae92bc464b4b3ef2a7b634bfdb0c
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : WatchRule test add missing VerifyAll
Steven Hardy [Wed, 23 Jan 2013 15:45:37 +0000 (15:45 +0000)]
heat tests : WatchRule test add missing VerifyAll

We don't verify the mocked methods currently, so add the
missing VerifyAll and fixup the stubs

Change-Id: Ia74e64ef07d7b4fef6e060df1b794dc82cf7ee96
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoUse pkg_resources to detect version of cloud-init
Clint Byrum [Thu, 24 Jan 2013 05:59:58 +0000 (21:59 -0800)]
Use pkg_resources to detect version of cloud-init

Previously the present of an API call only present in cloud-init 0.6.x
was used to determine whether or not cfn-userdata would have been executed
or not. The API call was removed in 0.7.x. This Fixes bug #1103793

Change-Id: I27129f8ae6144ae7172b7159ed70fc5f0d7d07b9

12 years agoA native Swift container resource type.
Steve Baker [Mon, 21 Jan 2013 23:10:15 +0000 (12:10 +1300)]
A native Swift container resource type.

Implements blueprint swift-resource-type

The properties schema maps to the swift headers
that are set during container creation.

The schema allows any arbitrary X-Container-Meta-* header to
be set in the template, which will be useful for users who
store arbitrary header keys.

This will be used during the presentation demo at LCA
next week.

Change-Id: I35e594cbe3cc251d5b48b41ea78ed2edda8aa807

12 years agoMerge "heat rename HEAT::HA::Restarter resource"
Jenkins [Tue, 22 Jan 2013 17:57:02 +0000 (17:57 +0000)]
Merge "heat rename HEAT::HA::Restarter resource"

12 years agoheat_keystoneclient make token auth work
Steven Hardy [Tue, 22 Jan 2013 16:33:14 +0000 (16:33 +0000)]
heat_keystoneclient make token auth work

username/password are ignored so don't pass them, and
tenant needs to be the context tenant not the service
tenant or token auth will fail.

Fixes bug 1072944

Change-Id: I862d0041daad278dfe7bc16d59dc733dde90e758
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat api paste.ini auth_uri should use auth_port
Steven Hardy [Tue, 22 Jan 2013 16:30:18 +0000 (16:30 +0000)]
heat api paste.ini auth_uri should use auth_port

For token based auth to work, the auth_uri needs to use
auth_port, which points at the internalURL of the keystone
service, the current config uses publicURL which causes
token auth requests to keystone to fail

ref bug 1072944

Change-Id: If7e0c2246205377f57f879ccf8bf36ff8b0d92e1
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat rename HEAT::HA::Restarter resource
Steven Hardy [Tue, 22 Jan 2013 15:07:16 +0000 (15:07 +0000)]
heat rename HEAT::HA::Restarter resource

Rename HEAT::HA::Restarter to OS::Heat::HARestarter, which fits
better with the other openstack-native resources which use the
OS:: namespace

Change-Id: I40038e64979aca184971b11e83f6ef92a3b54571
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : make WatchRule state message info
Steven Hardy [Tue, 22 Jan 2013 14:26:05 +0000 (14:26 +0000)]
heat engine : make WatchRule state message info

Make log message for state transition info not warning,
since transitions are not unexpected

Change-Id: I8dc362735f77ab6d9ae35e0c6e9c820597cc29ef
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : make WatchRule initial state NODATA
Steven Hardy [Tue, 22 Jan 2013 13:45:11 +0000 (13:45 +0000)]
heat engine : make WatchRule initial state NODATA

Initial state should be NODATA not NORMAL, as we've not
done any metric evaluation until the first evaluation
period has elapsed

fixes bug 1102446

Change-Id: Ic41df29c00a5df2f3d161bc1b1d054d816c5afa5
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : test_watch add tests for set_watch_state
Steven Hardy [Tue, 22 Jan 2013 13:37:43 +0000 (13:37 +0000)]
heat tests : test_watch add tests for set_watch_state

Add some tests providing coverage for the set_watch_state function

Change-Id: Ia9f418035440c0941e25dd2e1ec85f8c0322d807
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : test_watch add create_watch_data test
Steven Hardy [Tue, 22 Jan 2013 13:15:20 +0000 (13:15 +0000)]
heat tests : test_watch add create_watch_data test

Add test for create_watch_data, note there are some limitations
on what we can test here due to weird sqlite behavior with the
relationships defined in the sqlalchemy model

Change-Id: I2616b6dcf163914619321e9ff08e37f3f365d7db
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoMerge "heat engine : make watchrule actions run in stack ThreadGroup"
Jenkins [Mon, 21 Jan 2013 20:34:05 +0000 (20:34 +0000)]
Merge "heat engine : make watchrule actions run in stack ThreadGroup"

12 years agoMerge "heat tests : Add WatchRule evaluate test"
Jenkins [Mon, 21 Jan 2013 20:33:31 +0000 (20:33 +0000)]
Merge "heat tests : Add WatchRule evaluate test"

12 years agoMerge "heat engine : watchrule save state when actions undefined"
Jenkins [Mon, 21 Jan 2013 20:33:28 +0000 (20:33 +0000)]
Merge "heat engine : watchrule save state when actions undefined"

12 years agoMerge "ReST API: Don't overwrite webob error messages"
Jenkins [Mon, 21 Jan 2013 20:26:08 +0000 (20:26 +0000)]
Merge "ReST API: Don't overwrite webob error messages"

12 years agoheat engine : make watchrule actions run in stack ThreadGroup
Steven Hardy [Wed, 16 Jan 2013 16:21:16 +0000 (16:21 +0000)]
heat engine : make watchrule actions run in stack ThreadGroup

Make watchrule alarm actions run via greenthreads in the stack
ThreadGroup - this allows them to be correctly cancelled if the
stack is deleted whilst an alarm action is in progress.

fixes bug 1097847

Change-Id: I3190a05e3d0abd492961071d2db59a212bd4d373
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : Add WatchRule evaluate test
Steven Hardy [Mon, 21 Jan 2013 11:24:00 +0000 (11:24 +0000)]
heat tests : Add WatchRule evaluate test

Add test for WatchRule evaluate/run_rule functionality

Change-Id: Ic6994208485d03ec692174dc52d3244d331abe10
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : watchrule save state when actions undefined
Steven Hardy [Fri, 18 Jan 2013 17:34:12 +0000 (17:34 +0000)]
heat engine : watchrule save state when actions undefined

We should save WatchRule state transitions, even if an action
for that state has not been defined in the template.

Change-Id: Iadca203d03b2c2a2a186a4e9574687d8f30ab080
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoReST API: Don't overwrite webob error messages
Zane Bitter [Mon, 21 Jan 2013 19:04:10 +0000 (20:04 +0100)]
ReST API: Don't overwrite webob error messages

We don't want to replace the entire body of the error messages returned,
just add our detailed description at the end.

Change-Id: I5899854d1ed1766285a5cae2f14c24025ed92e4b
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat tests : test_watch remove logging
Steven Hardy [Fri, 18 Jan 2013 16:27:44 +0000 (16:27 +0000)]
heat tests : test_watch remove logging

Remove logging, since it's not configured to go anywhere,
and we don't have logging in any other tests

Change-Id: I50a3e08b0ee65f767e1b7471f1fb9679a4d3271f
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoMerge "ReST API: Return 400 for malformed JSON input"
Jenkins [Mon, 21 Jan 2013 18:25:31 +0000 (18:25 +0000)]
Merge "ReST API: Return 400 for malformed JSON input"

12 years agoReST API: Return 400 for malformed JSON input
Zane Bitter [Mon, 21 Jan 2013 15:36:21 +0000 (16:36 +0100)]
ReST API: Return 400 for malformed JSON input

Previously we had an unhandled exception that resulted in a 500 (Internal
Server Error) result and a stack trace when an invalid JSON file was
submitted in a POST/PUT request. Change to catching the exception and
returning a 400 (Bad Request) result.

bug 1102391

Change-Id: I7dde33ae732d9addbf988b1d36d4f06eacb634bf
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoTypo error, "requied" -> "required" in run_tests.sh
Pierre Freund [Sat, 19 Jan 2013 05:52:40 +0000 (13:52 +0800)]
Typo error, "requied" -> "required" in run_tests.sh

Change-Id: I6ee8bdbd26cef373bb4be3bc18397819aa2a877b

12 years agoopenstack/common : rebase to latest oslo
Steven Hardy [Fri, 18 Jan 2013 11:26:01 +0000 (11:26 +0000)]
openstack/common : rebase to latest oslo

Rebased to latest oslo, now at 8837013, note a few interfaces
changed requiring a some tweaks to the heat code

Change-Id: I7dfc634b7c459edebca19dee522b396e3736aecc
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : test_engine_service remove commented lines
Steven Hardy [Fri, 18 Jan 2013 11:22:44 +0000 (11:22 +0000)]
heat tests : test_engine_service remove commented lines

Remove some unused lines from test_engine_service.py

Change-Id: I272c77be1d0008da7f5189381ee7a5befd03e465
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : watchrule don't run rule for every SampleCount
Steven Hardy [Thu, 17 Jan 2013 17:32:25 +0000 (17:32 +0000)]
heat engine : watchrule don't run rule for every SampleCount

We should not be triggering a run_rule (which is an alarm action)
for every datapoint when the SampleCount statistic is specified,
otherwise e.g IHA instances get replaced every heartbeat signal!
run_rule should only be called in response to a rule evaluate(),
or an explicit override via set_watch_state()

ref bug 1100719

Change-Id: I91b144f24b542f48aa7fa98d8d8c404479e13483
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat templates : IHA enable cfn-hup
Steven Hardy [Thu, 17 Jan 2013 14:43:34 +0000 (14:43 +0000)]
heat templates : IHA enable cfn-hup

The IHA template mentions cfn-hup in several places but doesn't
actually enable it, so do so by adding the config file and crontab
entry

Change-Id: Ie852bba24a57c262a8d813d3b3fc76ba9b5e54b4
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat templates : fix IHA HeartbeatFailureAlarm during instance build
Steven Hardy [Thu, 17 Jan 2013 11:22:09 +0000 (11:22 +0000)]
heat templates : fix IHA HeartbeatFailureAlarm during instance build

The HeartbeatFailureAlarm triggers prematurely while the instance is
building, because cfn-init doesn't create the files (hence the
heartbeat cron-job) until after the packges are all installed.
If we make the HeartbeatFailureAlarm depend on the WaitCondition, it
won't be created until the instance is fully built.

fixes bug 1100719

Change-Id: Iae73aa0974a3061f56aa3ee52598687f32c0f19b
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat templates : IHA HeartbeatFailureAlarm should be Ref
Steven Hardy [Thu, 17 Jan 2013 11:19:05 +0000 (11:19 +0000)]
heat templates : IHA HeartbeatFailureAlarm should be Ref

cfn-push-stats reference to HeartbeatFailureAlarm should be a
Ref not a hard-coded string, or the engine fails to find the
watch because the name lacks the stack prefix

ref bug 1100719

Change-Id: I0fbec026b883348b674327ae6e097a9452ce375f
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat templates : add missing credentials to IHA template
Steven Hardy [Thu, 17 Jan 2013 11:13:48 +0000 (11:13 +0000)]
heat templates : add missing credentials to IHA template

WordPress_Single_Instance_With_IHA lacks credentials so
cfn-push-stats can't authenticate with the cloudwatch api

ref bug 1100719

Change-Id: I218eea927a00b6cef58a4a1ee5d930c57ebb8a2e
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoMerge "heat tests : remove debug print"
Jenkins [Thu, 17 Jan 2013 12:52:33 +0000 (12:52 +0000)]
Merge "heat tests : remove debug print"

12 years agoMerge "Remove instance in ERROR state after failed create"
Jenkins [Thu, 17 Jan 2013 11:16:35 +0000 (11:16 +0000)]
Merge "Remove instance in ERROR state after failed create"

12 years agoReST API: Clean up exception-handling cruft
Zane Bitter [Wed, 16 Jan 2013 17:55:58 +0000 (18:55 +0100)]
ReST API: Clean up exception-handling cruft

Now that we have explicit exception types indicating when a resource is not
found we don't have to rely on knowing which call the error was from.

Change-Id: I54ebce7cb68e551852fd87d51b57b26536cde136
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoRPC API: Add a WatchRuleNotFound exception
Zane Bitter [Thu, 17 Jan 2013 07:48:27 +0000 (08:48 +0100)]
RPC API: Add a WatchRuleNotFound exception

Change-Id: I7abda2fb745b84925edf685b7fced3541d94a8db
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoRPC API: Add a PhysicalResourceNotFound exception
Zane Bitter [Thu, 17 Jan 2013 10:10:15 +0000 (11:10 +0100)]
RPC API: Add a PhysicalResourceNotFound exception

Change-Id: I409f8df9e93809f7267fb09656302082e42753da
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoRPC API: Add a ResourceNotAvailable exception
Zane Bitter [Thu, 17 Jan 2013 10:10:15 +0000 (11:10 +0100)]
RPC API: Add a ResourceNotAvailable exception

Change-Id: I7f535b7823288b74cbe27f43b645a8d0f3180905
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoRPC API: Add a ResourceNotFound exception
Zane Bitter [Thu, 17 Jan 2013 10:10:15 +0000 (11:10 +0100)]
RPC API: Add a ResourceNotFound exception

Change-Id: If55cd6ca0eab8be9d192e76430aedf1d5a1767c3
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoRPC API: Add a StackExists exception
Zane Bitter [Thu, 17 Jan 2013 10:10:15 +0000 (11:10 +0100)]
RPC API: Add a StackExists exception

Change-Id: Ia8cb5af80abc7570b938c381d51e41eb7aa0629d
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoRPC API: Add a StackNotFound exception
Zane Bitter [Thu, 17 Jan 2013 10:10:14 +0000 (11:10 +0100)]
RPC API: Add a StackNotFound exception

Change-Id: Ic109e9f6f5cca3af531ffcd2c9149742442e66d4
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoRPC API: Add an InvalidTenant exception
Zane Bitter [Thu, 17 Jan 2013 10:10:14 +0000 (11:10 +0100)]
RPC API: Add an InvalidTenant exception

Change-Id: I0bd91c3ba15166d728f9e0570f787fdcc6a1cdc6
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoPrepare the groundwork for more exception types
Zane Bitter [Thu, 17 Jan 2013 10:10:14 +0000 (11:10 +0100)]
Prepare the groundwork for more exception types

We have been abusing AttributeError and ValueError rather than raising
exceptions that actually describe the problem. This opens the way for
changes that will allow us to handle a wide variety of specific exceptions.

Change-Id: I05c99601d4e877878195e658908fffa0e126f06c
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoFix duplicate naming in unit tests
Zane Bitter [Thu, 17 Jan 2013 10:10:14 +0000 (11:10 +0100)]
Fix duplicate naming in unit tests

This bug brought to you by the letters C and V.

Change-Id: I375f628f3e36f4b1723dc8ccc99b0475a02c152c
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoGet rid of unused initialisations in Resource
Zane Bitter [Thu, 17 Jan 2013 10:10:14 +0000 (11:10 +0100)]
Get rid of unused initialisations in Resource

The clients have all been moved out into the Clients class; these were left
behind.

Change-Id: I5831198cf3c2a7ef8cb9524960643d4adf310b3f
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat tests : remove debug print
Steven Hardy [Thu, 17 Jan 2013 10:30:54 +0000 (10:30 +0000)]
heat tests : remove debug print

Remove SHDEBUG line which I accidentally left in test_identifier.py

Change-Id: Ic965958e28b1c825408ce5ff44ced1398663bcb0
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoDon't inherit from NestedStack
Zane Bitter [Tue, 15 Jan 2013 12:42:57 +0000 (13:42 +0100)]
Don't inherit from NestedStack

The NestedStack class is intended only to be the implementation of the
AWS::CloudFormation::Stack resource type. Other resources whose internal
implementation uses a nested stack should subclass the abstract
StackResource class.

Change-Id: Ic311c220dbf9bdf539d68f4004c8dc14752e057e
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMove abstract nested stack class to separate file
Zane Bitter [Tue, 15 Jan 2013 12:42:56 +0000 (13:42 +0100)]
Move abstract nested stack class to separate file

The class heat.engine.resources.stack.Stack is intended to be an abstract
class which resources that are implemented as nested stacks may inherit
from. Rename it to StackResource and move it to the
heat.engine.stack_resource module, so that other resource modules
(including plugins) may include it without having to also import the
NestedStack class (which implements the AWS::CloudFormation::Stack resource
type).

Change-Id: Ie7c05ec64e1c9632c7a24d96b5d790c9e50b691f
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAdd a convenience method for deleting nested stacks
Zane Bitter [Tue, 15 Jan 2013 12:42:56 +0000 (13:42 +0100)]
Add a convenience method for deleting nested stacks

Add a convenience method to the stack.Stack abstract resource class for
deleting the underlying nested stack.

Change-Id: Ic91b1ebb2f358e40d9e201264944924045a1b044
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMerge "Make pip-requires a little F18 friendlier"
Jenkins [Wed, 16 Jan 2013 21:18:30 +0000 (21:18 +0000)]
Merge "Make pip-requires a little F18 friendlier"

12 years agoOnly delete the flavors that the script will then replace.
Clint Byrum [Wed, 16 Jan 2013 16:47:14 +0000 (08:47 -0800)]
Only delete the flavors that the script will then replace.

Change-Id: I9e78a1f98c0ba8d449e127a415baac8c469389a3
Fixes: bug #1100365
12 years agoMake pip-requires a little F18 friendlier
Jeff Peeler [Tue, 15 Jan 2013 23:46:52 +0000 (18:46 -0500)]
Make pip-requires a little F18 friendlier

This change also aligns with Nova, so should be fine.

Change-Id: I4b16774e0f79d4cb7519fb831647e835f6ced57c
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoRemove instance in ERROR state after failed create
Steven Dake [Tue, 15 Jan 2013 20:38:21 +0000 (13:38 -0700)]
Remove instance in ERROR state after failed create

If a VM was created but resulted in a nova error, the VM would enter
an error state and not be deleteable via heat delete.  Instead
the VM would persist after the delete operation.

Change-Id: I9135aefdf08aba9551f9290bd072906372583ed1
Fixes: bug #1099634
12 years agoRemove extras dependency with a partial oslo sync.
Steve Baker [Tue, 15 Jan 2013 19:58:47 +0000 (08:58 +1300)]
Remove extras dependency with a partial oslo sync.

Only service.py and importutils.py have been synchronized.

This change is a blocker for producing g-2 rpms

Change-Id: I692a8f6c9948a7aa75a2f6db7657d6c72e09a772

12 years agoheat engine : WaitCondition FnGetAtt return correct signal data
Steven Hardy [Tue, 15 Jan 2013 11:43:50 +0000 (11:43 +0000)]
heat engine : WaitCondition FnGetAtt return correct signal data

FnGetAtt for WaitCondition should return data in the format described
in the AWS docs, currently it always returns "None"

fixes bug 1097786

Change-Id: Ifb8e89a58fedbab8815fe1197acb138afbc8d2a3
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : Implement Count property for WaitCondition
Steven Hardy [Mon, 14 Jan 2013 16:59:03 +0000 (16:59 +0000)]
heat engine : Implement Count property for WaitCondition

The Count property of WaitCondition is currently ignored, so
regardless of the number specified the WaitCondition resource will
always go to CREATE_COMPLETE on the first WaitConditionHandle signal.
This patch fixes this so the Count property is handled correctly.

fixes bug 1097813

Change-Id: I71348c553702c0282a8826488c953ac3c2c76e38
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : Add metadata validation to WaitConditionHandle
Steven Hardy [Fri, 11 Jan 2013 13:43:52 +0000 (13:43 +0000)]
heat engine : Add metadata validation to WaitConditionHandle

Validate metadata before updating the WaitConditionHandle resource
metadata, if we raise a ValueError in response to incorrectly
formatted metadata then the CFN API will map this to a
HeatInvalidParameterValueError, resulting in a descriptive error
response to the malformed request

Change-Id: I6fde27066e9e0eaee97b59a7fbbace09ca620b48
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : implement metadata_update per-resource
Steven Hardy [Fri, 11 Jan 2013 11:08:34 +0000 (11:08 +0000)]
heat engine : implement metadata_update per-resource

Abstract updates to resource metadata so they are implemented per-resource,
with a generic implementation which is a no-op, since currently the only
resource which needs metadata update via the RPC API is WaitConditionHandle.
This allows resource-specific metadata validation and update logic to be more
easily added.

ref bug 1097813

Change-Id: I094e74b6cd8cb2436f05beed9629fc3c3a34e622
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoAdd auth middleware for custom cloud backend
Tomas Sedovic [Wed, 2 Jan 2013 16:34:23 +0000 (17:34 +0100)]
Add auth middleware for custom cloud backend

Custom backends will want to provide their own authentication mechanisms
instead of using the Keystone token or EC2-like systems we have in
place.

This adds a new middleware and paste pipeline for the custom backend
that will skip the normal authentication and queries the backend's
`authenticated(context)` method instead.

Since the backend is connected to the Engine whereas the auth middleware
is run in the API service (which may sit on a separate box and have no
access to the engine config or the custom backend itself), we add a new
RPC call that lets API verify the passed credentials.

Change-Id: I2fc4a19564b1e410adb79bd9266f6b6da07dd6c9
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
12 years agoAdd configurable cloud backend
Tomas Sedovic [Thu, 13 Dec 2012 17:22:07 +0000 (18:22 +0100)]
Add configurable cloud backend

This allows us to use a different IaaS backend (other than OpenStack).
OpenStack is still used by default.

Change-Id: I1772d57ae583a281204edfb80fbfde220b004a9d
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
12 years agoTrivial commit to make daily rpm builds work again.
Steve Baker [Sun, 13 Jan 2013 20:33:20 +0000 (09:33 +1300)]
Trivial commit to make daily rpm builds work again.

A trivial commit is needed so that the
grizzly-2 tag is not on git HEAD.

Change-Id: Id671f1e2f39d93e6e9caff644fd9764d9de4f38e

12 years agoMerge "heat engine : LoadBalancer resource delete nested stack"
Jenkins [Tue, 8 Jan 2013 20:02:27 +0000 (20:02 +0000)]
Merge "heat engine : LoadBalancer resource delete nested stack"

12 years agoheat engine : DBInstance don't pass credentials to cfn-init
Steven Hardy [Tue, 8 Jan 2013 19:21:56 +0000 (19:21 +0000)]
heat engine : DBInstance don't pass credentials to cfn-init

Don't create user/accesskey and pass them to cfn-init as resource
metadata for internal nested stacks is not available via the cfn API
so passing them causes an error in the engine logs (and creates some
unnecessary keystone credentials)

fixes bug 1097362

Change-Id: If2fe484d834e3e5730b21a18c363a5bf5a4c45f6
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : LoadBalancer resource delete nested stack
Steven Hardy [Tue, 8 Jan 2013 18:47:05 +0000 (18:47 +0000)]
heat engine : LoadBalancer resource delete nested stack

Ensure LoadBalancer resource deletes the underlying nested
stack when the owning stack is deleted - needs to inherit
from stack.NestedStack as this implements handle_delete()

fixes bug 1097394

Change-Id: I2002bed361511a495cbdf38cad7b61e148a68ba2
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoMerge "heat engine : allow NestedStack template validation to work"
Jenkins [Tue, 8 Jan 2013 18:49:58 +0000 (18:49 +0000)]
Merge "heat engine : allow NestedStack template validation to work"

12 years agoMerge "heat engine : ensure create thread exits on stack delete"
Jenkins [Tue, 8 Jan 2013 18:48:02 +0000 (18:48 +0000)]
Merge "heat engine : ensure create thread exits on stack delete"

12 years agoheat engine : DBInstance fix so nested stack is deleted
Steven Hardy [Tue, 8 Jan 2013 18:10:22 +0000 (18:10 +0000)]
heat engine : DBInstance fix so nested stack is deleted

Currently the RDS DBInstance resource inherits from stack.Stack but it
should be stack.NestedStack, which implements handle_delete whereas
stack.Stack does not, meaning the DBInstance nested stack is never
deleted when the owning stack gets deleted.

fixes bug 1097299

Change-Id: I865611d4de9ea4c3caa43c7a11a28924602a5b0d
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : allow NestedStack template validation to work
Steven Hardy [Tue, 8 Jan 2013 15:47:55 +0000 (15:47 +0000)]
heat engine : allow NestedStack template validation to work

Nested stack templates (e.g WordPress_Composed_Instances.template)
will currently fail validation because FnGetAtt attempts to get
outputs for a stack which doesn't yet exist.  So add a fallback which
returns a string "None" for Outputs.* which will allow template
validation to succeed, and will still return the actual output when
the nested stack has actually been created.

fixes bug 1097290

Change-Id: Ic3f48cfc2f047c104946d6dde533143d0d91a32c
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : ensure create thread exits on stack delete
Steven Hardy [Tue, 8 Jan 2013 14:37:23 +0000 (14:37 +0000)]
heat engine : ensure create thread exits on stack delete

Detect GreenletExit exception when creating resources - this may
happen if the stack gets deleted while the stack is still in
CREATE_IN_PROGRESS state.  If we don't detect this then the stack
continues trying to create resources during/after the stack has been
deleted, with predictably nasty results..

fixes bug 1096150

Change-Id: Ieb6ed38d0000cd6fe3bc1af2eb5d2e5eecc74fb4
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoHandle different cloud-init versions gracefully
Jeff Peeler [Mon, 7 Jan 2013 17:36:20 +0000 (12:36 -0500)]
Handle different cloud-init versions gracefully

Change loguserdata script to python to allow easy detection of which
version of cloud-init installed. Some logging was added to
part-handler.

Took out injecting the command to touch provision-finished in the user
data. This is now handled in loguserdata.py.

Note that up until cloud-init version 0.6.0, the user data is not
passed to part-handler. This behavior is why it's not possible to log
the provisioning process with older versions. (Technically could rely
on the redirection support added post 0.6.0, but having a separate
file just for provisioning seems beneficial.)

fixes bug 1072921

Change-Id: I9005a21bfb74f27208f9195a6e10e1d2b474e91f
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoMerge "heat engine : map DBInstance DBSecurityGroups parameter correctly"
Jenkins [Mon, 7 Jan 2013 16:17:32 +0000 (16:17 +0000)]
Merge "heat engine : map DBInstance DBSecurityGroups parameter correctly"

12 years agoMerge "heat tests : remove unused get_sftp_client()"
Jenkins [Mon, 7 Jan 2013 16:17:26 +0000 (16:17 +0000)]
Merge "heat tests : remove unused get_sftp_client()"

12 years agoMerge "heat tests : remove pointless get_ssh_client"
Jenkins [Mon, 7 Jan 2013 16:16:09 +0000 (16:16 +0000)]
Merge "heat tests : remove pointless get_ssh_client"

12 years agoMerge "heat tests : functional tests align eip output with Folsom"
Jenkins [Mon, 7 Jan 2013 16:16:07 +0000 (16:16 +0000)]
Merge "heat tests : functional tests align eip output with Folsom"

12 years agoAdd missing files to generated tarballs
Thierry Carrez [Mon, 7 Jan 2013 13:42:34 +0000 (14:42 +0100)]
Add missing files to generated tarballs

Fix MANIFEST.in so that all files in the repository are included
in the generated tarballs. Fixes bug 1096068.

Change-Id: I7ec7e2fcf6951357b58469539a5d552b8df66408

12 years agoheat tests : remove unused get_sftp_client()
Steven Hardy [Fri, 4 Jan 2013 15:23:30 +0000 (15:23 +0000)]
heat tests : remove unused get_sftp_client()

get_sftp_client is not needed so remove it

Change-Id: I9fb0670730e808c1f2786866ad3451f8e9f38789
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : remove pointless get_ssh_client
Steven Hardy [Fri, 4 Jan 2013 15:20:43 +0000 (15:20 +0000)]
heat tests : remove pointless get_ssh_client

get_ssh_client() doesn't actually do anything, so just reference the
attribute directly

Change-Id: I6a88b09953a7ca5a0e2675ac1c2c5a99b8cf724a
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : map DBInstance DBSecurityGroups parameter correctly
Steven Hardy [Fri, 4 Jan 2013 17:21:53 +0000 (17:21 +0000)]
heat engine : map DBInstance DBSecurityGroups parameter correctly

The DBInstance nested stack template defines a DBSecurityGroups list parameter,
which should be "CommaDelimitedList" type, curently it's a "List" type which
breaks when the template is parsed.  To make this work we also have to mangle
the property (passed in the top level template) format to match the parameter
format, because in AWS Lists are not represented in the same way for Properties and
Parameters (sigh..)

fixes bug 1096099

Change-Id: Ie078d61847d89ea9dcd55f798b808e595c2d2e12
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : functional tests align eip output with Folsom
Steven Hardy [Fri, 4 Jan 2013 15:18:47 +0000 (15:18 +0000)]
heat tests : functional tests align eip output with Folsom

Folsom novaclient floating_ips.list() returns the instance ID as
instance_id not resource_id

Change-Id: Ie958ada0984f9927cd490f01bd4db3102c53090a
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoTurn off tag_date on branch master
Steve Baker [Thu, 3 Jan 2013 21:48:35 +0000 (10:48 +1300)]
Turn off tag_date on branch master

rpmbuild actually requires no date tag in the version.

Change-Id: I8bffff1924b4bc43324346f799d866fcc0f51a55

12 years agoheat tests : CFN_API functional tests NoEcho Parameters fix
Steven Hardy [Thu, 3 Jan 2013 16:50:13 +0000 (16:50 +0000)]
heat tests : CFN_API functional tests NoEcho Parameters fix

NoEcho is now implemented in the engine for parameters, so we
need to change the expected ParameterValues to '******' to match
the API response for the NoEcho==True parameters

Change-Id: I4f50633dc5358e8779bfbaf03dda2f7fe1b7d452
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : functional tests remove erroneous finally clause
Steven Hardy [Thu, 3 Jan 2013 14:36:53 +0000 (14:36 +0000)]
heat tests : functional tests remove erroneous finally clause

Some tests have had a finally clause added which means they delete the
stack before doing any tests, even when it is created successfully.  Doh!

Change-Id: I7cefd313b9f810067304fe19f58a038226555b86
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoMerge "On master branch, tag tarballs as dev snapshots"
Jenkins [Thu, 3 Jan 2013 07:34:53 +0000 (07:34 +0000)]
Merge "On master branch, tag tarballs as dev snapshots"

12 years agoMerge "Use correct stack_id arg name for metadata_update()"
Jenkins [Thu, 3 Jan 2013 07:34:17 +0000 (07:34 +0000)]
Merge "Use correct stack_id arg name for metadata_update()"

12 years agoheat tests : convert stack ID to uuid format
Steven Hardy [Wed, 2 Jan 2013 18:17:48 +0000 (18:17 +0000)]
heat tests : convert stack ID to uuid format

The functional tests still have the old non-uuid format so the regex needs
changing to match the new uuid4 format

Change-Id: Ic1c1026bc2a11ef108f0d33b14bbead7872836f4
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : functional tests poll_glance cleanup
Steven Hardy [Wed, 2 Jan 2013 17:37:38 +0000 (17:37 +0000)]
heat tests : functional tests poll_glance cleanup

There's no point passing self.glanceclient into poll_glance()
when we can just reference it directly

Change-Id: I8ee873f544f847ca9f203ad9da06244597cdff7a
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : convert functional tests to folsom glanceclient
Steven Hardy [Wed, 2 Jan 2013 17:19:17 +0000 (17:19 +0000)]
heat tests : convert functional tests to folsom glanceclient

Convert functional tests to work with folsom glanceclient, also
remove the conditional essex/folsom module import since this will
no longer work on essex (this was bogus anyway since this code can
never have worked on folsom)

Note : this breaks compatibility with essex for the functional tests, so
any platform running them must be running >= Folsom from now on.

(The essex/folsom glance client interfaces are too different to make it worth
supporting both for the functional tests, ref heat-jeos..)

Change-Id: I4463bfab7f8acf93b2eafa4bb702bf86d8c78652
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoUse correct stack_id arg name for metadata_update()
Steve Baker [Fri, 28 Dec 2012 00:23:51 +0000 (13:23 +1300)]
Use correct stack_id arg name for metadata_update()

Change-Id: I5e4554aa7670d505f45b1512b7135276079b3918

12 years agoOn master branch, tag tarballs as dev snapshots
Steve Baker [Sun, 23 Dec 2012 21:37:48 +0000 (10:37 +1300)]
On master branch, tag tarballs as dev snapshots

Change-Id: Ia0bdad7fdff2a8d0d27b1e703ff20a2a89a102cc