Russell Bryant [Fri, 30 Aug 2013 21:57:29 +0000 (17:57 -0400)]
Sync rpc from oslo-incubator
This includes the following changes:
76972e2 Support a new qpid topology 284b13a Raise timeout in fake RPC if no consumers found 9721129 exception: remove 7b0cb37 Don't eat callback exceptions 69abf38 requeue instead of reject
Steven Hardy [Fri, 30 Aug 2013 10:12:24 +0000 (11:12 +0100)]
Remove localhost references from tests
Using localhost in dummy URLs is a bad idea, because if you get
your mocking slightly wrong, some tests try to connect to the
services running in your local test environment.
Steve Baker [Sun, 18 Aug 2013 23:12:59 +0000 (11:12 +1200)]
Implement native nova server resource
Some notes on the implementation:
- extends Resource rather than Instance since most of the
complexity of Instance is in the handling of the Volumes
attribute
- exposed properties and attributes map as closely as possible
to the underlying v1 nova API (rather than the nova client library)
- property or attribute key namespaces have been stripped to provide
a cleaner API and avoid YAML quoting.
(eg instance_name -> 'OS-EXT-SRV-ATTR:instance_name')
- an assumption is currently made that any volumes specified
in block_device_mapping should not be detached on suspend
- Network address properties attempt to cater for simple and
advanced use-cases:
- 'first_private_address' and 'first_public_address' for simple
template attribute scenarios, and to aid with AWS::EC2::Instance
transition
- 'networks' for a simple data structure which provides all addresses
- 'addresses' for the raw data structure returned by the API
Liang Chen [Wed, 28 Aug 2013 14:55:42 +0000 (22:55 +0800)]
Fix CFN API error responses
A remote exception (included in conf.allowed_rpc_exception_modules)
is now restored to a subclass of its original type (with the
exception of non heap types which will always be restored to its
original type). Catching rpc_common.RemoteError is not enough
anymore.
Clint Byrum [Tue, 27 Aug 2013 16:10:54 +0000 (09:10 -0700)]
Provide user control for maximum nesting depth
In the case of an infinitely recursing stack, Heat will continue to
keep nesting stacks until python's maximum stack recursion depth
is reached. By this point a lot of memory and time may have been
spent parsing/loading/etc.
The default of 3 is enough to deploy a stack of stacks of stacks. It
can be raised by deployers if there is a desire to do larger and more
complicated stacks, at the cost of more resource utilization.
Steven Hardy [Fri, 23 Aug 2013 10:28:01 +0000 (11:28 +0100)]
Remove unnecessary aws_* from user_creds
We currently store aws_creds, but it's never used in any of the clients
which consume the stored context. It makes sense to remove it from the
DB, but leave it in heat/common/context.py; then the credentials used for
real requests *to* heat (authenticated via the ec2token middleware) are
obtainable in the context, but we don't populate them in context to be
used in client connections for requests going *from* heat.
Clint Byrum [Tue, 27 Aug 2013 16:04:28 +0000 (09:04 -0700)]
Change localhost references in test_nested_stack
These references are using localhost which may be running a server and
provide valid responses, contaminating the test. Using RFC2606's
recommended test TLD of '.test' ensures that these will never resolve.
This gets rid of the code to delete failed instances in
InstanceGroup so that administrators can debug what happened
if any instances fail to start. It also allows the resize operation
to raise an error, so the InstanceGroup should be in a FAILED state
after a failed resize operation.
Simon Pasquier [Wed, 21 Aug 2013 09:52:27 +0000 (11:52 +0200)]
Add VPCZoneIdentifier attribute for autoscaling
For now, only one subnet can be specified in the launch configuration because
Neutron doesn't have the ability to map subnets with availability zones.
See bug #1096017 for details.
Liang Chen [Tue, 27 Aug 2013 05:05:05 +0000 (13:05 +0800)]
Make logical_resource_id renaming backward compatible
The rename of logical_resource_id to resource_name changed the
return value of resource and event API. Adding a redundant
logical_resource_id back to make the change backward compatible.
YangLei [Tue, 27 Aug 2013 04:27:17 +0000 (12:27 +0800)]
Add the missing heat.po files into heat
There is only one file "heat.pot" in heat/locale/.
We need to add the missing heat.po files.
I updated "heat.pot" file and added the supported languages
(Take glance po files as reference).
The added files are used for
setting up the structure of directory.
The po file doesn't have any translated strings.
Angus Salkeld [Tue, 27 Aug 2013 00:26:53 +0000 (10:26 +1000)]
Add the api config opts in groups to deal with the single heat.conf
So first off, I also don't like the replicating of the api_opts in wsgi.py
but if I don't do that the sample generator doesn't work:(
We add the wsgi options into a group for each of the api servers with
the deprecated group of "DEFAULT" so it still deals with the flat layout.
The behaviour is as follows (assuming heat-api):
1) if you have both (/etc/heat/{heat.conf, heat-api.conf}
the value in heat-api.conf wins over heat.conf
2) if you have just one of the config files but a value in both the
[DEFAULT] section and the [heat-api] section then the value in heat-api
wins.
Zane Bitter [Mon, 26 Aug 2013 19:11:59 +0000 (21:11 +0200)]
Add a DB API to swap two resources between stacks
When rolling back a stack update, we will need to swap the current and
previous (backup) resources so that the former moves to the backup stack
while the latter returns to the current stack. This API allows us to effect
the switch using a database transaction (thus avoiding having to create a
*third* stack).
Zane Bitter [Mon, 26 Aug 2013 19:11:59 +0000 (21:11 +0200)]
Add a "rollback" parameter to StackUpdate
We can only consider restoring backup resources during a rollback
operation. If they are present during a standard update, there is no way of
testing whether or not they match the new template definition, so we need
to treat them differently in this case.
Zane Bitter [Mon, 26 Aug 2013 19:11:58 +0000 (21:11 +0200)]
Always resolve properties against the current stack
During an update, resources can get moved around between stacks. Ensure
that the properties are always resolved against whatever the current stack
is, without needing to replace self.properties.
Liang Chen [Sun, 18 Aug 2013 12:48:49 +0000 (20:48 +0800)]
Remove the rest references to exception.py
Remove the rest references to Oslo exception.py in Heat code base, so that Oslo
maintainer can go ahead and remove the openstack/common/exception.py file.
Thomas Herve [Mon, 26 Aug 2013 12:46:49 +0000 (14:46 +0200)]
Support native naming in InstanceGroup
The branch adds support for the native neutron load balancer resource in
in InstanceGroup. It also raises an error if a non load balancer
resource is passed.
Tim Smith [Sun, 25 Aug 2013 01:07:23 +0000 (18:07 -0700)]
Autoload Nova extensions
This patch adds logic to autoload standard novaclient extensions
(e.g. baremetal) and any third-party extensions that might
be installed. Thus, resource plugins that make use of
installed extensions are able to use the standard OpenStackClients
rather than have to a) subclass and override OpenStackClients
or b) create a shadow nova client within the resource plugin
with the desired extension loaded.
Liang Chen [Thu, 22 Aug 2013 05:42:18 +0000 (13:42 +0800)]
Allow in-place update of nested stack
Not raising UpdateReplace exception anymore for nested stack update.
Instead, propagating the update request to the nested stack, so that
the nested stack itself will decide the best way to handle the update
request for every of its resources.
Liang Chen [Thu, 22 Aug 2013 05:41:52 +0000 (13:41 +0800)]
Enhance StackResource update for more use cases
Enhance StackResource.update_with_template to accommodate more
possible use cases. This will take care of the nested stack update
failure by raising an exception in such case, so the the concrete
nested stack resource implementations will have a chance to take
some actions upon nested stack update failure.
Zane Bitter [Fri, 23 Aug 2013 23:05:47 +0000 (01:05 +0200)]
Add a method of creating a backup stack in the DB
This is a temporary storage place for resources that are going to be
deleted once their replacements are created. They must be moved out of
the stack in order to avoid conflicting with the replacement resource.
Liang Chen [Thu, 8 Aug 2013 10:11:48 +0000 (18:11 +0800)]
Evaluate lazy translation in exception __str__
The OpenStackException.__str__ method returns
self._error_string which is actually a gettextutil.Message
object not a str.
str(o) will check the return type of o.__str__() and raise
TypeError if __str__ returns non-string object.
The fix will not go into oslo as OpenStackException is
about to be deprecated. And this patch is also the first
step to remove all the references to oslo exception.py.
Zane Bitter [Fri, 23 Aug 2013 13:56:41 +0000 (15:56 +0200)]
Allow a Provider with a known facade its own schema
Allow a TemplateResource behind the facade of a known plugin to supply a
different schema to the facade resource. However, check during validation
that the two are basically compatible. The provider template must:
- Define parameters for all *required* properties of the facade.
- Define parameters that map to the same types as the facade properties.
- Not have *required* parameters that do not exist in the facade.
- Define outputs for all attributes of the facade.
Steven Hardy [Fri, 23 Aug 2013 12:26:35 +0000 (13:26 +0100)]
Only create user_creds row on initial stack store
We should only store the credentials on inital stack store,
otherwise we end up creating orphan user_creds rows every
time the stack status is updated.