Commit Graph

53 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
Anastasiya d2a5333e99 Limit the minimal RAM amount for OVS+DPDK to 1024MB
* min value was set in consts
* appropriate validator was added
* tests for validator were changed
* test for serializer were changed

Change-Id: Ib8ccb0658bd401ce492257f855013d1d7e0f2dac
Closes-Bug: #1653081
2017-02-07 16:42:01 +00:00
Anastasia Balobashina 092acaa562 Revert "Limit the minimal RAM amount for OVS+DPDK to 1024MB"
This reverts commit 6e4ef67269.

Change-Id: Ib9144e2becebfa9b4817e8389419892c0daadd35
Closes-Bug: #1656804
2017-01-19 12:54:31 +04:00
Anastasiya 6e4ef67269 Limit the minimal RAM amount for OVS+DPDK to 1024MB
* min value was set in openstack.yaml
* appropriate validator was added
* tests for validator were changed
* migration node and release attributes was added
* tests for migration were added

Change-Id: Iec723c7f02e874bf8567665a30af30c61aff7f34
Closes-Bug: #1653081
2017-01-10 16:01:56 +00:00
Artur Svechnikov a6434023f1 Skip empty cpu pinning and hugepages
If there is no specified hugepages or CPU pinning
distributors shouldn't be called. Also changed
initialization of custom_hugepages type.

Change-Id: Iedb819b1da7dcb3877a6a94b9e7cfb93aa949a9e
Closes-Bug: #1594443
(cherry picked from commit 661ce479a6)
2016-11-29 06:37:12 +00:00
Andriy Popovych c311746282 Implement mechanism for plugin node attributes
Provide ability for plugins to add additional attributes for nodes.
* Added new NodeAttributesDefaultsHandler handler for getting
  default node attributes.
* Added code stuff for getting and updating additional plugin
  node attributes.
* Added code stuff to serialize plugin node attributes for orchestrator.

Change-Id: I5c6d6f3c815a034683e624b98fa1f360ab4b491c
Implements: blueprint nics-and-nodes-attributes-via-plugin
2016-10-21 19:47:14 +03:00
Jenkins 1e54609fa8 Merge "Revert "Do not call CPU&HugePages distributors"" 2016-08-15 18:24:11 +00:00
Artur Svechnikov 4d718e7954 Revert "Do not call CPU&HugePages distributors"
Lack of testing was found, it's impossible to specify hugepages if
host supports only 2M huge pages due to incorrect validation.

This reverts commit 9bd61c68dc.

Change-Id: I7945d165764608ca7ee8ac5f46463267718678f5
2016-07-29 11:56:30 +00:00
Jenkins 5368f8b087 Merge "add a function get_param_as_set for handler" 2016-07-28 09:23:45 +00:00
Artur Svechnikov 9bd61c68dc Do not call CPU&HugePages distributors
If there is no specified hugepages or CPU pinning
distributors shouldn't be called. Also changed
initialization of custom_hugepages type.

Change-Id: I3835c9d163ba2692adf34193b57510060158b8e3
Closes-Bug: #1594443
2016-07-27 14:38:26 +00:00
Dmitry Guryanov c179e5d0b4 add a function get_param_as_set for handler
It's a common task to get list of something from URL,
so let's add this get_param_as_set function and use
it where possible.

Change-Id: I4ae28553117f5ae4de35350270a40e3ac6beaf41
Partial-Bug: #1593751
2016-07-26 18:36:57 +03:00
Georgy Kibardin 17b4878e60 Human friendly message for invalid hostname
Unfortuanately json schema validators don't allow specifying more human
friendly message as an alternative to complex regex patterns. So, the
only way is to perform hostname validation "manually".

Change-Id: Iee1717a3034fe4e33569fbeff6553b5bc949605e
Closes-Bug: #1567875
2016-06-07 09:32:25 +03:00
Jenkins 51540ffabf Merge "Move models for restrictions to cluster object" 2016-05-23 09:54:51 +00:00
Alexander Saprykin cc3dbfabb3 Validate node VMs format
Add validation for creating node VMs config in NodeVMsHandler.

Change-Id: I0716f03e0f40b45d834ec846795dee78e68e4cd5
Closes-Bug: #1582136
2016-05-19 12:05:38 +02:00
Artur Svechnikov ccda00737a Move models for restrictions to cluster object
Since there are a couple of places where models for
restrictions is initialized, it's moved to cluster object.
Also, comments from previous commit
(Ibba7951968cbafd59fff0d516e74f9dd9e454edc) are fixed

It's refactoring bug is not needed.

Change-Id: Ic499a5deefb12740ebedc630b024dae0b4248ec5
2016-05-19 12:34:02 +03:00
Dmitry Guryanov 9edc5b07ca validate pending_roles for Node
When you do PUT request to NodeCollectionHandler
it's possible to provide some unexistent roles,
which results in broken UI. Because it tries to
get some info about these roles to display.

Fixes-bug: #1539733
Change-Id: I3b5070ca36589be3fa8488717e99823e253089ca
2016-04-22 17:36:57 +03:00
Jenkins eff854ffbf Merge "Validate attributes restrictions" 2016-04-19 13:55:19 +00:00
Jenkins 650aa71bd7 Merge "Replacing improper map usage." 2016-04-19 13:54:19 +00:00
Jenkins 228f8dab7b Merge "Deploy handlers validation is now custom graph aware" 2016-04-18 14:36:08 +00:00
Artur Svechnikov 7e3fe2c308 Validate attributes restrictions
Since Nailgun contains attributes restriction
mechanism it's possible to verify attributes
restrictions. This commit applies restrictions
checks into validation for both node attributes
and cluster attributes.

Change-Id: I269da9a7a7df5fea336c07784b37d6ced1641993
Closes-Bug: #1567394
2016-04-18 16:37:43 +03:00
Ilya Kutukov e1882de71c Deploy handlers validation is now custom graph aware
TaskDeployGraph and DeploySelectedNodesWithTasks handlers
now validating data using deployment graph type

Change-Id: I0f7b19a9695bd2ed608d2bf3b6dd28ae91bc86e2
Partial-Bug: #1567504
2016-04-15 16:42:11 +03: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
Krzysztof Szukiełojć 442a143c11 Replacing improper map usage.
Replacing map with for loops or list comprehensions in areas
where they where used improper.

Change-Id: I094abb3c6ec3c041f0fff6aed0c456158e1cc8f7
Closes-Bug: 1567849
2016-04-13 17:13:18 +02:00
Nikita Zubkov 6eb02940ed Add hugepages checks to NodeAttributesValidator
Validator checks that node have enough memory to allocate all required
hugepages

Change-Id: I6b4e963548a673d3a86d3b4cc06529701c8d0a85
Implements: blueprint support-hugepages
Depends-On: Id5898f0b3e193fbd6267975d0ec70ef72cbce789
2016-03-18 16:25:14 +03:00
Jenkins bfca72f48a Merge "Add cpu pinning checks to NodeAttributesValidator" 2016-03-17 16:36:03 +00:00
Nikita Zubkov 0cdc68b2b6 Add cpu pinning checks to NodeAttributesValidator
Validator checks that node have enough cpus and at least one unassigned
cpu for operating system.

Change-Id: Ie4ee247de55882232e256ed8744edf997c170c40
Implements: blueprint support-numa-cpu-pinning
Depends-On: I3502f484bd0d8222ad22500f42cc16cfb751042f
2016-03-17 16:14:15 +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
Dmitry Shulyak 663b7ebc8e Add handler for serialized tasks used in t-b deployment
Handler will return output of the same serialized graph used for
deployment in json format. And it will be available using next uri

GET clusters/<:cluster_id>/serialized_tasks?nodes=1,2,3&tasks=task1,task2

Expected return codes are the following:

200 - serialized tasks returned
400 - task based deployment is not enabled for cluster
400 - Nodes dont belong to same cluster
404 - cluster or nodes - not found

implements blueprint serialized-graph

Change-Id: I170011778296acdb977f9d938c062f14c1c3d556
2016-03-02 13:31:35 +00: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
Krzysztof Szukiełojć 9efd488382 Fixed pep8 violations in validators for node
Change-Id: Icec61d75120a5364b280e115463deab2ae0baa0b
2016-02-15 17:38:56 +01:00
Maciej Kwiek 3dd934d96b Adding nodes not in an env to group is bad request
When you tried to add node that is not added to cluster you got 500
error. Now this situation is handled and 400 is returned along with an
explanation

Change-Id: I8fd20c7a862caccd9c778672d4527343386a5d5a
Closes-bug: #1508398
2015-11-02 10:48:49 +01:00
Maciej Kwiek aae84550e2 Adding node to group from other env is bad request
Validator was tweaked to check if node cluster is the same as node group
cluster.

Change-Id: I5021c21fce736d595c604981d8c53cf0dde495ba
Closes-bug: #1508395
2015-10-29 09:35:18 +01: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 d4a7060448 Validate node group exists when assigning node groups to nodes
API validator checks for existence of a node group. In the case
where a specified group does not exist it returns the proper status
code and error message.

Change-Id: I58ae9094046e5f261839ec90eaac79e639dbfb4d
Closes-bug: #1494835
2015-09-18 10:08:55 -07:00
Fedor Zhadaev 16f77c0526 Additional validation for node hostname.
* Added check for conflict between new hostname/FQDN
     and public TLS endpoint

Change-Id: I4b1f770e89b0fa9ce6fce6e7e252209378a7e9a7
Closes-bug: #1487002
2015-08-21 14:25:00 +03:00
Fedor Zhadaev 9f4cf3164f Add node status validation for updating node hostname
Closes-Bug: 1476722
Change-Id: I63b17ab7108ecf50feed5c67145ce5578b8d6c63
2015-07-31 07:10:29 +00:00
Evgeniy L 684f254b06 Move volume manager specific validators into extension
Extension specific validators should not be hardcoded
in the core.

Implements blueprint: volume-manager-refactoring

Change-Id: Ie821eb05774ef07a5e5a897d9542c1762579603f
2015-07-21 10:18:44 +00:00
Fedor Zhadaev c0b2444b21 Configurable hostnames for physical nodes
* Extended db model with field 'hostname'
* Added hostname validation in API node handler

Change-Id: If18d00612140dcaaeec23bea172dcf6490186e5d
Implements: blueprint node-naming
2015-07-20 12:47:39 +03:00
Oleg Gelbukh 9f1e828108 Support a flag for preserving partitions in Volume Manager
Add an attribute 'keep_data' to list of attributes of a
partition to indicate that data on that partition must
be preserved during provisioning and deployment of the node.

Change-Id: I5a6660c59d230632499de89c2eb17ce718e7481e
Implements: blueprint partition-preservation
2015-07-07 15:55:51 +03:00
Sylwester Brzeczkowski 6b6219e74e Raise error once there's no deployment tasks in db
Added new exception 'NoDeploymentTasks' which is raised when user
is trying to manually deploy cluster whose release has empty
'deployment_tasks' and 'fuel_version' >= 6.1

Added loading of fake deployment tasks in both test Environment class
and 'loaddefault' command - so it also works in fake mode.

Change-Id: Ibaee6912cfbca27dbb35c4f9c09feb74c81b02a1
Closes-Bug: #1448066
2015-05-16 00:12:28 +02:00
Dmitry Shulyak 9ab71ac888 Deprecate deployment on nodes that are marked for deletion
Running deployment on nodes that are going to be removed from
cluster can lead to undesired destructive effects.
For particular case see related bugs.

In order to prevent such possibility - deployment action wil be
deprecated in case some nodes are marked for deletion.

User then will be able to remove them from deployment group,
or remove pending_deletion flag and deploy them - if pending_deletion
was set by mistake

Change-Id: I3622492ba5eeec3de8300effd0fa98602916601f
Related-Bug: 1454617
Closes-Bug: 1454622
2015-05-13 15:46:50 +03:00
Artem Roma 6e41156536 Add check for nodes provisioning to BaseDeploySelectedNodes handler
In some cases (e.g. user is using CLI or API interface for deployment
of standalone controller node for cluster in ha mode) not all nodes
intended for deployment are yet provisioned. Separate validator added
for check such situation.

Change-Id: I7405ba54d90f6bc986befb5d035b213e4c0f6a73
Closes-Bug: #1415968
2015-04-23 12:32:01 +03:00
Sebastian Kalinowski 0038afa326 Add graph visualization handler
* added handler which allow to get a DOT representation of
  deployment graph (full or selected tasks):
  /api/v1/clusters/<id>/deploy_tasks/graph.gv
  Colors for nodes in graph:
  - groups - blue
  - stages - red
  - task that will not be executed - gray
  - normal task - green
  Available params:
  - tasks - list of tasks that will be selected to make a deployment
  - parents_for - show only predecessors/parents for given task
* added pydot-ng as a requirement
* in tox env always install newest package

Depends on: I706e18815f35904bf1f148edba818d281f2005b0

Change-Id: Id6fe85efe2549a63737ad50e5e55a70a480c83ab
Implements: blueprint granular-deployment-based-on-tasks
2015-03-09 15:08:39 +01: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
Przemyslaw Kaminski d302363b7e Node(s) DELETE is done via the removal task
The DELETE method now returns task object that removes this node from DB and
from Cobbler. Also, DELETE method for collection has been added that accepts
a list of ids to delete and performs batched removal.

Change-Id: Ib976278eb5436d4dbb3d8b6be11a90902a0f8871
Closes-Bug: #1411200
Implements blueprint: node-removal-task
Related-Bug: #1405635
2015-02-20 16:00:06 +01: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 df5f5d08b0 Add API to execute only particular tasks
Next call will support tasks data:

PUT clusters/(?P<cluster_id>\d+)/deploy_tasks/

only received list of tasks will be executed

Introduced void type for task which will be used in order to not remove
concrete task and all edges with this task.

implements blueprint granular-deployment-based-on-tasks

Change-Id: I4d8c4199cb3c351983cf4d74bc8cd6f5e66d92ed
2015-01-21 16:18: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
Igor Kalnitsky 7e124c6b58
Validate HTTP PUT requests of node handler
Currently we have turned off validation of HTTP PUT requests for node
handlers. This leads to the situation when we save in database broken
data. Since now it's fixed.

Change-Id: I844e7c48537d32791fc4f952a8b8e7b24bb419e1
Closes-Bug: #1398048
2014-12-04 15:04:39 +02:00