Commit Graph

22 Commits (cb80df4f4ab0e8de16d53c7fddff7c44dedd3f94)

Author SHA1 Message Date
liyi 8f10215ffd Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.


Change-Id: Ieec8028305099422e1b0f8fc84bc90c9ca6c694f
2017-03-25 17:11:50 +08:00
Thomas Herve 84067dba88 Remove db.api wrapper
The db.api module provides a useless indirection to the only
implementation we ever had, sqlalchemy. Let's use that directly instead
of the wrapper.

Change-Id: I80353cfed801b95571523515fd3228eae45c96ae
2016-12-13 09:40:29 +01:00
Steve Baker 3ab0ede98c Always eager load the raw_template for a stack
The vast majority of stack fetches are immediately followed by a
raw_template fetch, so this change always eagerly fetches the
raw_template for every stack fetch.

During stack versioned object creation the stack's raw_template object
is used to construct the versioned raw template object.

Change-Id: I1a6fb8fb7d069b50dd5d623c989acd5582818ae1
Related-Bug: #1479723
Related-Bug: #1523748
2016-08-15 22:17:30 +00:00
Jenkins ed6f61da1a Merge "De-duplicate raw_template.files" 2016-05-26 03:16:18 +00:00
Crag Wolfe fef94d0d73 De-duplicate raw_template.files
Save space in the db by allowing templates (especially nested
templates) to reference the same template files dictionary objects,
now stored in the table raw_template_files. Also, cache template files
per heat-engine process as a RAM/performance optimization.

Also, begin to allow for future rolling upgrades with

Change-Id: I1842ea6ba6773a135b1007b793a5f0884417747d
Closes-Bug: 1570983
2016-05-25 15:27:27 -04:00
Jason Dunsmore 0fb2e0f43f Make parameter decryption more robust
Two bugs (#1572294 and #1521925) were reported where the "too many
values to unpack" exception was encountered. In both cases, certain
Heat functionality was broken.

Try to recover from this exception if it is encountered. If another
special case was missed, a warning will be logged so that the bug will
be seen and fixed.

Change-Id: I2cc0b262a89b95ba95945bd846171ba5270b802b
2016-05-02 14:46:02 -05:00
Grzegorz Grasza dfdbc99d8f Add OBJ_PROJECT_NAMESPACE for Heat project
This code will be used when objects are registered and serialized.

Change-Id: I9d9095bc40e61a104ebea5042f4eb75d16d27d69
Partial-Bug: 1491258
2016-01-22 21:53:51 +00:00
huangtianhua 2fe6deee9b Make sure update successful if there is encrypt param
Don't append the param in env.encrypted_param_names again
when encrypt hidden paramters, otherwise an error will raise
when get template from db-object before decrypting.

Closes-Bug: #1521925
Change-Id: I4bdaa3391863cd18a451da4eee0cb9314c0057c5
2015-12-04 09:13:54 +00:00
Peter Razumovsky 9176a36f10 Fix [H405] pep rule in heat/objects
Implements bp docstring-improvements

Change-Id: I4038f6695e4d4e9aae2cc6ac9b8830fccd9bfa53
2015-10-08 15:13:52 +03:00
Thomas Herve f3bd4fa466 Add a new crypt method using cryptography
This updates the default crypt method to use the cryptography module
instead of the oslo crypto utils module. It also refactors decrypt to
remove some duplication.

This new patch fixes an issue with small keys.

Change-Id: I3ef166d15306693f0589903785102a359834c307
Closes-Bug: #1468025
2015-07-07 10:06:47 +02:00
Thomas Herve 9cba80c091 Revert "Add a new crypt method using cryptography"
This reverts commit d8f3ef910c.

Change-Id: I76dc18baa0d71b1819b765c6ee5840bd7e2ef59d
Related-Bug: #1471150
2015-07-03 09:00:08 +00:00
Thomas Herve d8f3ef910c Add a new crypt method using cryptography
This updates the default crypt method to use the cryptography module
instead of the oslo crypto utils module. It also refactors decrypt to
remove some duplication.

Change-Id: Ie24aebcb3080725c250a4f3ba726b23a9c995965
Closes-Bug: #1468025
2015-07-02 09:42:06 +02:00
Angus Salkeld bbe08b18eb Make the objects behave more consistently
1. don't return DB models from the objects API
   (only return Objects)
2. delete shouldn't return anything
3. update_and_save should return the refreshed object.

Note: there is still some inconsistency in what is returned by
update_by_id() some return an object and some return a bool.

Related-bug: #1432936
Change-Id: I1a0a38773d4fc4a62af5e0a98076396f39187b6c
2015-06-19 11:42:04 +10:00
Jenkins 25cff7933d Merge "Remove predecessor column from raw_template." 2015-06-16 09:53:58 +00:00
Jenkins 79c86def56 Merge "Check that env is not None before decrypting" 2015-06-12 04:16:51 +00:00
Jason Dunsmore b6f865fa00 Check that env is not None before decrypting
After database migration 056, it became possible to have an environment
of None.  Check that env is not None before looking inside it.

Change-Id: Ic498e8e630608886178df83d1e7a503525834573
Closes-Bug: #1464379
2015-06-11 15:12:27 -05:00
Anant Patil 9c64482eb5 Remove predecessor column from raw_template.
This column is never used. The logic to retrieve the previous template
for rollback is based on stack table's prev_template_id.

Change-Id: Ib0af21502d0cc94613b3963d6ccdeffbc8103f6b
2015-06-11 14:36:11 +05:30
Jason Dunsmore e45eca4dc5 Copy environment before decrypting
This is to prevent the decrypted values from being written to the

Change-Id: Iab8d4d737e3fd839a12d8782367ff0b731f93fe7
Closes-Bug: #1463929
Co-Authored-By: Thomas Herve <>
2015-06-10 15:19:45 -05:00
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

Implements blueprint convergence-check-workflow

Change-Id: I67cfdc452ba406198c96afba57aa4e756408105d
2015-06-02 00:52:36 +05:30
Jason Dunsmore 22e4a84cf2 Check for encrypted_param_names key in environment
If unencrypted data exists in the database, there will be no
'encrypted_param_names' key in the environment.  Check for this key
before referencing it.

Change-Id: Ie8c593818a64d150e815487e1449a52173f1ab5d
Closes-Bug: #1456700
2015-05-19 14:50:55 -05:00
Vijendar Komalla 1b451c2be1 Encrypt Heat template hidden parameters
1. Add a configuration option to enable/disable template parameters
2. Encrypt hidden parameters before storing them in the database and
   decrypt on stack load.

Change-Id: Ie46c6a149f414f655600616da8deee463e55671c
Implements: blueprint encrypt-hidden-parameters
Co-Authored-By: Jason Dunsmore <>
2015-05-12 10:50:49 -05:00
Michal Jastrzebski dea0897f45 First objects - stack and raw template
Implementation of oslo.versionedobjects.
This commit consists basic mechanism and first objects.
This should be base of implementation versoning to other objects

Implements: blueprint versioned-objects

Co-Authored-By: ShaoHe Feng <>
Co-Authored-By: Grzegorz Grasza <>

Change-Id: I554162cf3681fe559c75f54c61c6f32c91f5c2f8
2015-03-11 13:56:38 +01:00