Commit Graph

45 Commits (ee7ad5f106191323e04a7b861de385c8ee4bfdca)

Author SHA1 Message Date
Jenkins 79c86def56 Merge "Check that env is not None before decrypting" 8 years ago
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
8 years ago
Jason Dunsmore e45eca4dc5 Copy environment before decrypting
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>
8 years ago
Jenkins e72aa7a23f Merge "Encrypt properties data" 8 years ago
Jenkins 00693a4e61 Merge "Convergence: Check-Resource skeleton" 8 years ago
Steve Baker be41d08a44 Count all nested stack resources with DB operations
The count is performed in 2 parts
- A function which builds a list of all nested stacks
  by recursively calling stack_get_all_by_owner_id
- A query which counts resources which belong to the list
  of stacks

Considering this will be the basis for fixing bug #1455589 then this
approach is appropriate for backporting to stable/kilo, but master would
ideally replace this soon with a new Stack attribute that stores the
calculated resource count.

Partial-Bug: #1455589

Change-Id: Ifa2e5609fd9a6853e20037e94a5e16696bb378ee
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
Jason Dunsmore 89d4206954 Encrypt properties data
Encrypt properties data before storing it in database and decrypt it
when the resource is being loaded from the database.

Change-Id: I646542b1d03296f62a83041dc2a0ca2719775289
Implements: blueprint encrypt-hidden-parameters
8 years ago
Jenkins f01499fa5b Merge "Check for encrypted_param_names key in environment" 8 years ago
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
8 years ago
Steve Baker 71a1e26140 Find root stack ID with database operations
This change adds a (currently unused) database function
stack_get_root_id to find the root stack ID for any stack.

Scheduler hints are moved to using Stack.root_stack_id() in this change.
Remaining uses of Stack.root_stack() will switch to using
Stack.root_stack_id() later in the series.

Change-Id: I9914b0df5af119edea6346db0d7c62124fbb1313
Partial-Bug: #1455589
8 years ago
Vijendar Komalla 1b451c2be1 Encrypt Heat template hidden parameters
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>
8 years ago
Sirushti Murugesan 11f835b8ef Replace dict.itervalues/dict.iteritems and use len over filter function
partial blueprint heat-python34-support

Change-Id: I2b23f068e485fd778e1d7b14d16cadb6d401163f
8 years ago
Jenkins 4e03faa7f4 Merge "Persist parent_resource_name and make sure it's available" 8 years ago
huangtianhua af6b0db444 Make sure snapshot belongs to stack for actions
Check the snapshot belongs to stack when deleting and showing
stack's snapshot, and restoring from snapshot.

Change-Id: I8ce170b40b05ae17669524d75f80e06e39986673
Closes-Bug: #1437602
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 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
Kanagaraj Manickam 39368e2f6a Cleans default declaration nullable=False from heat objects
In Heat objects, the default value of nullable attribute is
set in many of the object's fields, which is not required
as oslo object Field defines nullable as False by default

Change-Id: I0164b64c043816f624aeba19561a4a5f8d36689d
Closes-bug: #1439957
8 years ago
Ethan Lynn 6bc753582b Set stack status to FAILED when engine is down
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
8 years ago
Angus Salkeld 60fe406394 Make the status_reason field Text instead of String(255)
Change-Id: I8eaaa7bc55afff16d16bbd9d41b5522f02f83071
Closes-bug: 1434290
8 years ago
Kanagaraj Manickam 4caf36905c Versioned-object StackLock
Adds the object-version support for StackLock

Implements blueprint versioned-objects

Change-Id: I1aab01ca3ab686a81284f1e5afe05b2b5720a9ea
8 years ago
Jenkins 592da33045 Merge "Correct confusing "cls" argument on non-static method" 8 years ago
Angus Salkeld 0b25435867 Correct confusing "cls" argument on non-static method
s/cls/self

Change-Id: Ie4ac74fe4e35d8d22376f2f9fa0623b1c80d1148
8 years ago
Steve Baker 9bb663d81b Call db refresh in Stack object refresh
The current Stack object refresh doesn't actually do any refreshing,
which explains the functional test speed regression since the RPC
nested stack code relies on stack.refresh() to poll for state change.

With this change AutoScalingSignalTest.test_signal_with_policy_update
locally takes ~60s consistently. Without this change ~50% of test runs
have some form of execution delay, taking 80s -> 300s+.

Change-Id: Ie06851fd5b0d8b802ebf701e8bf621562d9b6d88
Closes-Bug: #1433555
8 years ago
Jenkins 795b4dd610 Merge "Versioned object - WatchRule and WatchData" 8 years ago
yuntongjin 4dd2a188f1 Versioned object - WatchRule and WatchData
Prototype implementation of oslo.versionedobjects.
This patch adds WatchRule and WatchData object.

Implements: blueprint versioned-objects

Co-Authored-By: ShaoHe Feng <shaohe.feng@intel.com>
Co-Authored-By: He Jie Xu <hejie.xu@intel.com>
Co-Authored-By: Grzegorz Grasza <grzegorz.grasza@intel.com>

Change-Id: I29fc0fc99c0c425291246dc3889393cbcc0b82cf
8 years ago
Jenkins c41ab27ec1 Merge "Versioned object Service" 8 years ago
Kanagaraj Manickam 7ac9e2891a Versioned-object SyncPoint
Adds versioned-object support for SyncPoint model

Implements blueprint versioned-objects
Co-Authored-by: Rakesh H S <rh-s@hp.com>

Change-Id: Iccfa7553630090f1e9bf6983519009c7d1c7d2a4
8 years ago
Sergey Kraynev 2c21d660b3 Add extra columns for resource table
This patch adds following columns for resource table:
- `needed_by` (a list of Resource keys)
- `requires` (a list of Resource keys)
- `replaces` (a single Resource key, Null by default)
- `replaced_by` (a single Resource key, Null by default)
- `current_template_id` (a single RawTemplate key)

Co-Authored-by: Angus Salkeld <asalkeld@mirantis.com>
Co-Authored-By: Qiming Teng <tengqim@cn.ibm.com>
Change-Id: I65e1032e84b40cb7ae3126fa6b63c914988cc970
Implements: blueprint convergence-resource-table
8 years ago
Jenkins ed99ce3826 Merge "StackTag versioned-object" 8 years ago
Kanagaraj Manickam cb953affdb Versioned object Service
Adds the object versioning support for Service model

Implements blueprint versioned-objects

Change-Id: I6ad22009b4a23a419ee769c2f594de1f4348b3b0
8 years ago
Jenkins a754a083a3 Merge "Versioned object - SoftwareDeployment" 8 years ago
Jenkins bf7760f548 Merge "Versioned objects - Event" 8 years ago
Jenkins af5f655324 Merge "Versioned objects - Snapshot" 8 years ago
He Jie Xu ce3d872e23 Versioned object - SoftwareDeployment
Prototype implementation of oslo.versionedobjects.
This patch adds SoftwareDeployment object.

Partially implements bp versioned-objects

Co-Authored-By: ShaoHe Feng <shaohe.feng@intel.com>
Co-Authored-By: He Jie Xu <hejie.xu@intel.com>

Change-Id: I3666a8b2552d8c0c9dcf05efd9c423ff5252f77d
8 years ago
He Jie Xu dfc3847f10 Versioned objects - Event
Prototype implementation of oslo.versionedobjects.
This patch adds Event object.

Implements: blueprint versioned-objects

Co-Authored-By: ShaoHe Feng <shaohe.feng@intel.com>
Co-Authored-By: Grzegorz Grasza <grzegorz.grasza@intel.com>

Change-Id: Ifdff1289aba4bf09130047f63d4e745d591fe16a
8 years ago
He Jie Xu 4f69bfa4d9 Versioned objects - Snapshot
Prototype implementation of oslo.versionedobjects.
This patch adds Snapshot object.

Co-Authored-By: ShaoHe Feng <shaohe.feng@intel.com>
Co-Authored-By: He Jie Xu <hejie.xu@intel.com>
Co-Authored-By: Grzegorz Grasza <grzegorz.grasza@intel.com>

Implements: blueprint versioned-objects

Change-Id: Ic502363a12df6a863375eccd26581451ad3daf04
8 years ago
Kanagaraj Manickam 47fa307c10 StackTag versioned-object
Adds support for versioning object support for StackTag
and add it to the Stack object

Closes-bug: #1432477

Implements blueprint versioned-object

Change-Id: I7cc39c1e1ce913c35862a52592e55b9f484c7e68
8 years ago
Michal Jastrzebski (inc0) 9b4511d0a0 Add missing versioned mechanism to Stack object
Few object methods misses _from_db_object. To enable it to make
schema valid, we need to fix that.

Change-Id: I2e5ff22cd40be56ebc5f3a7095887be773ddb809
Closes-Bug: #1431353
8 years ago
ShaoHe Feng a521e72a8b Versioned objects - UserCreds
implementation for versioned objects. This contains UserCreds

Co-Authored-By: Michal Jastrzebski (inc0) <michal.jastrzebski@intel.com>
Co-Authored-By: Grzegorz Grasza <grzegorz.grasza@intel.com>
Change-Id: Ibae5504060d2c714225cd8b735b430c7da52e0fa
8 years ago
ShaoHe Feng 49b30027a5 Versioned objects - Resource
implementation for versioned objects. This contains Resource

Implements: blueprint versioned-objects
Co-Authored-By: Michal Jastrzebski (inc0) <michal.jastrzebski@intel.com>
Change-Id: Id4a5724d68e93b51aaf45d75e5e5e564b5d87789
8 years ago
Jenkins 8736c227cf Merge "Versioned objects - ResourceData" 8 years ago
He Jie Xu c568afd7af Versioned object - SoftwareConfig
Prototype implementation of oslo.versionedobjects.
This patch adds SoftwareConfig object.

Partially implements bp versioned-objects

Co-Authored-By: ShaoHe Feng <shaohe.feng@intel.com>

Change-Id: Ib0544273f882bd2863d86ae6ee91cd7068dbd703
8 years ago
ShaoHe Feng f95dd50a57 Versioned objects - ResourceData
Implementation for blueprint versioned-objects.
This contains ResourceData.

Co-Authored-By: Grzegorz Grasza <grzegorz.grasza@intel.com>
Co-Authored-By: Michal Jastrzebski (inc0) <michal.jastrzebski@intel.com>
Change-Id: I129f3b891a8efd728ed55c03286dcc1f8b68c4aa
8 years ago
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 <shaohe.feng@intel.com>
Co-Authored-By: Grzegorz Grasza <grzegorz.grasza@intel.com>

Change-Id: I554162cf3681fe559c75f54c61c6f32c91f5c2f8
8 years ago