This has been deprecated for years and is incompatible with deploying
multiple heat-engine processes. Let's at least not turn it on by default.
Change-Id: Iabddbd65be9000a30a5714b26658ea6acea0e103
Rename the StructuredDeployments resource to StructuredDeploymentGroup
to avoid awkward situations when talking about the plural form of the
StructuredDeployment resource. This has been agreed at the Vancouver
summit.
The existing 'StructuredDeployments' resource is kept for backwards
compatibility, but with a deprecated status and corresponding
deprecation message.
Closes-Bug: #1458008
Change-Id: I5d274acf17f222c493d10ded50f87e05a075b424
Rename the SoftwareDeployments resource to SoftwareDeploymentGroup to
avoid awkward situations when talking about the plural form of the
SoftwareDeployment resource. This has been agreed at the Vancouver
summit.
The existing 'SoftwareDeployments' resource is kept for backwards
compatibility, but with a deprecated status and corresponding
deprecation message.
Change-Id: Iae38b4afcb924ba626eccadfd68712e708be2bff
Partial-Bug: #1458008
This is the only thread that gets started without an explicit reference to
the stack. This prevents us from using a weakref in the resource, as it
will cause the Stack's reference count to hit 0 before the thread is run.
Now we explicitly pass a reference to the stack.
Change-Id: Ie51be7b54d97ef184e401e395a7e7e3a26ce003b
Related-Bug: #1454873
Use unittest2.assertWarnsRegex() for making sure we generate the
required warnings.
Use WarningsCapture to not print the other repeated warns to the
console.
Change-Id: I7223f8956394208eaf2eb8a1d651ba1425128bc9
This patch separates out test cases related to stack create and
validation. The patch also replaced the existing mox calls with mock
calls.
Change-Id: I346e11d05c6e28fd178f16556e5528b47b39f47c
Add data type for the attributes. This will help
1) validating the attibute against its type
2) resource-schema api will show the attribute type
3) template authors will know what type of value to
expect making indexing and mapping easier
4) generating docs for the attribute type
Implements: blueprint add-type-in-attributes-schema
Change-Id: Ifc92c57ec1ddd2ab5f810587a1d33e762308dd8a
This patch separates out test cases related to software_config and
software_deployments into a standalone module. The patch also replaces a
few mox calls by mock calls.
Change-Id: Ie2ed122dda16e1cbf8036044d3476e2b328f8796
When generating the dependencies, the deletion order is already taken
care, hence we need not reverse the graph.
Change-Id: Iff158443f2281a07e3a136a4cf6f77f7be592d3f
Generates the graph for traversal in convergence.
* Updates current traversal for the stack
* Deletes any sync_point entries of previous traversal
* Generates the graph for traversal based on
- resources loaded from db for the stack
- resources that exist in present template
* Stores resource.current_template_id and resource.requires
* Stores the edges of graph in stack.current_deps
* Creates sync_points for each node in graph
* Creates sync_point for stack.
blueprint convergence-prepare-traversal
Change-Id: I507e67b39c820ed46d3b269fc76d6cf18d0ef2d7
Currently, the event-list output is very resource-centric, despite
being scoped to the stack from an API path perspective.
This, combined with the fact that the stack updated_at timestamp
is only updated after a succesful update (ref bug #1193269) makes
it impossible to derive the time when an update started via any API.
This is a problem when trying to use the new hook/breakpoint API,
because it's necessary to poll for all events since the most recent
update started, disregarding any stale hook events from previous
updates (which may have failed or timed out without the hooks getting
cleared).
To work around this, add an event for each stack state transition,
such that you can detect the transition to UPDATE_IN_PROGRESS,
then use that event as a marker to get post-update-started events.
Without this (or some other way to determine when the stack update
started), the hooks pre-update functionality landed for kilo is
not really usable (particularly mechanically via scripts).
Change-Id: Idff342b3aecc2d145dfbc7c0f610ad0ca8e52c8b
Partial-Bug: #1448155
Currently heat supports to create CFN template based on
the given resource type. And this patch adds an option
to allow user to specify template type to generate(support
HOT template at the same time).
blueprint support-to-generate-hot-templates
Change-Id: I55cfb9b0f87e638350f2f6367fb399d772fff7e1
six.iterkeys() returns iterator. Using this iterator while
removing entries from dict may raise RuntimeError. So we
shouldn't use iterator in this place. Use list of `stack_id`
values instead.
For py2 we can use .keys(), but .keys() method returns `view`
in py3 and this will lead to the same error as with using
six.iterkeys(). Apply list() to the result given by .keys() to
produce the same behaviour for py2 and py3.
Also refactor tests to make sure that there are no problems
with iterators.
Co-Authored-By: Oleksii Chuprykov <ochuprykov@mirantis.com>
Change-Id: Ice43e18173b4b523d98703bca60819d0e62cfc91
Closes-Bug: #1448186
TypeError: call() takes exactly 3 arguments(5 given) is raised
during cancel stack update, this patch will fix the problem.
Change-Id: If85389150a15575d9e01466d950f8c07b8fa2717
Closes-Bug: #1448384
This patch separates out the stack snapshot test cases. It also replaces
mox tests with mock calls.
Change-Id: I437746a3b7c82ed83c6ec0b3ff7d93a79cfa79b3
This patch extracts the common functions used in engine service test
into a separate module that will be shared among sub-unit-tests.
Following patches will split the engine service tests into sub test
units.
Change-Id: I008856aa43e49bd1bd62f5e03291fa6f1f86fc2b
generate_template and resource_schema methods of service.py
raises wrong type of exceptions after catching them.
Also resource validation failure should not raise stack
validation exception.
Change-Id: I44b8d37db7d2687cee2a7b675dd062b3af3ee167
Closes-Bug: #1447194
Only acquire() function in stacklock needs to load whole stack,
other function only needs stack id. This patch only pass
stack id for stacklock so that in some place we don't need
to load whole stack.
Change-Id: Iaad5f4a871f925c4052d159a5d95184681d5bd28
Closes-Bug: #1441972
The engine service test case is too big to maintain. This patch is a
first attempt to decompose it into smaller units. Several things to
note for this patch and those following this one:
1) all engine service tests are expected to be put into the 'engine'
subdir;
2) there will duplicated code in the new unit tests, but they are
expected to be moved to a shared module eventually;
3) there could be some modifications related to switching from mox to
mock, but that may not be included in every single patch.
Change-Id: I87c18935700e68985abbdf7550cdd843fce0c053
Check the snapshot belongs to stack when deleting and showing
stack's snapshot, and restoring from snapshot.
Change-Id: I8ce170b40b05ae17669524d75f80e06e39986673
Closes-Bug: #1437602
We are persisting for a number of reasons:
- so we don't have to pass this through ever rpc call
- the API exposes parent_resource (currently always None as
it is not persisted)
Closes-bug: #1438978
Change-Id: Id2db36c0234a085ec4f0ce2ab114ec483ea29d81
Add a "hidden_stack_tags" option that contains a list of tag names.
Stacks that have one or more of these tags will be hidden.
Add an option to show hidden stacks in the stack listing.
blueprint stack-tags
Change-Id: I45a5ac6d73a9a61629a56f88270e3a97fafb378a
When stack is in status IN_PROGRESS and engine service went down,
the status of stack will forever remain in IN_PROGRESS. This patch
add a db apid to get engine_id from stacklock and try to reset the
stack status to FAILED when engine is back.
Closes-Bug: #1382320
Change-Id: Ica856bb0d56c23a4423fb9476c1986aaacf24108
Pass stack_user_project_id to updated_stack, backup_stack and
oldstack to make sure the success when deleting stack domain user.
Create a common method to get the kwargs to create a stack from
an existing stack.
Co-Authored-By: Angus Salkeld <asalkeld@mirantis.com>
Change-Id: Ieb7726ed738d5ae8046184f312379b9132b6c4a9
Closes-Bug: #1356084
When we have multiple workers the service info is incorrect.
This patch changes the logic to make a new service and
then later delete entries that are not getting updated.
Closes-bug: 1433865
Change-Id: If297049f62e614b955faaefeaaf67e2649934a0c