Commit Graph

150 Commits (ee7ad5f106191323e04a7b861de385c8ee4bfdca)

Author SHA1 Message Date
Jenkins 7ebef029c6 Merge "Include support status in resource schema" 8 years ago
Sirushti Murugesan 252ce059c7 Convergence: Check-Resource skeleton
Currently, the patch does the following:

Kicks off workflow from stack.update_or_create:
  Once the dependency graph is calculated, the leaves
  of the graph are all casted into the RPC worker bus.

Worker RPC check_resource worfklow:
  Workers will then start working on each resource
  individually. Once a resource operation is finished,
  sync points are used to check if the parent resource
  can be worked on. Resources that finish early will
  wait for their siblings to finish. The sibling that
  finishes last will trigger the creation/updation/deletion
  of it's parent. This process then goes on for all nodes
  until the roots of the graph are processed.

Marks stack as complete when roots have finished.
  Once the roots of the graph are successfully processed,
  the previous raw template which was needed for rollback
  in case something went wrong will now be deleted from the
  database. The stack is then marked as complete.

Largely follows the convergence prototype code in
github.com/zaneb/heat-convergence-prototype/blob/resumable/converge/converger.py

Implements blueprint convergence-check-workflow

Change-Id: I67cfdc452ba406198c96afba57aa4e756408105d
8 years ago
Miguel Grinberg bcf6073250 Include support status in resource schema
This change adds support status information to the resource schema
returned by the /resource_types/{resource_name} endpoint.

Change-Id: I1d030544630bcaed06aa6fa60ea2554861033384
Closes-Bug: #1459486
8 years ago
Limor Stotland 0b2b2e8d1a Expose create time in stack resource list:
* This will help with identified when the stack resource was created and when it was updated

   * Unity with the output of stack list

Change-Id: I48bc387ea7e5855fc37d94c0fee12496692a21c1
8 years ago
huangtianhua b44df7a1db Support to generate hot template based on resource type
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
8 years ago
Jason Dunsmore 3c30bf8727 Add ability to filter stacks by tag
blueprint stack-tags

Change-Id: I4b5bc741fc271cb08ec588ae962573c59286dae5
8 years ago
Angus Salkeld edf86aeac2 Persist parent_resource_name and make sure it's available
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
8 years ago
Jason Dunsmore 8a40be3bf6 Add a "show_hidden" parameter to stack-list API
Passing "show_hidden=True" will result in hidden stacks being shown in
the stack listing.

blueprint stack-tags

Change-Id: I3074282131443c8e3894f9ce9e363a4438f5a11e
8 years ago
Jason Dunsmore d4361580ba Add ability to hide stacks based on tag
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
8 years ago
Jason Dunsmore 9817ed77ef Database API and engine changes for stack tags
Allow tagging of stacks with simple string tags.

blueprint stack-tags

Change-Id: I65e1e8e87515595edae332c2ff7e0e82ded409ce
8 years ago
Sirushti Murugesan 8e5c35d897 Remove return for rpc casts in rpc worker client
RPC casts never return anything, only RPC calls do,
so remove the misleading return in the worker client.

Change-Id: I82e2ead0b350be42f808f6cb6b9b57b786aeadcf
8 years ago
Angus Salkeld f19c54dd9a Fix the topic and server that the listener client uses
This was only working for one heat engine as it was sending
the listener messages to a topic of "engine_id".

Change-Id: Ib542d1ebb85b004f5a67213e678882c5a723dc0e
Closes-bug: 1433821
8 years ago
tengqm 69cee431cb Enforce integer API parameter checking
This patch is adding more checking to integer type parameters at the API
layer. It also adds a missing test case for the 'limit' parameter used in
event indexing.

Change-Id: If4588c9b9ded38db99b8727a1cfb5c88d6fa18de
8 years ago
tengqm 157a11550f Utility function for int param checking
This patch adds a utility function for checking the int type parameters
passed to the API layer. A test case is included for this utility
function. To exemplify how to use it, the events controller is revised
to make use of this function. The plan is to add this checking to all
int type parameters at API layer.

Change-Id: If4a1e2e5e7adbc272e2cfa5b1918cdf733926013
8 years ago
Jenkins 3dcfb64244 Merge "Tweaking 'global_tenant' parameter parsing" 8 years ago
tengqm 8eff538a09 Tweaking 'global_tenant' parameter parsing
This patch attempts to make the parsing of 'global_tenant' parameter
align with other parameter parsing, i.e. use param_utils module.

Change-Id: I368b8ced32f0204e5d0f170c8565d6b328d53325
8 years ago
Steve Baker ea349ea48b Move deployment handle_signal to rpc call
This allows deployments which haven't been created by a heat
resource to be signalled, which is required for
blueprint software-config-trigger.

This was reverted due to tripleo regression bug #1423126.
Calling timeutils.normalize_time before saving the date should
prevent the database error which caused the regression.

Partial-Blueprint: software-config-trigger

Change-Id: I6038090ef1e9aff5908dd21e08ba403748f10424
8 years ago
Kanagaraj Manickam cb66169200 Convergence message bus
Provides the convergence message bus for heat-engine.

Implements: blueprint convergence-message-bus

Change-Id: I19b9edc9f17c881b542926783c8918e536d12ec5
8 years ago
Derek Higgins b387a9f27a Revert "Move deployment handle_signal to rpc call"
This reverts commit a63f634bfb.

This commit caused a regression in tripleo-ci whith a database
"Incorrect datetime value" error.

Change-Id: I55f9be8ffb319edb56371d8d370d58d02bdf3867
Closes-Bug: #1423126
8 years ago
Steve Baker a63f634bfb Move deployment handle_signal to rpc call
This allows deployments which haven't been created by a heat
resource to be signalled, which is required for
Partial-Blueprint: software-config-trigger

Change-Id: Icbf5966426482121ceb726582c85cb88d0200b12
8 years ago
Steve Baker 66bc4953c3 Manage deployment updated_at values
This adds an updated_at argument for RPC calls to
update_software_deployment, which will be useful for
Partial-Blueprint: software-config-trigger

Change-Id: I2c00a68e13c7d96b3d63ccbd34c27986a6bccfc9
8 years ago
Steve Baker 32f6e8fd5c Expose deployment/config updated_at/created_at
This is useful information for the user, and is also useful to
expose to support blueprint software-config-trigger.

DocImpact

Change-Id: I7ba58f83793fe993b5791cb2011afb9e81462df6
8 years ago
Kanagaraj Manickam 65134b8d99 heat-manage service list
Adds required REST API, Db model and engine service
changes for reporting the heat engine service status.

Change-Id: I3ef29c1efd2015d62eec1033ed3a8c9f42e7a6e2
Implements: blueprint heat-manage-service-list
"DocImpact"
8 years ago
Steve Baker 007ce91c55 Expose stack_user_project_id in stack-show
stack_user_project_id is currently never exposed by heat, so the user
has no way of discovering what it is.

This has a couple of implications:
- The user can't call the REST API create_software_deployment unless
  they know the stack_user_project_id of the stack that the server
  resource belongs to
- user can't do manual cleanup of stack_user_project_id when necessary

This change adds stack_user_project_id to the formatted output of
the stack-show REST API call.

Change-Id: I0a2d337401c164eb58dbce63e01f68f98f8d467e
Closes-Bug: #1413398
8 years ago
tengqm 37ef669705 Enable resource signals be handled asynchronously
This is an attempt to fix bug #1394095 which reported that alarm_url can
be signaled only in a blocked way. The reason is that the resource_signal
API was a synchronous call. To avoid breakng CFN/OpenStack WaitCondition
behavior, a new 'sync_call' argument is added which default to False.

A not-so-related fix to test_engine_service.py (L2161-2163) was included
in this patch because without that fix, I was not able to pass the test
cases. It was so trivial, so I don't think it deserves a separate patch.

Closes-Bug: 1394095
Change-Id: I45e094630ef01b34d09248dbac17ac477933ef53
8 years ago
Jenkins ce5bee0b8d Merge "Expose resource attributes in the API" 9 years ago
Jenkins cbc351e354 Merge "Add stack_user_project_id to _create_stack RPC interface" 9 years ago
Anderson Mesquita e9c24bbd85 Expose resource attributes in the API
This adds the necessary API changes to allow the user to view
resource's attributes when making calls to resource show.

Implements: blueprint detailed-resource-show
Change-Id: Id203478dbd067743d36623e99332ac32c6f96d42
9 years ago
Steven Hardy 0c6bff0e73 Add stack_user_project_id to _create_stack RPC interface
Adds the ability to pass the parent stack_user_project_id into nested stacks
when creating them via RPC, so we can maintain the recently introduced
behavior where the parent stack user project is inherited by nested
stacks.

Change-Id: I425e80cfc8f9c646ade7d47f202744103142ab55
blueprint: decouple-nested
9 years ago
huangtianhua c26201c856 Show the creation time for stack snapshots
Creation time for snapshots is an important attribute,
we should return the creation time when doing stack
snapshot actions.

Change-Id: Ieaedaf79bf073737ec41fba2d0252d3f4ddc0fcf
Closes-Bug: #1398307
9 years ago
Jason Dunsmore f0cbd93447 Always import heat.rpc.api as rpc_api
heat.rpc.api was being imported as rpc_api in some modules and engine_api
in other modules.  Always import heat.rpc.api as rpc_api for consistency.

Change-Id: Ic84ca7fbac7a95eace7f2019c08ee20fa1bc8e5e
9 years ago
Jenkins 8a53304178 Merge "Handle remote thrown NotFound RPC exceptions" 9 years ago
Jenkins 5d985a46d5 Merge "Add user_creds_id to _create_stack RPC interface" 9 years ago
Steve Baker 9822e483ca Handle remote thrown NotFound RPC exceptions
This is a short-term fix for a regression caused by
If81b68717bd2f9d9be1291c07b18626493c9b5cc which results in undeletable
config and deployment resource if the underlying config or deployment
no longer exists.

Longer term there will be a ClientPlugin for making heat RPC calls
which wraps the remote exceptions and raises the original type.

The EngineClient methods local_error_name and ignore_error_named
will still be useful when this ClientPlugin exists, they just won't
be called directly from resources.

Change-Id: I8407e04c0404dd6560273d7d74744b5bb7774520
9 years ago
Jenkins bd243e8e64 Merge "Add snapshot restore HTTP API" 9 years ago
Thomas Herve e16036cd2d Add snapshot restore HTTP API
This adds the external HTTP API and the RPC methods to invoke stack
restore.

blueprint stack-snapshot
Co-Authored-By: ala.rezmerita@cloudwatt.com

Change-Id: Id1ec0c11c9f12c23b3eec12a853db6ee4ff90277
9 years ago
Steven Hardy 076a86e343 Add user_creds_id to _create_stack RPC interface
Adds the ability to pass the parent user_creds_id into nested stacks
when creating them via RPC, so we can maintain the current behavior
in StackResource, where the parent user_creds record is used by all
nested stacks.

Change-Id: Ifed93860db68a7d23b0c05bd9ec83619e109e386
blueprint: decouple-nested
9 years ago
Steven Hardy f939762fad Add nested_depth to internal _create_stack RPC interface
Adds a nested_depth parameter, which can be used to set the correct
nested_depth value when creating nested stack via RPC calls between
engines.

Change-Id: I71538a4297168a08a1aaaf3d23f42f3878f6cf0e
blueprint: decouple-nested
9 years ago
Ton Ngo b8ba69e05f Pass list of parameters to engine service to reset
For stack-update, a new argument named clear-parameters with
a list is passed in from the CLI and the new PATCH ReST API
to delete the indicated parameters from the existing parameters
in the DB, allowing the default parameters in the template to
be used.  A new method in environment handles the reset.

Partially-implements: blueprint troubleshooting-low-level-control
Partial-Bug: 1224828
Change-Id: Ia1270b679f27e264e6977c590d676b947c74c5da
9 years ago
Ton Ngo b98c19fbbf Pass flag to engine service to patch parameters
For stack-update, add a new PATCH ReST API and a new CLI
argument named existing-parameters to indicate that the set
of parameters should be patched over the existing parameter
from the DB.  A new method in environment handles
the patching.

Partially-implements: blueprint troubleshooting-low-level-control
Partial-Bug: 1224828
Change-Id: I802e0dca44926be3a3f45fcaa995c866a4abf998
9 years ago
Pavlo Shchelokovskyy a75f055caf Add RPC API for cancel update stack
Implements cancelling of stack update in progress, for any stack
regardless of disable_rollback status.

As a side-effect, a framework for sending arbitrary one-time signals from
outside into a task running as greenthread is added. ThreadgroupManager
holds references of greenlet events associated with a given stack now.

Implements blueprint cancel-update-stack (partial)

Change-Id: Ic929d42946cf28eeb2a7caea8bf908f492693c09
9 years ago
Jenkins aeb2b40fb1 Merge "Add "parent" key to list stacks output" 9 years ago
Jenkins 40d139e68b Merge "Add show_nested to count_stacks RPC interface" 9 years ago
Jenkins a7678807d8 Merge "Add show_nested to list_stacks RPC interface" 9 years ago
Miguel Grinberg 146a154b79 boolean parameter type is not recognized in the API
The boolean type that was added to Heat templates is not recognized
in the API layer. Because of this, the API passes the schema type
(which is lowercase 'boolean') directly to the client, while all
other recognized types are passed with camel case.

Change-Id: I0d31401456c0f5cd0bb81e29323e40b4de66f331
Closes-Bug: 1361448
9 years ago
Steven Hardy f6561ae15d Add "parent" key to list stacks output
Pass back the stack owner_id (parent stack ID) via the RPC API, then
expose it via the "parent" key when listing stacks.  This will be
None for all top-level (non nested) stacks, so can be ignored when
show_nested is not passed.

blueprint: list-nested
Change-Id: I5ad7f867bc7eb138bf2d7d17b4a3bf810d341393
9 years ago
Steven Hardy 0581a2447a Add show_nested to count_stacks RPC interface
blueprint: list-nested
Change-Id: I60c25a34009028d45d73a10fe372abdf28ef043f
9 years ago
Steven Hardy b4fb37e16b Add show_nested to list_stacks RPC interface
Add a show_nested argument, defaulted to False

blueprint: list-nested
Change-Id: I3468325b3b383bf671391989d91ed384ea158472
9 years ago
Thomas Herve f72555db75 Implement snapshot listing
Add a new HTTP API to list a stack snapshots, along with the new method.

blueprint stack-snapshot
Co-Authored-By: ala.rezmerita@cloudwatt.com

Change-Id: I59eb7e035c19d2734c89a79848dec35f4468a1a0
9 years ago
Steven Hardy f899548500 Add owner_id to new _create_stack RPC interface
Adds a new "internal" _create_stack RPC call, which exposes a superset
of the existing RPC interfaces, intended only for engine-to-engine
usage, not for exposure via the user-facing API's (hence the prefix)

This patch exposes "owner_id" via the new call, which enables creation
of nested stacks via an RPC call, instead of creating the stack directly.

Change-Id: I355c608e657cb9dae2d2b38658b0b247040de6b9
blueprint: decouple-nested
9 years ago