]> review.fuel-infra Code Review - openstack-build/heat-build.git/log
openstack-build/heat-build.git
12 years agoDepend on WebOb==1.2.3 to align with other OS projects
Steve Baker [Thu, 7 Feb 2013 03:23:10 +0000 (16:23 +1300)]
Depend on WebOb==1.2.3 to align with other OS projects

Change-Id: Ic1b113a63a9fa44acf98efbe18783f5be5cbeada

12 years agoMerge "Add cinder support to resource volume"
Jenkins [Wed, 6 Feb 2013 19:31:54 +0000 (19:31 +0000)]
Merge "Add cinder support to resource volume"

12 years agoheat tests : fix StackControllerTest name duplication
Steven Hardy [Wed, 6 Feb 2013 10:05:58 +0000 (10:05 +0000)]
heat tests : fix StackControllerTest name duplication

StackControllerTest appears twice in the run_tests.sh output,
since it's used for both the CFN and ReST API tests, so rename
the CFN testcase to make run_tests output less confusing

Change-Id: Iedf2e21ecd0b511eb93a11c2cf593dbfc1bcaca9
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : remove duplicate import
Steven Hardy [Tue, 5 Feb 2013 16:31:05 +0000 (16:31 +0000)]
heat tests : remove duplicate import

Change-Id: I20364f10041420d898e3255adcc12f3a8f53ed03
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoAdd cinder support to resource volume
Jeff Peeler [Mon, 28 Jan 2013 20:24:54 +0000 (15:24 -0500)]
Add cinder support to resource volume

Fixes bug #1073164

Change-Id: I190067e5ea9334e336e6f105222905b1d48408fd
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoAdd initial code to support policy.json implementation
Steven Hardy [Tue, 5 Feb 2013 19:21:00 +0000 (19:21 +0000)]
Add initial code to support policy.json implementation

We don't currently support a policy.json file like
other openstack services, so this code (mostly copied
from glance, then modified a bit) will allow us to
add policy-based authorization to out APIs fairly
easily

Change-Id: I5ad9f55b3d0979e2526953bdce8b8227852e4b72
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoupdate openstack common and include policy.py
Steven Hardy [Tue, 5 Feb 2013 14:18:05 +0000 (14:18 +0000)]
update openstack common and include policy.py

Sync with latest oslo (now at bd5d9f0), and update config to
pull in policy.py

Change-Id: I3571477cbf7c538c9ddb6860f85265ed503d2049
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoRemove unused heat/common/policy.py
Steven Hardy [Tue, 5 Feb 2013 14:09:00 +0000 (14:09 +0000)]
Remove unused heat/common/policy.py

Remove heat/common/policy.py, since we don't currently implement
policy filtering, and when we do we should use the oslo policy.py

Change-Id: I0c1d26ceed958d270f59edd612911ce24f74c1ff
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoFix a few bash logic errors in install script
Jeff Peeler [Tue, 5 Feb 2013 05:24:21 +0000 (00:24 -0500)]
Fix a few bash logic errors in install script

Slipped by in 0a37f56972714818fcf378945b0d3b91d1b8e10a

Change-Id: Id02454e8224f99b057cc8c9e92580ae6c26bc14e
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoMerge "Change install scripts to use cinder"
Jenkins [Tue, 5 Feb 2013 01:06:18 +0000 (01:06 +0000)]
Merge "Change install scripts to use cinder"

12 years agoMerge "Update to latest oslo-version code."
Jenkins [Tue, 5 Feb 2013 01:03:10 +0000 (01:03 +0000)]
Merge "Update to latest oslo-version code."

12 years agoFix typo in AutoScaling update
Angus Salkeld [Mon, 4 Feb 2013 22:12:51 +0000 (09:12 +1100)]
Fix typo in AutoScaling update

Change-Id: I2e96e6f71c3cb0b9ce73e57344e0eb4706b95f70

12 years agoChange install scripts to use cinder
Jeff Peeler [Fri, 25 Jan 2013 21:06:16 +0000 (16:06 -0500)]
Change install scripts to use cinder

Fixes bug #1073164

Change-Id: Id483b028d19dbbc30984299120b87fd020f19903
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoheat engine : AutoScalingGroup UpdateStack support
Steven Hardy [Mon, 4 Feb 2013 18:03:52 +0000 (18:03 +0000)]
heat engine : AutoScalingGroup UpdateStack support

Adds improved UpdateStack support for AutoScalingGroup,
now the following properties can be updated without
replacement:
'MaxSize', 'MinSize', 'Cooldown', 'DesiredCapacity'

Change-Id: Ic47b4a2456dc19cd91eec7b0381d5d82fcd3f332
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : Resource add function to compare properties
Steven Hardy [Mon, 4 Feb 2013 14:09:04 +0000 (14:09 +0000)]
heat engine : Resource add function to compare properties

Add update_template_diff_properties to make comparison of
pre/post update resource properties easier

Change-Id: Ic37d37ae510a62739d4cc4219cfd69479a87767d
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : update_allowed_keys should be tuple
Steven Hardy [Mon, 4 Feb 2013 13:35:05 +0000 (13:35 +0000)]
heat tests : update_allowed_keys should be tuple

In test_resource.py update_allowed_keys should be a tuple not
a list, so it matches the expected usage in the resource classes

Change-Id: Ic7428e3790ea2c8c9887b464daf303c4f5d563fc
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : Resource remove redundant None get defaults
Steven Hardy [Mon, 4 Feb 2013 12:08:29 +0000 (12:08 +0000)]
heat engine : Resource remove redundant None get defaults

get(k) returns None anyway if k doesn't exist, so the default to
None is not needed

Change-Id: Id954c510a5c4795b5e0c3ccdcca186983dee2e8f
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat docs : Fix version string issue
Steven Hardy [Mon, 4 Feb 2013 14:23:07 +0000 (14:23 +0000)]
heat docs : Fix version string issue

Fix issue with release/version strings in doc build config
which was causing doc builds to fail with an error.

Fixes bug 1115269

Change-Id: Ia02d52f502d808d758a541e84056d5ac94aff8b8
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoUpdate to latest oslo-version code.
Monty Taylor [Sun, 3 Feb 2013 22:29:49 +0000 (09:29 +1100)]
Update to latest oslo-version code.

This pulls in the bugfix patch that handles the usecase wher a packager
running tests from a tarball.

Change-Id: I38cadc5ceaf880f632a0f7ed4d5e9a51c9ddc4e5

12 years agoheat engine : WaitCondition add Handle property validation
Steven Hardy [Fri, 1 Feb 2013 13:01:18 +0000 (13:01 +0000)]
heat engine : WaitCondition add Handle property validation

Add validation to the Handle property for WaitCondition, so
we check that the identifier in the provided URL maps to
a WaitConditionHandle resource in the same stack as the
WaitCondition

fixes bug 1100754

Change-Id: I44c8f52435016fad5a35183472d2b0df26c1915d

12 years agoheat tests : test_api_cfn_v1 move verify out of teardown
Steven Hardy [Thu, 31 Jan 2013 14:22:44 +0000 (14:22 +0000)]
heat tests : test_api_cfn_v1 move verify out of teardown

Move VerifyAll out of the teardown function so if it fails
the stubs are still unset

Change-Id: I92132236f013d9d9dfeb82ba77ecfadc2e07f671
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : test_waitcondition move cleanup out of teardown
Steven Hardy [Thu, 31 Jan 2013 11:44:40 +0000 (11:44 +0000)]
heat tests : test_waitcondition move cleanup out of teardown

Move stack delete and mox VerifyAll out of the teardown function
so if either fails the stubs are unset, meaning all subsequent
tests won't fail due to being unable to setup their stubs
stack delete is now performed via the stack_delete_after decorator

Change-Id: I636af84dd66ba4923f068c56ec13e7990d8edc03
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat tests : Add utility decorator for deleting stacks
Steven Hardy [Fri, 1 Feb 2013 11:23:33 +0000 (11:23 +0000)]
heat tests : Add utility decorator for deleting stacks

Add decorator function which allows test functions to be wrapped
such that if they create a stack (and it is stored in the testcase
class as self.stack) it is always deleted on test exit, regardless
of test success/failure

Change-Id: Ibde9a2cee08448e3f24c6b7efbfe756a01f9eccc
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat api : add register_api_opts to init.py
Steven Hardy [Thu, 31 Jan 2013 15:41:16 +0000 (15:41 +0000)]
heat api : add register_api_opts to init.py

Add register_api_opts to api/__init__.py, slightly simplifying
the api executables, and also solving an issue with some tests
which were not working via nosetests -s due to the required
options not being registered in cfg.CONF

Change-Id: I70b16aae1f73f72518013dbcda37defa79fc5649
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : WaitConditionHandle use creation time for timestamp
Steven Hardy [Tue, 29 Jan 2013 18:20:04 +0000 (18:20 +0000)]
heat engine : WaitConditionHandle use creation time for timestamp

Use the resource creation time for the pre-signed URL timestamp,
otherwise you get a different timestamp/signature every time you
refer to the resource, which makes things like comparing templates
for update more difficult.

Change-Id: Ieb4a6269cfcaf1214c08442db03772fdd7570d59
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : don't treat UPDATE_COMPLETE as failure
Steven Hardy [Tue, 29 Jan 2013 16:02:32 +0000 (16:02 +0000)]
heat engine : don't treat UPDATE_COMPLETE as failure

The parser update logic currently treats UPDATE_COMPLETE
as a failure, which is incorrect

Change-Id: Ibac98fc08cdf3653be80cedfc3ed8ecb5c3eba8f
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : pass fully resolved template to update
Steven Hardy [Tue, 29 Jan 2013 15:58:08 +0000 (15:58 +0000)]
heat engine : pass fully resolved template to update

We need to pass the fully resolved (static and runtime)
resource template into the resource update(), so the
resource can compare pre/post update templates properly

Change-Id: I2fba2fef9c9f9ccb9b7cde9bd24bd06af7659240
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : Support Metadata update for Instance resource
Steven Hardy [Tue, 29 Jan 2013 13:57:02 +0000 (13:57 +0000)]
heat engine : Support Metadata update for Instance resource

Allow Instance Metadata to be updated via UpdateStack

ref blueprint instance-update-stack

Change-Id: I7c2fd281650e0715c86bf63b8ab61114a9b81da8
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoMerge "heat engine : add Resource update_template_diff method"
Jenkins [Thu, 31 Jan 2013 10:27:02 +0000 (10:27 +0000)]
Merge "heat engine : add Resource update_template_diff method"

12 years agoMerge "heat engine : pass json snippet into resource handle_update"
Jenkins [Thu, 31 Jan 2013 10:23:31 +0000 (10:23 +0000)]
Merge "heat engine : pass json snippet into resource handle_update"

12 years agoMerge "heat engine : don't replace resource template before update"
Jenkins [Thu, 31 Jan 2013 10:20:26 +0000 (10:20 +0000)]
Merge "heat engine : don't replace resource template before update"

12 years agoheat engine : add Resource update_template_diff method
Steven Hardy [Mon, 28 Jan 2013 16:52:23 +0000 (16:52 +0000)]
heat engine : add Resource update_template_diff method

Add method to top-level Resource class update_template_diff()
which allows us to determine the difference between old/new
templates for a resource update, and also raise an error
if the changed keys are not in the list of those defined
as supported for update by the resource

ref blueprint instance-update-stack

Change-Id: Ibef07a0cecbc15f7f1d6c2c663743e3af8023057
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : pass json snippet into resource handle_update
Steven Hardy [Mon, 28 Jan 2013 14:45:24 +0000 (14:45 +0000)]
heat engine : pass json snippet into resource handle_update

Change handle_update to accept the resource json_snippet,
needed to decide if a non-replacement update is possible
by comparing pre and post update resource definitions

ref blueprint instance-update-stack

Change-Id: I7eedce41eae232330f6fce4f098183cbd7fd6768
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : don't replace resource template before update
Steven Hardy [Mon, 28 Jan 2013 14:38:20 +0000 (14:38 +0000)]
heat engine : don't replace resource template before update

We want to validate the pre-update properties without touching
the existing template, because the resource implementation will
need to compare old/new json snippets to decide if a and update
can be performed or not.

ref blueprint instance-update-stack

Change-Id: I37ce6e799242819de6104a53f8458d8bbc3abf1c
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoMerge "Wait for deletion of Instances during creation"
Jenkins [Thu, 31 Jan 2013 08:54:44 +0000 (08:54 +0000)]
Merge "Wait for deletion of Instances during creation"

12 years agoMerge "Fix Instance deletion in unit tests"
Jenkins [Thu, 31 Jan 2013 08:54:42 +0000 (08:54 +0000)]
Merge "Fix Instance deletion in unit tests"

12 years agoHardcode provision-finished file path
Jeff Peeler [Wed, 30 Jan 2013 19:26:34 +0000 (14:26 -0500)]
Hardcode provision-finished file path

A recent change removed the use of the cloudinit module, so write this
log to /var/lib/heat. Functional test paths updated as well.
(User data injection was removed, so that has been deleted as well.)

Change-Id: Ibcaf310a5e4ff9a9ed8b1065bdd411e1b95d4de5
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoMerge "heat engine : error on resource update with invalid properties"
Jenkins [Wed, 30 Jan 2013 12:34:11 +0000 (12:34 +0000)]
Merge "heat engine : error on resource update with invalid properties"

12 years agoMerge "Store instance resource-id earlier"
Jenkins [Tue, 29 Jan 2013 23:33:17 +0000 (23:33 +0000)]
Merge "Store instance resource-id earlier"

12 years agoWait for deletion of Instances during creation
Zane Bitter [Tue, 29 Jan 2013 20:54:07 +0000 (21:54 +0100)]
Wait for deletion of Instances during creation

When an Instance was still in the BUILD state when it was deleted, the
resource was not waiting for the instance to be deleted before declaring
success and moving on.

Change-Id: I05d553fedf10e01a06e20ca0e8ccbbbf463980e4
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoFix Instance deletion in unit tests
Zane Bitter [Tue, 29 Jan 2013 20:49:27 +0000 (21:49 +0100)]
Fix Instance deletion in unit tests

We need to actually return a NotFound exception from the nova client,
rather than just relying on it returning a status other than ACTIVE.

Change-Id: I1bb0d07db0ffb5c0ed780eb4ca7f5d7ddb98510e
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoInitial support for Transifex translations
Clint Byrum [Sun, 20 Jan 2013 04:45:17 +0000 (20:45 -0800)]
Initial support for Transifex translations

Adds initial message extract and configuration to allow heat
to work with Transifex, which is the chosen platform for
translations in OpenStack.

Fixes bug #1082805

Change-Id: If8585812d6127948f75994765d274da1629069a3

12 years agoheat engine : error on resource update with invalid properties
Steven Hardy [Fri, 25 Jan 2013 14:37:26 +0000 (14:37 +0000)]
heat engine : error on resource update with invalid properties

If properties validation fails, raise an error so the resource is
marked as UPDATE_FAILED, we don't want to go ahead and try running
handle_update anyway

Change-Id: I5f748b9de6a2b02d26421a5b6e0b1b5f0db25d0c
Signed-off-by: Steven Hardy <shardy@redhat.com>
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>