Jeff Peeler [Sat, 15 Sep 2012 01:52:15 +0000 (21:52 -0400)]
Change rpc cleanup to occur before killing engine thread
This bug only manifested itself after a heat request was made to the
engine. Once a request was made a Qpid connection handler continued
to wait in a select call, presumably for a subsequent request. Closing
the connection immediately after detecting a keyboard interrupt and then
terminating the thread yields a clean shutdown with no traceback.
Closes #176
Change-Id: Ifdb82d33a6c52a004bbd6b08c564264f4140e800 Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
Steven Hardy [Fri, 14 Sep 2012 10:59:58 +0000 (11:59 +0100)]
heat tests : bugfix utils cleanup function
end state for stacks is DELETE_COMPLETE, but then they
are deleted, hence we need to test for either DELETE_COMPLETE
or a null result to avoid false failures
Change-Id: I7e35c5a734d1005fa38d587353cbca5b911ec77b Signed-off-by: Steven Hardy <shardy@redhat.com>
Ensure that whenever a stack is created, we delete it after the test by
putting the cleanup() call into the tearDown() method. For this to work,
we must also move the actual creation into the test itself, since an
exception during setUp() will mean that tearDown is not called.
Steven Dake [Thu, 13 Sep 2012 05:43:30 +0000 (22:43 -0700)]
creating instances failed as a result of regression in last commit
The previous commit to the tree organizes resource names by
stack.resource. Most of the openstack APIs take resource ids
but the instance create operation requires text identifiers.
Rewrite the text identifiers for the nova security groups before
starting an instance.
Change-Id: I8a842868781ecb353f66b5a4e3d022766a4c8a0e Signed-off-by: Steven Dake <sdake@redhat.com>
Steven Dake [Wed, 12 Sep 2012 22:12:50 +0000 (15:12 -0700)]
Make physical resource names unique based upon stack name
Some templates use the same resource name when registering with
nova. Nova will not allow mulitple resource names to register
with the same name in all cases, and in those it does, it often
becomes confused (in the case of EIP). This patch creates a
dot notation
For the LB test, an example of the resources would be:
teststack.LoadBalancer.LB_instance
teststack.DatabaseServer.MySqlDatabaseServer
teststack.WikiServerOne
Fixes Issue #160
Fixes Issue #136
Thanks to asalkeld@redhat.com for helping sort out the unit
test cases.
Change-Id: I14f4551feb41c7f98caa30dd98f997da6d00c467 Signed-off-by: Steven Dake <sdake@redhat.com>
Jeff Peeler [Wed, 12 Sep 2012 20:25:25 +0000 (16:25 -0400)]
Change Stack to support user defined parameter
This change allows tests to specify DBUsername/DBPassword if necessary.
The keyname is still looked up in nova and the distribution is retrieved
from the already existing Stack parameter.
Change-Id: I3732ffb685d68c8a72a83247f74ed11a50a74cd1 Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
Steven Hardy [Tue, 11 Sep 2012 18:23:27 +0000 (19:23 +0100)]
heat : test utils, extract ec2 credentials from keystone
For StackBoto extract the ec2 credentials from keystone and
pass them into the client, so the functional tests don't rely
on ec2 credentials from config-files and only need the currently
provided keystone credentials
Change-Id: Ifc959011cc5b9ee77ebf04e380dc6a4059903c6d Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Tue, 11 Sep 2012 18:03:41 +0000 (19:03 +0100)]
heat : comment credentials in template boto.cfg
Comment out the credentials section in /etc/boto.cfg
this allows us to pass the correct host/endpoint without
having world-readable credentials. This can then be used
as a template for per-user ~/.boto files if desired
Change-Id: I4cea0cb3b790186ddc041edad0ab4ee4b7e8f956 Signed-off-by: Steven Hardy <shardy@redhat.com>
Steve Baker [Tue, 11 Sep 2012 02:58:34 +0000 (14:58 +1200)]
Implement the AWS::S3::Bucket resource type.
An attempt was made to make created bucket names readable and unique.
Names are of the format heat-<resource name>-<random hex>. eg:
heat-S3Bucket-b420d12d02e5d6e46f13
Only the swift v2 auth is currently supported, which means swift will need to
use keystone for auth. This may be a valid assumption for any environment that
is running Heat.
When DeletionPolicy is Delete then an attempt is made to delete the container,
but the stack will still be deleted if container delete fails.
Run the template S3_Single_Instance.template to give it a try.
Functional tests will be coming in a later change.
Update documentation on configuring metadata server
The docs need to reflect the fact that the metadata server cannot be
configured and launched until after Nova has created the virtual bridge
interface.
Add retry logic in order to make creating flavors more
robust. Nova rate-limiting frequently causes actions to fail
so wrap all requests in retry/sleep logic and check we can
connect to nova before attempting to change anything
Ref #225
Change-Id: I1b1014df04602935f561c08ba29287061224b5f3 Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Mon, 10 Sep 2012 10:03:37 +0000 (11:03 +0100)]
heat tools : add ephemeral disk for all flavors
Add ephemeral disk for all flavors in nova_create_flavors.sh
as it's currently not possible for EBS to work without a fixed
mapping to a specific block device name, meaning the EBS templates
will break for micro/tiny if there if no ephemeral disk defined
Change-Id: I801f00aba5b431d30362cd4b34da2f66457220c5 Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Mon, 10 Sep 2012 09:49:45 +0000 (10:49 +0100)]
heat tools : check services running after openstack install
Check all expected services are running after starting them when
doing tools/openstack install, should avoid possible racy behavior
when we assume everything is up and immediately call nova_create_flavors.sh
Ref #225
Change-Id: I87ec0ca31579173cb9218fa79e027fd5b15031f0 Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Dake [Fri, 7 Sep 2012 20:22:42 +0000 (13:22 -0700)]
Rework functional test case infrasatructure
To support multi-instance, two new classes were made:
Stack - represents a stack
Instance - represents an instance
For multi-instance stacks, create multiple Instance objects
for each instance in the stack.
For each instance in a stack, an instance object can be created which
helps validate the individual instance sets up properly.
test_WordPress_Single_Instance_With_EBS.py fails - see issue #226
Change-Id: Iddec87cd1332a9b5796c5c7e7d382ef723c3544e Signed-off-by: Steven Dake <sdake@redhat.com> Signed-off-by: Tomas Sedovic <tsedovic@redhat.com> Signed-off-by: Ian Main <imain@redhat.com>
Ian Main [Thu, 6 Sep 2012 15:27:45 +0000 (08:27 -0700)]
More EBS fixes.
Single instance with EBS apparently needs an httpd restart in order to
keep talking to mysql after we change the partition. Also change other
EBS templates to use vdc.
Change-Id: I180cca2166a0210d5d8dd3e0aea111ea625b865a Signed-off-by: Ian Main <imain@redhat.com>
Zane Bitter [Thu, 30 Aug 2012 11:32:47 +0000 (13:32 +0200)]
Rename heat-api to heat-api-cfn
The previous heat-api is, in fact, a CloudFormation-compatible API. Rename
it to heat-api-cfn, analogous to how the EC2 API in Nova is named
nova-api-ec2.
Previously stacks could only be referenced by name. Now, use the canonical
stack identifier to act on them. The identifier can be obtained from the
RPC API by looking it up with identify_stack. In the AWS API, the user
can pass an ARN that is converted into an identifier.
This call converts a stack name into a fully-qualified stack identifier.
This allows us to, e.g., add support for keeping deleted stacks around in
the database while still allowing stack names to be reused, since the
deleted stacks can be referenced using this ID.
Update functional test WordPress_Single_Instance_With_EIP
to use the new verify_wordpress which checks that the wordpress
homepage specified in the stack output looks OK
Change-Id: I6b839e95f2c9fc8d89a22c062c393d6f14fb5df9 Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Wed, 5 Sep 2012 09:47:46 +0000 (10:47 +0100)]
heat tests : FuncUtils use heat_client in create_stack
Use heat_client (not subprocess) to create the stack,
as this will allow easier testing of the boto_client
library and easier checking of create_stack result
Change-Id: Ic3f710ec2e467bcd2fde1a2451709d444b89aca0 Signed-off-by: Steven Hardy <shardy@redhat.com>
Update test_WordPress_Single_Instance.py to use the new
verify_wordpress which checks that the wordpress homepage
specified in the stack output looks OK
Change-Id: I9c2c35215ac97f98e62bf1787db3d8645b50c762 Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Mon, 3 Sep 2012 13:04:31 +0000 (14:04 +0100)]
heat tools : add qpid-cpp-server-daemon to tools/openstack
As of qpid-cpp-server-0.16-5 the service scripts have been
moved to a separate qpid-cpp-server-daemon package, so add
this to the list of required packages for openstack install
Fixes : #219
Change-Id: I6c8b53a69953c543df7cd68637e4ff5e4ca495ad Signed-off-by: Steven Hardy <shardy@redhat.com>