Zane Bitter [Thu, 16 May 2013 11:18:18 +0000 (13:18 +0200)]
Rename handle_snapshot and pass state
Rename handle_snapshot() to handle_snapshot_delete() to better reflect what
it needs to do (both take a snapshot of the resource and then delete the
resource). Also, pass the state of the resource prior to delete being
invoked, since the resource may want to use different error handling in the
snapshot phase depending on e.g. whether the resource was created
successfully or not.
Zane Bitter [Wed, 15 May 2013 13:59:38 +0000 (15:59 +0200)]
Clean up VPC unit tests
- Ensure that stacks are cleaned up on failure.
- Add a test for the case where an something other than a valid reference
is passed as the GroupSet.
- Add a test for the case where no GroupSet is passed.
Steve Baker [Tue, 14 May 2013 23:43:44 +0000 (11:43 +1200)]
Use python logging for loguserdata.py, log to console
Python logging is configured with a stream handler and should
also replicate the previous logging to 0600 /var/log/heat-provision.log
By logging to a stream handler cloud-init will write to its log,
which will show up in the server console log. This means that heat
provisioning can now be monitored without needing to log in with:
nova console-log <servername>
This change also touches the file /var/lib/heat-cfntools/provision-finished
instead of also writing a datestamp to it, which is redundant.
Mark McLoughlin [Thu, 2 May 2013 09:28:20 +0000 (10:28 +0100)]
Copy the RHEL6 eventlet workaround from Oslo
Tests in oslo-incubator now need the horrendous hack to workaround an
issue with eventlet on RHEL6. We've moved the patch_tox_venv tool
and redhat-eventlet.patch into oslo-incubator, so add them to
openstack-common.conf.
Steven Hardy [Mon, 13 May 2013 13:45:56 +0000 (14:45 +0100)]
engine : rename check_active to make it more generic
Rename check_active to check_create_complete, since "active" is
really a detail of Instance state, and so it seems wrong for other
resources which take a long time to create but are not Instance
based (e.g WaitConditions). This change will also allow us to
align other stack "state check" functions with the state we're
checking for in a consistent way (e.g check_delete_complete etc)
Steven Hardy [Fri, 10 May 2013 16:09:34 +0000 (17:09 +0100)]
api : Fix template-show partial URL redirect
All other API actions will provide a redirect if you only provide the
stack ID or name (rather than both), the template URL currently doesn't
because the template subpath is missing from the mapper lookup
Winson Chan [Wed, 8 May 2013 06:13:49 +0000 (23:13 -0700)]
Implement the SubnetId property in the Instance resource
If the SubnetId parameter is given in the template, the handle_create method
in the Instance resource verifies the subnet in quantum and configures the
NetworkInterfaces for the subnet. If no NetworkInterface is specified, a port
is created for the subnet and the nic is configured to use that port.
Steven Hardy [Wed, 8 May 2013 13:43:12 +0000 (14:43 +0100)]
heat-cfn : Make error with missing auth details more obvious
Exit with an error message describing the missing auth details
instead of failing with cryptic "Name or service not known" error
when credentials etc are missing
Zane Bitter [Wed, 8 May 2013 11:41:48 +0000 (13:41 +0200)]
Skip more tests that require Cinder backups
Most of the unit tests that require the backups feature in
python-cinderclient have been made optional, but a couple remained. This
patch makes those also conditional on the feature being available.
Steven Hardy [Tue, 7 May 2013 14:59:49 +0000 (15:59 +0100)]
tests : convert test_template_format to test-local templates
test_template_format is different from all other tests, in that
we don't want to use the most minimal template possible, we
actually want to test conversion works with maximal/non-trivial
templates, so copy the two templates used by this test into a
local tests/templates directory, with a README caution that
in general inline-minimal templates are preferred.
Clint Byrum [Wed, 1 May 2013 22:51:03 +0000 (15:51 -0700)]
Wait for any nova server status that makes sense
Nova may return some transient states based on operator actions that do
not mean a resource has failed. Rather than report these as unexpected,
wait on them just like BUILD.
Zane Bitter [Tue, 7 May 2013 13:10:10 +0000 (15:10 +0200)]
Add a wrappertask decorator
It is common that we might want to create a task that is a light wrapper
around another task. This allows us to, for example, call some clean-up
function after a PollingTaskGroup has completed. We really want to make
sure that any exceptions caused by timeout or cancellation get passed on to
the subtask as well.
Python 3 sports the "yield from" keyword (PEP 380) that effectively allows
the sort of nesting of generators that we want to do here. This change
provides a decorator function that allows the decorated generator function
to do the same thing using the "yield" keyword, even in Python 2.
Add alternative authentication middleware to authenticate against Keystone using
username and password instead of validating existing auth token. The benefit
being that you no longer require admin/service token to authenticate users.
To use, update heat-api.conf:
[paste_deploy]
flavor = standalone
This should make it possible to try heat out against existing public
clouds.
Steven Hardy [Fri, 3 May 2013 10:43:54 +0000 (11:43 +0100)]
heat tests : convert most tests to inline templates
Convert to inline minimal templates, to remove dependency on
in-tree templates which we plan to remove. Note there are still
some more tests remaining which need similar changes (shardy todo)
Zane Bitter [Fri, 3 May 2013 13:57:57 +0000 (15:57 +0200)]
Fix error reporting in @stack_delete_after unit tests
If a unit test decorated with @stack_delete_after (to ensure that a stack
being tested is cleaned up) fails in such a way that the stack cannot be
cleaned up, the original error was suppressed, making debugging very
difficult. In this case, we should re-raise the original exception.
Zane Bitter [Fri, 3 May 2013 14:07:14 +0000 (16:07 +0200)]
Set Stack id to None when deleted
If a Stack object has been removed from the database, we should reset its
ID to None so that if the object is used further, it will not be assumed
that it is represented in the database.
Thomas Herve [Thu, 2 May 2013 13:13:52 +0000 (15:13 +0200)]
Support Snapshot policy in volumes
This handles the Snapshot DeletionPolicy in the AWS::EC2::Volume
resource, creating a backup of the volume before deleting it. It
requires a recent cinder client with backup support.
Steve Baker [Fri, 19 Apr 2013 15:55:43 +0000 (11:55 -0400)]
Sometimes use quantum for SecurityGroup
This implements the following properties in AWS::EC2::SecurityGroup
- VpcId
- SecurityGroupEgress
If VpcId is specified, completely separate code paths
are used which make quantum calls instead of nova calls.
This implements blueprint quantum-security-group
This is based off https://review.openstack.org/#/c/22280/
with a few enhancements:
- Quantum firewall rules translated to acceptable format for ICMP
- remote_ip_prefix used for security group rule creation
Change-Id: I8f1953cb559da0e97821ae0072dfb01dc8267c0c Signed-off-by: Jeff Peeler <jpeeler@redhat.com>