Previously when calling function.validate() we passed the path to the
function in the template (used for debugging purposes) as a string. This
change allows us to pass it as a list of path components, as we do
elsewhere, so that higher-level code that catches StackValidationFailed
can deal with its components separately.
In some scenarios, it is required to categorize the parameter.
Associating tags with the parameter, it is will be easy to
categorize the parameter and add simple validations to users.
This patch introduces a new attribute 'tags' with the parameters,
which is a list of strings.
We return back the sensitive information to user
when some exceptions happened, for example,
when DBError happened, we return the whole sql
statement to user, it's not safe.
This patch changes to return the message if the
exception is the HeatException, otherwise the message
won't be revealed to user.
We already have REST api support for cancelling a
UPDATE_IN_PROGRESS stack with rollback. This adds a
new action 'cancel_without_rollback' to allow for
canceling a create/update in_progress stack without
Only add the token_info to the keystone headers if it is set.
This resolves an issue which breaks the catalog for some previous
deployments using noauth middleware (the old TripleO undercloud
In change I84d2b34d65b3ce7d8d858de106dac531aff509b7, we changed to
call self._converge_create_or_update() in a sub-thread. However,
thread_group_mgr is not set for cancel_update (with rollback),
which in turn calls converge_stack.
This also enables test_cancel_update_server_with_port, as
bug #1607714 seems to be fixed now.
If we force-cancel a resource check operation (i.e. by killing the thread)
then there was a short window where another traversal could have started
and been waiting on the not-yet-cancelled resource. That traversal would
then hang forever, as there was nothing to retrigger it. This change
ensures we retrigger the latest traversal on the resource after
Use a single transaction to create the replacement resource and set it as
the replaced_by link in the old resource. Also, ensure that no other
traversal has taken a lock on the old resource before we modify it.
If we end up bailing out and not creating a replacement or sending an RPC
message to check it, make sure we retrigger any new traversal.
Adding a if condition to format_validate_parameter function, is
failing the pep validation, because of complexity is going beyond
the 20 limit. Separating the constraints from the base makes it,
Add the ability to consume FakeKeystoneClient class as a client
module. This avoids extra dependencies on the Python mox/mox3
libraries at runtime and allows the end user to wire in the
custom class by simply making the following config setting:
keystone_backend = heat.engine.clients.os.keystone.fake_keystoneclient.FakeKeystoneClient
This use case for this is the TripleO undercloud installer which
uses a heat-all process to transform heat templates into Ansible
playbooks. Previously we leveraged a "fake_keystone" service
as multiple applications and binaries required keystone dependencies.
(Both Heat, os-collect-config, and some openstackclients wanted
a fully version of keystone running)
Now that we've streamlined these dependencies allowing heat to use
a fake KeystoneClient library shim instead of the full fake_keystone
process is much lighter and avoids the security concerns of the extra
socket. This patch allows us to do all of this without installing extra
test time dependencies on mox/mox3.
We seem to be adding an implicit interface/port for the server
irrespective of the fact that there are existing non-updated
interfaces already there.
Several tests started an RPC server (sometimes unnecessarily) and left it
running after the test had concluded. This resulted in messy logs
("Exception in thread Thread-1 (most likely raised during interpreter
shutdown)" and so on) in the console when the test worker exited. Avoid
these by either not starting the RPC server or ensuring it is stopped
before the end of the test.
A number of tests used to leave greenthreads that they had spawned running
beyond the end of the test. This fixes those tests to not start unnecessary
threads and/or to wait for all threads to complete before they finish.
If we attempt to do a convergence update on a resource and find it already
locked by another traversal, don't try to update the resource's current
template ID or requirements data. Doing so will usually fail with the same
exception, but it is unnecessary and leaves ERROR-level messages in the
log. However, there is a race which could result in the call succeeding
(i.e. if the other task releases the lock just after we fail to get it),
and that could result in the resource not being updated at all.
If a resource times out, we still need to check whether there is a new
traversal underway that we need to retrigger, otherwise the new traversal
will never complete.
The python standard library in Python 3.6.3 and earlier has a bug with
handling unhashable exceptions: https://bugs.python.org/issue28603
Although oslo_log will catch the error, make scheduler.Timeout hashable so
that all exceptions will be printable.
Prior to 640abe0c12 we just used __cmp__(),
but that isn't used in Python 3. Defining __eq__(), which is required for
the total_ordering decorator, makes the class unhashable in Python 3.