[openstack-dev] [heat] Persist graph for convergence

Murugan, Visnusaran visnusaran.murugan at hp.com
Thu Sep 18 08:15:37 UTC 2014


Hi All,

Below is the model proposal for persisting ResourceGraph.

Column name

Type

Constraint

resource_id

varchar(36)

NOT NULL ForeignKey resource.id

needed_by

varchar(36)

NULL ForeignKey resource.id

stack_id

varchar(36)

NOT NULL ForeignKey stack.id

retry_count

Integer

Default (0)

observed_ready

Boolean

Default False



Create cycle:

1.       Persist graph

2.       Mark desired states for all resources in the stack. (table: resources)

3.       Initiate stack create by calculating leaf nodes (All observed_ready=False nodes in resource_id column but not in needed_by column)

4.       Post create resource jobs to engine worker

5.       Engine worker upon task initiation posts observe task to convergence-observer and complete tack execution (return true)

6.       Mark observed_ready upon receiving resource completion notification from observer. Repeat step 3 through 6 till all nodes (resources) are marked observed_ready.

7.       If not more nodes, then mark stack create complete and return happy

Update cycle:

1.       Persist new graph for new stack created

2.       Mark desired state for all resources in both old and new stacks.

3.       Perform steps 3 to 6

4.       Delete old stack, garbage collect unwanted resources

5.       Mark stack update complete and return happy.


Clint had in fact proposed to have a "version Integer default(0)". To achieve this I feel Table:Stack should also have versioning instead of creating a backup_stack.

Currently backup and nested stack relation is achieved using owner_id. In case if update, versioning makes more sense instead on creating a backup stack and setting owner_id as current stack.

-Vishnu





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140918/a5e92974/attachment.html>


More information about the OpenStack-dev mailing list