Add action_wait_secs for TestResource in api tests, so
that consecutive updates would have different updated_time.
Change-Id: I08d2ac6625acaa0828b18b5e805c81031bb87c01
Related-Bug: #1721692
if `lock != self.LOCK_NONE` is true here then
`self._calling_engine_id is None` will alway be true.
Change-Id: I9a9158c4b135f0890807f63784468c069d320c52
Check that the patch update has actually run and that we're not simply
looking at the UPDATE_COMPLETE status from the previous test, otherwise
the outputs may not have been updated before we run the next test.
Change-Id: Ia45a303e74e19e7d1887c4e242a8ee5655208e59
Closes-Bug: #1721692
Add a "convergence_engine_enabled" configuration option to the functional
tests' Tempest plugin. The option is enabled by default, but can be
disabled by setting the DISABLE_CONVERGENCE environment variable to "true"
when running prepare_test_env.sh, so that if convergence is disabled in
devstack it will also be disabled in Tempest.
This will allow us to write functional tests for convergence-specific (or
non-convergence-specific) behaviours.
Change-Id: If3a37de75467d50af10582215e16611e59a4ad06
https://review.openstack.org/#/c/508021 fixed it
to work in uwsgi mode but did broke it to work with
ipv6 as it contains ':' as part of the host.
This patch fixes how the URL is parsed in order to
work properly with ipv6.
Change-Id: I3965ee83e1f743e25cbdcbbec516be0ed6a30afc
Closes-Bug: #1721045
The node key in the convergence graph is a (resource id, update/!cleanup)
tuple. Sometimes it would be convenient to access the members by name, so
convert to a namedtuple.
Change-Id: Id8c159b0137df091e96f1f8d2312395d4a5664ee
The gate has started failing due to interface detaches timing out.
Examining the logs, it looks like Nova's interface detach retry takes about
6s to run one attempt. Heat, on the other hand, does 10 retries at 0.5s
intervals. So if Nova has to retry then Heat will fail.
Increase Heat's polling interval to make it more likely that if Nova
succeeds, Heat will see it.
Change-Id: Ie74980a3f806b8c17e4e494ae979725b0078f135
Closes-Bug: #1585858
TemplateResource is unique in that it can return a custom reference ID
defined as an output in the nested template. This was being fetched by the
StackResource.get_output() method, which also has the effect of retrieving
*all* of the outputs of the nested stack and caching them in memory in case
something else were to reference any of them.
Unfortunately when calculating the resource data for a stack (which we
must always do when e.g. showing the outputs), we always include the
reference IDs of all resources, regardless of whether they are referenced
by get_resource in the data we are looking to populate. (In fact, we have
no way from the Template API to distinguish where get_resource is used on
a particular resource, only where there are dependencies on it.) This is no
problem under the assumption that getting the reference ID is quick, but
that assumption does not hold for TemplateResource.
The show_output RPC call only retrieves a single output (as opposed to
show_stack, used in StackResource.get_output(), which calculates all of
them). Fall back to that call in TemplateResource.get_reference_id() if the
outputs are not already cached to avoid unnecessary overhead in the common
case.
Attribute values are now always fetched before the reference ID, so that we
won't end up making two RPC calls in the case where we also need to read
other outputs.
Change-Id: I66da13c0bb024749de4ae3f0c4b06ebb485cee37
Closes-Bug: #1719333
This RPC call only generates a list of the outputs defined in the template,
not their values, so don't load the resource data needed to calculate the
output values (which can be very slow).
Also, explicitly pass resolve_value=False instead of relying on the default
argument (which is different for format_stack_output() and
format_stack_outputs()), to reduce future confusion.
Change-Id: I79aae94b6552d465db6707cd4a40cd53ff18455b
Closes-Bug: #1719340
When we show a stack including the outputs, we calculate all of the
resource attributes that are referenced anywhere in the stack. In
convergence, these are either already cached (and therefore fast) or need
to be cached (and therefore the initial slowness will pay off in future).
This isn't the case in the legacy path though, since we are not doing
caching of attributes in the database in that path. So this is
unnecessarily calculating all of the referenced attribute values, which are
potentially very slow to get.
For legacy stacks, only calculate the attribute values needed to show the
outputs.
Change-Id: I35800c7f87b58daf05cbabd05bcbcd75d0c0fadb
Partial-Bug: #1719333
Add `attributes_schema` and `_resolve_attribute` for
OS::Keystone::Project. This patch allow get_attr works
with OS::Keystone::Project resource.
Partial-Bug: #1648004
Change-Id: Ia561aa44e6939a0488207d60af8d7efdbca05f36
We get the 'watch' server url by translating the
'cfn' server url if the 'watch' server url is not
configurated, but in uwsgi mode, the code logic is
incorrect, this patch changes the logic to make sure
that we can get the watch server url in both modes.
Change-Id: Iebf2480f97c11474412d74726eba9cf5c8ed2193
Closes-Bug: #1716815
When generating the node_data() for a resource, catch and store any
exceptions (other than InvalidTemplateAttribute) encountered while
getting attributes. Re-raise the exception at the point where we try to
read the attribute value, including where we try to serialise the
NodeData object to store in the database.
In convergence, we generate and immediately serialise the NodeData, so
this should result in no substantial change in behaviour there.
In other situations (e.g. when we're just loading the data to show the
stack), this prevents an error in attribute calculation from aborting
the whole operation. The exception will still be raised if (and only if)
the erroneous attribute is accessed, but may be handled more
appropriately. For example, errors in calculating output values are
handled by reporting an error only for that particular output.
Change-Id: Idc97aee87405cc13e83be3373078b52e725850ea
Co-Authored-By: Zane Bitter <zbitter@redhat.com>
Closes-Bug: #1712280
The 5.32.0 release of oslo_messaging included the following change to the
Fake driver:
https://git.openstack.org/cgit/openstack/oslo.messaging/commit/?id=d1dac1c11d357aa8391de7e62f4d003eb820948d
Which means that FakeExchanges are now shared between all
FakeExchangeManager instances. This broke the unit tests in Heat.
This patch effectively reverts the change in oslo_messaging by isolating
FakeExchanges to individual FakeExchangeManger instances once more.
Change-Id: I6c53f477b17247958be7bd6056136bc9f7f50865
Closes-Bug: #1718780
In order to make it simpler to use the default
configuration files when deploying services
from source, the files are added to pbr's
data_files section so that the files are
included in the built wheels and therefore
deployed with the code. Packaging and deployment
tools can then more easily use the default files
if they wish to.
This pattern is already established with similar
files for neutron, designate and glance as has
been mentioned in the related bug report.
Change-Id: I1f3c9b2e27d44f28f0e649e2c96a1c3dc1da9ea6
Closes-Bug: #1718356
This method is approaching the complexity limits in the pep8 gate, so
refactor it to allow us to continue making changes.
Change-Id: Ifdb500df121e60431023c43ff0633b790c4052fe