Nodes can be exluded from deployment, if there is no tasks to run on this nodes.
Such nodes should not be switched to deployment state.
Change-Id: I4cd23769b7643aae7b149ba30e5b0e91a3021563
If graph does not contain node_filter the default filter
will be used. this will help to improve UX when user works
with graph concept.
Change-Id: I237189436b4ed5dd64ef6d60a05c674d2f974eb4
Closes-Bug: 1630605
Because in-progress status has high priority in
mehtod Node.get_status, the status of node was not
recognized properly durring checking for redeploy.
Change-Id: I3e0ac97b02d25803b810950cda383c220611c309
Closes-Bug: 1622972
If yaql expression returned empty list the nodes_fillter
was not applied and graph was executed on all nodes from cluster.
Change-Id: I3bc70fa04453e051e31ff31949fd51e1ca5fa896
Closes-Bug: 1622650
Also reworked legacy task manger to use this flag
instead of patch every deployment task
Change-Id: Ic4031b94ee359d414f1834a56b085ff12cc6b38f
Closes-Bug: 1618774
The size of deployment_info grows as n^2 depending on
nodes number. That's because common_attrs, which is
merged into each node's contains info about all nodes.
For example for 600 nodes we store about 1Gb of data in
the database. So as first step let's store common_attrs
separately in deployment_info structure inside python
code and in the database.
Also removed old test for migrations, which are not related
to actual database state.
Change-Id: I431062b3f9c8dedd407570729166072b780dc59a
Partial-Bug: #1596987
Simultaneous run of 2 or tasks may cause
side-effects and the simplest way is prevent this action.
Also fixed all places where rpc.cast called without commit
Change-Id: I029768900d345540c3b501f1fa3649b063d3a55d
Partial-Bug: 1615557
Also revert detecting error status by error_type,
because there is no gurarantee that error_type is reseted
in all places. need to prepare proper fix for error_type
Change-Id: I6de0b99eced36fa011f1fb45cf56c895b9fa3372
Closes-bug: 1617193
Task model is extended with noop_run boolean column;
Introdicing and passing down the noop_run param from API to
execution manager;
Execution manager supports noop_run argument,
and uses it for creating astute message;
DeploymentHistory model is extended with summary JSON column;
The summary column should be returned only if some
include_summary=1 query string is passed to API.
Implements blueprint: puppet-noop-run
Change-Id: I80090d96f818cef7c6f88208bdacf5849f0f5d0f
Added support for node filters and node_transitions.
If one of node_transitions status is not specified,
the default will be used, where default is:
- on success: switch node to status ready
- on error: switch node to status error
- on stop: swith node to status stopped
Change-Id: I8b4d49dc1bada2479017697bf5858e85958579f2
Blueprint: graph-concept-extension
The transient statuses are not persited in DB because
the status of node should represent the current state
of node, for example: node is provisioned or node is deployed.
The synthetic states: like error, deploying, etc. are used
only for providing additional for user about status of node at this moment.
This statuses can be calculated on demand.
Also node.error_type has type 'String' instead of 'Enum'
Also added handling status 'deleted' in response, which means that node should be deleted from cluster.
Change-Id: If5e79b9274f34e01d2b795491c23361c9050669d
Blueprint: graph-concept-extension
So far Nailgun has a bunch of managers for various tasks (transactions).
The way towards everything-is-a-graph means we won't have hardcoded
transactions and hence requires a new single manager to handle them all.
Transaction manager runs specified graphs on specified nodes within
single transaction (task), so anyone can poll it to check the progress.
Co-Authored-By: Igor Kalnitsky <igor@kalnitsky.org>
Change-Id: I98df7b98a07f64d97b561b85faa8472c3c551346
Blueprint: graph-concept-extension