So that it could be set by a user.
Also error message is returned in a structured way so that UI could
display it.
Also partial update of cluster attributes is supported.
Change-Id: Ib4a434039213cc91e0514240e722b7266f158ec5
Closes-Bug: #1621429
(cherry picked from commit d00f3d9228)
DeployChanges will use the sequence 'deploy-changes' if it is available.
DeployNodes and ProvisionNodes will be use apropriate graphs if it is available.
Change-Id: Icb66826ce96c41f77d85d97990b4cc600aa5fe04
Closes-Bug: 1620620
Gets rid of unnecessary conversion to list for accepted
data as a set for DELETE handler and then passing it straight
to validator without extra ordinary conversion back to set.
Change-Id: Ie24d20f68b96feba4443214de47603c5802be613
Related-Bug: #1614526
There handlers available under api/v1/clusters/{id}/extensions
* Re-work GET handler. Since now it's possible to enable extensions
in more granular way which doesn't affect already enabled
extensions.
* Add DELETE handler. Accepts comma separated list of extension
names to disable via query string under 'extension_names' param.
Change-Id: Idd5680b489b4003bb2f58b5279a7257a128cc4e1
Related-Bug: #1614526
/clusters/<CLUSTER_ID>/deployment_tasks/own/ handler is added that allows
to get cluster own deployment tasks belonging to clusters attached
to the given cluster model directly.
Change-Id: I2c7afad9958a2453d48d2a70c164eb0269019041
Closes-Bug: #1605639
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
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
PUT converts input data to set(), so
ClusterExtensionsHandler will never produce duplications
in a list of enabled extensions.
Change-Id: I3631f9ba8bebc24102c13544d8463afdddd0bef4
Blueprint: extensions-management
Related-Bug: #1614526
The patch includes new handlers for extensions management for
clusters, unit and integration tests.
Co-Authored-By: Sylwester Brzeczkowski <sbrzeczkowski@mirantis.com>
Change-Id: I4b81ec5b4ae6986068832bd28c08831881feeee6
Blueprint: extensions-management
Closes-Bug: #1614526
Decorator content does too many different actions, so
let's split it into 3 decorators: @handle_errors,
@validate and @serialize. We can skip calling @serialize
in many places, because those methods just raise some
http error.
Also I've changed return value of all handlers from
serialized json (string) to python's structures, lists
and dicts. So It's become possible to implement different
serializers and I've added support for YAML output.
Change-Id: Ia3da3bd809bcca923d53666eca54def78c995f65
Closes-Bug: #1606211
Nailgun should treat and empty string, given to
/clusters/(?P<obj_id>\d+)/deployment_tasks/?graph_type=$
/clusters/(?P<obj_id>\d+)/deployment_tasks/plugins/?graph_type=$
/clusters/(?P<obj_id>\d+)/deployment_tasks/release/?graph_type=$
e.t.c.
as default graph type. So let's convert some 'false'
values to None in handlers.
Change-Id: I238764d24fc14b2a41baaca37dabb6264e7e91d8
Closes-Bug: #1576261
Now following handlers:
/clusters/:cluster_id/changes/
/clusters/:cluster_id/changes/redeploy/
/clusters/:cluster_id/deploy/
/clusters/:cluster_id/deploy_tasks/
?dry_run=1 that is telling Astute not to run cluster executionat all.
Dry run assumes that it does not actually affect
cluster status regardless of their result.
Also, remove redundant update of nodes statuses to 'deploying'
within OpenStackConfigManager and DeploymentTaskManager as it should be
done by receiever.
Do not set cluster status to 'deployment' for these nodes in order to
retain its real status
Modify stop deployment tests to move failing stop deployment for already
deployed clusters to another test class. Since 9.0 we can run stop
deployment for new clusters.
Change-Id: I374fc86b63af64411d4a5ca45ff6c3680cb44897
Partial-bug: #1569839
nailgun.errors have a huge set of exceptions but without hierarchy. This
patch remove exception generation from dict and make it explicitly with
python classes and add some exceptions hierarchy. Now all network errors
inherit from NetworkException and same for other exceptions.
Change-Id: I9a2c6b358ea02a16711da74562308664ad7aed97
Closes-bug: #1566195
The following legacy tasks were reworked to use ClusterTransaction:
- OpenstackConfigTaskManager
- SpawnVMsTaskManager
Change-Id: I4a6f5f37161e4290050ec4926cf029cd7af566e4
Closes-Bug: 1565885
Closes-Bug: 1561994
Closes-Bug: 1565760
In case NIC names in 'nic_mapping' section of the network template do
not correspond to actually existing NICs of node, to which networks must
be assigned, the error will occur; as lookup in db by name is performed,
result of such lookup will be None, so any attempt to get attributes
from it raises AttributeError.
This change adds handling of the situation by adding of custom exception
and returning proper http response to user who tries to upload network
template. Such handling was added for following API end points, by which
network template is applied to nodes:
* NodeHandler.PUT;
* NodeCollectionHandler.PUT;
* ClusterHandler.PUT;
* TemplateNetworkConfigurationHandler.PUT
Change-Id: Ia9d7264d3885805f91862e408f8059c4e5eed1d6
Closes-Bug: #1539115
Following handlers are implemented with graph_type support:
* Get merged plugins tasks for plugins enabled for the environment
`GET /clusters/<cluster_id>/deployment_tasks/plugins/`
* Get cluster release deployment tasks
`GET /clusters/<cluster_id>/deployment_tasks/release/`
Change-Id: I3411860990728a43641c7685b1e6ee736aab5c23
Closes-Bug: #1563848
Partial-Bug: #1563851
UI needs to be able to check task status after cluster is removed.
We cannot delete deletion task with rest of the cluster.
Change-Id: Idc87f75123f3bff0745efd4a65f843036c1c4e50
Closes-Bug: 1519446
Following handles has been added:
GET /releases/<release_id>/deployment_graphs/
GET/POST/PUT/PATCH/DELETE /releases/<release_id>/deployment_graphs/<graph_type>/
GET /clusters/<cluster_id>/deployment_graphs/
GET/POST/PUT/PATCH/DELETE /clusters/<cluster_id>/deployment_graphs/<graph_type>/
GET /plugins/<cluster_id>/deployment_graphs/
GET/POST/PUT/PATCH/DELETE /clusters/<plugin_id>/deployment_graphs/<graph_type>/
Change-Id: I1fd5fb53700c761a65249dd0a646dbdbf8d5272a
Implements: blueprint custom-graph-execution
We need separate task serializers for LCM,
because LCM uses context per node for serialize tasks.
It also allows to isolate LCM related code for backward
compatibility with existing environments, that is not ready for LCM.
Change-Id: Ie95a58c8cf86eac1a5c3dbd956fafc401e40fed6
Implements: blueprint computable-task-fields-yaql
Also implemented handlers to get last deployed settings
and networks for the cluster
Change-Id: I1dffada651b71d6e9dac4f02020eb4f900a5e2f4
Implements: blueprint unlock-settings-tab
Implements: blueprint save-deployment-info-in-database
To avoid confusion with objest.DeploymentGraph and
orchestrator.DeploymentGraph second one was renamed
to the GraphSolver because this entity is used to
find subgraphs, loops, and solve graph for the
old orchestrators.
Secondary changes:
DeploymentGraphValidator -> GraphSolverValidator
DeploymentGraphTasksValidator -> GraphSolverTasksValidator
GraphVisualizationValidator -> GraphSolverVisualizationValidator
validators/graph.py -> validators/orchestrator_graph.py
orchestrator/deployment_graph.py -> orchestrator/orchestrator_graph.py
Change-Id: Ic42a17115723b8145b9d94cc034bf2217d1d634b
Implements: blueprint custom-graph-execution
The flag allows to apply the changes to the cluster if the cluster
is in the operational state. This allows you to deploy the changes
without the reprovisioning procedure.
Example: `fuel deploy-changes --env <env_id> --force`
Partial-Bug: 1540558
Change-Id: Ibc89fdbfbd0a36a890412cd8e861d35bcf930690
In Fuel 5.1 we had an experimental feature - 'patching openstack env'.
The idea was to update and to rollback OpenStack environments between
minor releases. However, we have encounter a lot of problems with
restoring OpenStack databases andresolving dependency hell in packages,
so we buried it and never release it.
This patch removes legacy code from the source tree. We can do it
without fear, since it wasn't released in public.
Related-Bug: #1511499
Change-Id: I58b3fedd239eb7fe4226e51c2d6386efab14395d
In order to upgrade deployed cluster that is in operational state
without re-provisioning it, we need a possibility to forcefully
update cluster attributes (aka cluster/environment settings).
Optional flag '--force' is added to the commands below:
fuel settings --env <env_id> --upload --force
fuel env --env <env_id> --attributes --upload --force
This flag is handled by API here:
clusters/<id>/attributes/?force=1
Partial-Bug: 1540434
Change-Id: Ic6541f8e227251ae992a3005d543a8e1e42665f3
When cluster is successfuly deployed, that is, has 'operational' status,
'deployed_before' key is added to generated attributes of the cluster.
This flag then is used to determine whether stop action is allowed for
the cluster.
Change-Id: I8ecfca5819352ac27d7cec91e22f8006d8c3d8de
Closes-Bug: #1529691
This is redesign of plugins architecture in order to store
the plugin's attributes in a separate table, not in cluster
attributes, so it will be possible to remove connection between
plugin and cluster when a plugin gets deleted.
Added ability to work with different versions of a plugin.
User can choose the preferred version in UI.
The test "test_plugin_generator" was removed because no longer
relevant.
Closes-Bug: #1440046
Implements: blueprint store-plugins-attributes
Change-Id: I52115f130bf1c7c80c66e18d0bf9f7acb16dd56c
YAML network template can be uploaded/got/deleted via a call
to api/clusters/<id>/network_configuration/template
Change-Id: I5c9ae51558dab2301e8ad8dffcf68a63ed0abdb4
Implements: blueprint templates-for-networking
Add validation for cluster attributes. Do it so that it doesn't break
compatibility with current tests. Validate regexpes if they are provided.
Change-Id: I9c1fc04dab45aecf3e32615172654d11844df7c3
Closes-Bug: #1447407
Despite the fact that repos are part of cluster attributes and we can't
change cluster attributes after deployment, we have to be able to change
repos list. It makes sense, because for instance, user wants to add new
nodes but his mirrors were moved to another server, so current repos
are unavailable.
This patch adds support of the 'always_editable' flag in openstack.yaml.
With that flag we can mark attribute groups to be available for editing
after deployment.
Related-To: blueprint consume-external-ubuntu
Change-Id: I0c58a03b2cd83e1fb196f5a55002d5a869277c6f
* fix in deployment serialization for multi-role node
* fix dc and ds for glance
* deny access to default vmware attributes when cluster
doesn't support vmware configuration
Closes-Bug: #1431333
Change-Id: Ieabdd1b2c74c66dbea72e1bb4a97921a312e009e
* fix typo in serializer
* disable access for API if cluster does not support vmware
* change urls
Related-to: vmware-ui-settings
Change-Id: I27db865915454a1c7da5dcc11d357078cd24c4ca
Current release's '.state' attribute is obsolete and do not used. It was
introduced a time ago when we had an RHEL support. So it could be
refactored to fit out current goals.
Since now there will be only two states:
* available
* unavailable
There is no way to start provisioning task for unavailable releases.
Change-Id: I8827c710da6e4f77a6397381d51fe25b87149462
Implements: blueprint downloadable-ubuntu-release
We have several requirements for graph storages, that will
satisfy all parties:
- Store graph definition externally to nailgun, in fuel-library,
because fuel-library devs should be able to modify graph configuration,
based on changes in puppet modules
- Validate any data that nailgun will store, and validation should
happen at the time data is received by nailgun
- It should be possible to migrate data to required format, on upgrade,
if we will decide that it is necessary
- It should be possible to modify graph per cluster, and per release,
for flexibility of debugging and development, also it may
help with maintenance tasks
To solve this issues 2 db fields was added:
Cluster.deployment_tasks
Release.deployemtn_tasks
It will be possible to read/modify both of this fields by next api request:
GET/PUT release/<rel_id>/deployment_tasks
GET/PUT cluster/<cluster_id>/deployment_tasks
Also note that deployment configuration for old release will be stored in
nailgun code in orchestrator/graph_configuration.py module
implements blueprint granular-deployment-based-on-tasks
Change-Id: I6f23da3ea7a4f692d02dcb84175540e64f34df89
- errors are now returned as tracebacks, not HTML
- added schema checking based on the handler type and validator
- content_json decorator rewritten completely
- common JSON types
- creation of nodes with non-number ID is now forbidden according to scheme
Implements: blueprint nailgun-api-requests-responses-validation
Change-Id: Icf49bb534ccb19872402b66532ef44418bd66a53
Patch fixes default workflow from CLI, which is:
fuel attributes --env 1 --default
Gets you default attributes for your env, then you are able
to enable/disable plugin and
fuel attributes --env 1 --upload
Upload them back
related to blueprint cinder-neutron-plugins-in-fuel
Change-Id: I805d53f5adfefca4c72662c143d9a5474a98e862