Commit Graph

302 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
Vladimir Sharshov (warpc) 3fb3b83f4a Excluding number of nodes in stop operation notification
Nailgun use block of nodes in stop operation to reset
such nodes in discovery state. Also Nailgun used such
data to calculate count of nodes for notifications.
But Astute will not send info about nodes in case
of task deployment.

This patch exclude count of nodes in stop notification
to prevent misslining message about successful operation
for 0 nodes

Change-Id: I32da2ccce11b22378f58759703fc4a56e31fd993
Closes-Bug: #1672964
2017-03-28 15:51:45 +00:00
Anastasiya 93f40003de Fix naming of reset tasks and message duplication
* reset_environment supertask contains 3 subtasks:
  base_reset_environment, remove_keys_task,
  remove_ironic_bootstrap_task
* names for tasks were changed
* response methods for remove_keys_task and
  remove_ironic_bootstrap_task were added to receiver
* _restore_pending_changes method was add only for
  reset_environment_resp
* migration for adding new transaction names and appropriate
  test were added
* test for check task message was added

Change-Id: Ib8a215174431486316bca533797932e02969c037
Closes-Bug: #1541868
2017-01-12 17:24:02 +04:00
Vladimir Sharshov (warpc) d6e6f03e5b Do not move task status to running after ack
Astute will send 'running' status for task
when start to process it, so we do not need
task in orchestrator mechanism.

Change-Id: I5e2deccdbd27daff3e3b131ef9c8c7ffbbb40dd4
Closes-Bug: #1621003
2016-09-13 11:23:18 +00:00
Jenkins 23783c6faf Merge "Fix deployment history summary" 2016-09-06 13:42:05 +00:00
Anastasiia Guzikova 4c00df3652 Fix deployment history summary
Closes-bug: #1618945
Change-Id: I9683e733901cc22d6ef69b09d51a00726c803c40
2016-09-05 21:02:43 +03:00
Bulat Gaifullin 559a3b3931 Fixed dead-locks and race conditions in tasks execution
Also imporved detecting dead-locks in chains, instead
of card-coded chains use generic approach - collect
knowledge about chains and check a new one against
knowledge base.

Change-Id: Ie1549c14d95a372a341e1e6e616226f8ee226a03
Partial-Bug: 1618852
2016-09-05 17:46:36 +03:00
Bulat Gaifullin f01af6274f Fixed dead-lock durring deletion of obsolete task
Also fixed raice condition in deploy_resp

Change-Id: I9eeff20ac0c052b2bab8e888fe8420af2f49bbe4
Partial-Bug: 1615557
2016-08-30 19:05:02 +03: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
Bulat Gaifullin d20f65be7b Fixed actions on transaction comletion
- update cluster status
- register notifications
- recursivly update all sub-transaction statuses on error

Change-Id: I4783a7b0ef81eaec8c06bb7c736082570a7096d2
Blueprint: graph-concept-extension
2016-08-24 10:59:54 +00:00
Bulat Gaifullin 55d20c1119
Implement Transaction Manager
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
2016-08-19 23:41:14 +03:00
slava f48e82737d Skip dhcp_check report if no mac of server is present
Change-Id: Id23f9e9761f80b6e61d3c1cf52f3c7595deb3e11
Closes-Bug: #1597199
2016-07-12 15:59:02 +00:00
tivaliy 9670b3a156 Make more strict notification about deleted environment
Deleting empty environment leads to an inaccurate notification
message "Environment 'xxx' and all its nodes are deleted".
Now notification message looks like as follows:
"Environment 'xxx' is deleted"

Change-Id: I827686e15120e8548aba0e9fb430d38f08285650
Closes-Bug: 1589864
2016-06-26 13:33:27 +03:00
Jenkins 058d9e42a1 Merge "Handle exception when comparing of MACs fails in check_dhcp_resp" 2016-06-20 16:33:34 +00:00
Jenkins 57378129e9 Merge "Move UpdateDnsmasq task to network manager extension" 2016-06-20 16:33:23 +00:00
Artem Roma 51690232de Handle exception when comparing of MACs fails in check_dhcp_resp
In case MAC's value is empty string comparing utils.is_same_mac fails
with ValueError exception which may leads to responses from other nodes not
being processed. We need to properly handle such situation.

Change-Id: I8843f9eabd139222ac326fdc26a43f5702ba751b
Related-Bug: #1569339
Related-Bug: #1569325
2016-06-14 12:15:02 +03:00
Artem Roma 5e5e7284cf Consider status of check_dhcp for each node
DHCP check task may fail on particular node from given set. In this case
data for that node will contain information about status of the
operation and particular causes of the error (if supplied by dhcp
checker itself). In such situation the task must be set to error status
despite results from other nodes.

Change-Id: I7dddbf727c31264596e5de6e169b09b2c0cfe20e
Closes-Bug: #1569339
2016-06-13 13:04:00 +03:00
Jenkins 095fc570ed Merge "remove zabbix from nailgun" 2016-06-08 10:29:25 +00:00
Ryan Moe 153d9ca1c9 Move UpdateDnsmasq task to network manager extension
This change introduces a new callback on_nodegroup_delete
which is called when a nodegroup is deleted.

It also adds a decorator that can be used to generate
before and after callbacks for any method.

Change-Id: Ia1c4ef3956175af6c223af854c9543cd781e8dbf
Blueprint: network-manager-extension
2016-06-06 15:05:56 -07:00
Jenkins 8a6a0dcb61 Merge "Allow a user to run dry-run deployment" 2016-05-31 10:28:18 +00:00
Jenkins 74500381be Merge "Data model changes for Plugin NIC, BOND and Node attributes" 2016-05-31 09:09:52 +00:00
Dmitry Guryanov ecf39c0afc remove zabbix from nailgun
Zabbix has been removed from Fuel 7 and is not supported for 3 releases.
It's time to make cleanup and remove its code.

Closes-Bug: #1583990
Change-Id: I7393caebc629fcf652369b98731455abe8a2c378
2016-05-31 06:28:20 +00: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
Andriy Popovych 9d86b078cf Data model changes for Plugin NIC, BOND and Node attributes
This patch:
  * extends current DB model with new entities and provides
    related migrations.
  * extends plugin sync method to support storing new plugins
    attributes.
  * provides cosmetic fix for ClusterPlugin model. Lets write table
    names in the plural but model names in the singular.

Change-Id: I3edbde1d48461ce3fab7c93f17e2db5332b1f7fb
Implements: blueprint nics-and-nodes-attributes-via-plugin
2016-05-30 13:16:45 +03:00
Fedor Zhadaev 6e70446363 Fix messages for stop_deployment task
Add custom messages for provisioning-only and deployment-only modes

Change-Id: I325134a63c06170204fac48b439c0b545acf3ed3
Closes-Bug: #1581465
2016-05-24 13:35:48 +00:00
Julia Varlamova a2070c5ac1 Fix message with wrong number of removed nodes
Take into account inaccessible nodes that were removed from Nailgun DB as well.

Change-Id: I8bc86910ed70329df2053f06235d5b2f6af8dc22
Closes-bug: #1527571
2016-05-13 14:44:01 +03:00
Vladimir Sharshov (warpc) f5dd8c43ed Flush DB must be run after all changes for nodes and histories
Also add tests for state transition

Change-Id: I4b3f63de0c96aebb3ca09e57a62b06895694b09d
Related-Bug: #1564295
2016-04-26 19:46:25 +03:00
Jenkins 52461071b6 Merge "Fix duplicated messages about plugins deployment" 2016-04-26 15:19:59 +00:00
Ryan Moe 297652e562 Move remaining nailgun.network files to extension
Network checker, connectivity check, network template,
and utils files were moved into the network manager extension.

Change-Id: I2f7f192ebbc6e9b1902e03c2a65ffaf46df5348e
Blueprint: network-manager-extension
2016-04-20 16:12:17 +03:00
Jenkins 650aa71bd7 Merge "Replacing improper map usage." 2016-04-19 13:54:19 +00:00
Julia Varlamova 21c78b64e6 Fix duplicated messages about plugins deployment
Provide message about plugins deployment only after successful deployment,
not in case of successfull provision.

Change-Id: Ic66ad2fc46397ddefb6db948672b88de7219a9ad
Closes-bug: 1532804
2016-04-15 10:33:42 +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
Jenkins b6cd6f5087 Merge "Revert "Remove unnecessary cast to string from 'verify_networks_resp's code"" 2016-04-12 13:18:46 +00:00
Igor Kalnitsky 006cd3f1ce Revert "Remove unnecessary cast to string from 'verify_networks_resp's code"
Unfortunately, `task.cache['args']['nodes']` contains nodes with integer-based UIDs, not string based. Hence, sets with UIDs are considered completely different and we consider all nodes are unreachable. That results to mistakingly setting "error" to "verify_network" task.

This reverts commit 8a0b8af085.

Change-Id: Ie43bb2017021821b0342eef28e9ec4bd3542d22f
Closes-Bug: #1569140
2016-04-12 12:37:28 +00:00
Jenkins 160e9ff8f4 Merge "Remove unnecessary cast to string from 'verify_networks_resp's code" 2016-04-11 15:36:49 +00:00
Jenkins 25e632c1bf Merge "Skip network verification for bonds in round robin mode" 2016-04-11 15:36:21 +00:00
Artem Roma 8a0b8af085 Remove unnecessary cast to string from 'verify_networks_resp's code
The change doesn't introduce significant impact on the method's logic
and pertains to small cosmetic refactoring activity, hence is not bound
to particular bug or blueprint.

Change-Id: I86879cbde6345099abda1a743bfaed63ffb43e89
2016-04-11 16:12:00 +03:00
Artem Roma 5c3ed6ef0f Skip network verification for bonds in round robin mode
Bond interfaces with 'balance-rr' mode are now skipped by network
verification task for bootstrap nodes as network checker does not
support this type of bonding.

Change-Id: I39b2c5916fd6f39548af0e41d8e7f877983f73a2
Closes-Bug: #1546520
2016-04-11 14:44:26 +03:00
Jenkins acbb737005 Merge "Py3 support: Replace .iteritems() with six.iteritems()" 2016-04-11 10:08:42 +00:00
Alexander Saprykin 94524207a8 Py3 support: Replace .iteritems() with six.iteritems()
Change-Id: Ia37f12aa5b7f5b52c0a469df035a135927b3af8f
2016-04-07 15:40:56 +02:00
Krzysztof Szukiełojć 3faacd560f Patch for deletion tasks on cluster deletion
Removing argument hard from objects.Task.delete
as there is hard delete method in objects.Transaction
Aligning cluster_deletion task to delete.

Change-Id: I2762bb8959b5577fcef5af5643cb1592d44a4dab
2016-04-06 12:55:45 +02:00
Jenkins e9d6680359 Merge "Don't set cluster in cluster deletion task" 2016-04-06 10:23:21 +00: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
Vladimir Sharshov (warpc) c450548297 Fix false warn message about node id in provision action
Change-Id: I26627f196d08aa31085527ed39b9686de3bf9590
Closes-Bug: #1564563
2016-03-31 22:01:40 +03:00
Vladimir Sharshov (warpc) 48a42a860b Introduce new history API
API url: `/api/transactions/<id>/deployment_history`

This change proposes to store all the information about
particular deployment tasks ever executed for each
particular cluster.

Change-Id: I73010a713ab8592418eb59bb133a427ac4c4a665
Implements: blueprint store-deployment-tasks-history
2016-03-25 20:06:29 +03:00
Vladimir Sharshov (warpc) a7cab8077d Gracefully stop for task based deployment
Introduce new node status: stopped, which used for nodes,
where orchestrator was successfully gracefully stopped task
deployment. This status will be able node redeploy.

Also introduced new type of node error_type: stop_deployment
It will be used if gracefully stop on node will be failed
for example, because of timeout. It will be apply automatically
by recevier for nodes in deploying status
if orchestrator return error for stop deployment task

Change-Id: I30d606d7d11d670d1a68ee90b01b932c1543fccc
Implements: blueprint graceful-stop-restart-deployment
2016-03-02 16:20:30 +03:00
Bulat Gaifullin bef4d84603 Fixed misleading provision task message
In case if not all nodes are provisioned/deployed  message will be
shows message that only part of nodes in expected state, otherwise
shows that whole cluster in expected state.
Also fixed calculating status of task is based on all nodes from cluster,
now only affected nodes are used to calculate task status.
Also fixed truncate of stack on exception handling in fake tasks

Change-Id: Icdb36e2e6a732becbb48d02b5c087922ecb3b7a8
Closes-Bug: 1542196
2016-02-19 17:56:34 +03:00
Valentin Kaplov 65301813c0 Moved checking repository availability to astute tasks
Checking repositories on availability is long task.
Http request can timeouts, while the task running.
Decided to move checking from http request context to
astute task, which running asynchronously.

Depends-On: I76ed1f0b6413cc94c539d795bbba92f8e9dad50b
Depends-On: I0ccf42fd7ff05d68aa4a4aee426c1c8bfa4daea4
Closes-Bug: #1540346

Change-Id: Iff76af0b0a6573f0f8f779fda4333a3658cccc04
2016-02-08 13:12:32 +03:00
Artem Roma 31b3dbb7ae Add logging setup for receiverd and assassind
Since all services inside containers are now started via systemd we need
add logging handling which in past was done by supervisord. Thus such
settings are added for rpc receiver and assassin services. Loggers are
set up independently from nailgun root logger as writing to files are
required for mentioned components.

Change-Id: I21136108d426531f572940dfc9f75fe153111d41
Partial-Bug: #1523476
2016-01-28 18:54:34 +02:00