Commit Graph

54 Commits

Author SHA1 Message Date
Andreas Jaeger e61cc055ab Retire repository
Fuel (from openstack namespace) and fuel-ccp (in x namespace)
repositories are unused and ready to retire.

This change removes all content from the repository and adds the usual
README file to point out that the repository is retired following the
process from
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project

See also
http://lists.openstack.org/pipermail/openstack-discuss/2019-December/011647.html

Depends-On: https://review.opendev.org/699362
Change-Id: I10917e42829b459c41ca46514faa72fc46abf7be
2019-12-18 09:52:23 +01:00
Igor Gajsin 634b66df45 remove vmware
VMware not supported since Fuel 10.

Implements: blueprint remove-vmware

Change-Id: Ia26a97d13bb9c3d2e838d639efdababbb15f86da
2017-02-14 15:52:27 +00:00
Georgy Kibardin 888ceb3693 Enable propagate_task_deploy in Web UI
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)
2016-10-21 05:17:35 +00:00
Jenkins a300fcf96a Merge "Remove list conversion for cluster extension handler" 2016-09-23 08:22:19 +00:00
Bulat Gaifullin 17ca94d09f Enable using new transaction manager for old handlers
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
2016-09-16 12:51:29 +00:00
Alexander Gordeev f72dd0967d Remove list conversion for cluster extension handler
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
2016-09-13 18:10:28 +03:00
Jenkins 0506392291 Merge "Improve cluster extensions handlers" 2016-09-13 07:10:14 +00:00
Alexander Gordeev d9f01a6472 Improve cluster extensions handlers
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
2016-09-12 17:36:07 +03:00
Jenkins 0439483ef6 Merge "Now it is possible to fetch cluster own deployment tasks via API" 2016-09-12 12:51:14 +00:00
Ilya Kutukov 39d74ec7e4 Now it is possible to fetch cluster own deployment tasks via API
/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
2016-09-12 12:27:31 +03:00
Bulat Gaifullin 03acc6603f Do not allow to run 2 or more tasks simultaneously
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
2016-08-30 14:45:56 +03:00
Jenkins 8d588d984f Merge "Fuel Nailgun: Noop run support" 2016-08-25 01:32:20 +00:00
Anastasiia Guzikova 16f89b744f Fuel Nailgun: Noop run support
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
2016-08-25 02:30:45 +03:00
Alexander Gordeev 06686519a0 Cluster.extenstions shouldn't have duplications
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
2016-08-24 20:14:44 +03:00
Sylwester Brzeczkowski 5a6bd3f490 Add extensions API handler for cluster
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
2016-08-23 18:49:46 +03:00
Dmitry Guryanov 6e31938a0f Split @content decorator
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
2016-08-22 12:20:18 +03:00
Dmitry Guryanov e31b5b16ee Fix deployment_tasks api, when graph_type is an empty string
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
2016-05-31 14:13:32 +03:00
Vladimir Kuklin e4fbfe80ed Allow a user to run dry-run deployment
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
2016-05-30 15:46:31 +00:00
Nikita Zubkov d5a790caab Add exceptions hierarchy
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
2016-04-14 17:41:25 +03:00
Bulat Gaifullin fe73beacc6 Reworked ApplyChanges for LCM
The following legacy tasks were reworked to use ClusterTransaction:
 - OpenstackConfigTaskManager
 - SpawnVMsTaskManager

Change-Id: I4a6f5f37161e4290050ec4926cf029cd7af566e4
Closes-Bug: 1565885
Closes-Bug: 1561994
Closes-Bug: 1565760
2016-04-14 13:03:07 +03:00
Artem Roma c90663a45a Add exception handling when NIC with given name is missing in db
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
2016-04-06 14:41:50 +03:00
Jenkins e9d6680359 Merge "Don't set cluster in cluster deletion task" 2016-04-06 10:23:21 +00:00
Ilya Kutukov 88fe73e91a Merged plugins tasks and release tasks are added to the cluster handlers
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
2016-04-05 13:52:22 +03:00
Krzysztof Szukiełojć 7b9a7d6b63 Don't set cluster in cluster deletion task
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
2016-04-04 13:07:34 +02:00
Jenkins f374b47a1b Merge "Linked deployment graph management handlers added to REST API" 2016-03-28 17:37:47 +00:00
Ilya Kutukov 3d1f96e529 Linked deployment graph management handlers added to REST API
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
2016-03-28 19:04:11 +03:00
Bulat Gaifullin 6d6bb7f169 Introduced LCM serializers
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
2016-03-28 11:48:06 +00:00
Bulat Gaifullin dd0990d008 Save information about deployment in Transaction
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
2016-03-25 17:03:58 +03:00
Ilya Kutukov 0e9ca251cf Orchestrator DeploymentGraph is renamed to the GraphSolver
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
2016-03-17 03:25:37 +03:00
Jenkins 4f04cbade3 Merge "Add node attributes validator" 2016-03-09 11:45:45 +00:00
Vitalii Myhal 7e5607b376 Add --force flag for `fuel deploy-changes` command
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
2016-02-29 11:34:51 -06:00
Igor Kalnitsky e91363ba9c Remove legacy patching code
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
2016-02-26 15:06:04 +02:00
Artur Svechnikov ee15664ba0 Add node attributes validator
Cluster attributes validator is also refactored

Change-Id: Iedf640e0cabb38ba082156dd5f68248996926750
Implements: blueprint support-numa-cpu-pinning
2016-02-25 16:15:53 +03:00
Vitalii Myhal af3f5e1dbf Adds ability to force update environment attributes
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
2016-02-09 00:10:02 -06:00
Artem Roma b2c4b7d102 Add 'deployed_before' flag to cluster that forbids stop deployment
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
2016-02-01 12:22:51 +02:00
Vitalii Myhal f83c4ea23b Versions of a plugin have been placed in a separate container
Closes-Bug: #1440046
Closes-Bug: #1518993

Change-Id: I76655541fd7c00cdd863e145b28fba804b4ed801
2015-12-27 22:35:10 -06:00
ekosareva 3450d676de Add possibilities to add & delete VMware clusters on operational env
* Allow update VMWareAttributes for locked cluster if has pending
  addition/deletion 'compute-vmware' nodes
* Add validation of 'nova_computes' section in vmware attributes

Change-Id: I16c1826de81251f5e6ce626b730988127160202f
Implements: blueprint add-vmware-clusters
2015-12-08 14:38:24 +03:00
Vitaliy Mygal a25db9a2c6 Store attributes of plugins in a separate table
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
2015-11-15 23:29:13 -06:00
Maciej Kwiek 1ffc5e54e9 Fix hacking 0.10 errors in nailgun
Change-Id: I82e418d21e367ff379dda935f035dcc709c3a034
Partial-Bug: #1410810
2015-10-08 12:01:55 +02:00
Ryan Moe eded14892c Add API handler for handling network template
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
2015-07-16 10:35:45 +03:00
Przemyslaw Kaminski c83e79f06b Validate cluster attributes
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
2015-04-30 14:55:01 +02:00
Igor Kalnitsky 35e149e35c Add 'always_editable' attribute to repo_setup
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
2015-04-07 17:27:08 +03:00
Andriy Popovych bcc498794f Fix in vmware serialization for multi-role node
* 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
2015-03-24 15:57:39 +02:00
Nikolay Markov 2def4d00fa Wrap errors to JSON in Nailgun API
Partial-Bug: #1391846
Related-Bug: #1423916
Implements blueprint nailgun-wrap-errors-json
Related blueprint: nailgun-api-requests-responses-validation

Change-Id: Ie351d6cd6a5ebf929563a2e0c76ef875fa71c2d3
2015-03-02 11:39:04 +01:00
Andriy Popovych 5e65c2a0d4 Small fixes for vmware part in nailgun
* fix typo in serializer
  * disable access for API if cluster does not support vmware
  * change urls

Related-to: vmware-ui-settings
Change-Id: I27db865915454a1c7da5dcc11d357078cd24c4ca
2015-02-25 15:30:42 +02:00
Andriy Popovych a567e13c24 Implementation of vmware Settings on nailgun side
- New entity vmwareAttributes added
  - Basic deployment serializer

Implements: blueprint vmware-ui-settings

Change-Id: I17ba8f8535498263333fa47d6283433ea4d6c509
2015-02-11 15:42:59 +02:00
Igor Kalnitsky 14ad2af3ee Reform releases '.state' attribute to fit our goals
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
2015-01-28 10:24:05 +03:00
Dmitry Shulyak 064fb1e9f7 Deployment graph configuration storage in nailgun
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
2014-12-31 15:34:53 +02:00
Nikolay Markov 7ba7a06ccd Initial JSONSchema validation
- 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
2014-12-15 13:09:38 +03:00
Dima Shulyak 1499dca448 Properly process plugin attributes in default handler
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
2014-10-28 10:37:00 +00:00