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
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
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
oslo.versionedobjects.
Change-Id: I1842ea6ba6773a135b1007b793a5f0884417747d
Closes-Bug: 1570983
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
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
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
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
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
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
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
This is to prevent the decrypted values from being written to the
database.
Change-Id: Iab8d4d737e3fd839a12d8782367ff0b731f93fe7
Closes-Bug: #1463929
Co-Authored-By: Thomas Herve <therve@redhat.com>
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
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
1. Add a configuration option to enable/disable template parameters
encryption.
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 <jasondunsmore@gmail.com>
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 <shaohe.feng@intel.com>
Co-Authored-By: Grzegorz Grasza <grzegorz.grasza@intel.com>
Change-Id: I554162cf3681fe559c75f54c61c6f32c91f5c2f8