Commit Graph

31 Commits

Author SHA1 Message Date
Andreas Jaeger 9eccf4fe21 Retire cue
Cue has been retired in mid 2016 as official project and did not
continue developement, it's time to retire it completely.

Remove everything, update README.

Depends-On: https://review.openstack.org/551202
Change-Id: I1f4a71fbea8a90303036ad0adaec95fa15b6522f
2018-03-09 09:40:09 +01:00
Victor Stinner 069507f0c4 Finish the Python 3 port
with this change, all unit and functional tests pass on Python 3.4.

* WSGI middleware: on Python 3, decode the error message from UTF-8.
* Replace json.dumps() with jsonutils.dump_as_bytes() of
  oslo_serialization to get bytes on Python 3.
* monitor_service.py, test_monitor.py: Fix usage of tooz, pass byte
  strings to the coordinator API.
* Fix nova and neutron fixtures: replace dict.values() with
  list(dict.values()) to get list on Python 3.
* Fix urllib2_fixture: On Python 3, replace urllib2 with
  urllib.request.
* test_create_cluster.py: don't sort exception types, but use a set
  instead to compare them. On Python 3, comparison between exception
  types now raises a TypeError.
* test_wsme_objects.py: catch also TypeError on wsme validation. On
  Python 3, comparison between the new attribute value and the
  minimum raises a TypeError which is not wrapped into a
  InvalidInput exception of wsme. See also the change
  I74103330ccb5cdc26aa3508fcefcc34310e00c27 which proposes to wrap
  TypeError.
* install_rabbit.sh.tmpl: replace dict.iteritems() with dict.items().
* Replace generator.next() with next(generator).
* Replace reduce() with six.moves.reduce()
* Replace "str is 'URLError'" test with "str == 'URLError'", using is
  to compare strings is not reliable.

Change-Id: I45e23b71218f5ff936b0fd1bd628f29210f984bb
2016-04-12 19:01:07 +02:00
Victor Stinner c244f07461 Fix imports on Python 3
On Python 3, imports are absolute by default.

Because of these invalid imports, tests don't run anymore on
Python 3, since tests cannot be loaded.

Change-Id: Ib11a09432939df959568de400f60dfe981d0a403
2016-03-04 19:34:08 +00:00
LiuNanke 46f054ae9c Remove unused logging import in Cue
these codes are not useful.

Change-Id: I00b50e41734a5ec1b53890562f1d894e34dc6526
Closes-bug: #1529541
2016-01-07 00:33:35 +08:00
pongubal 6d1bc2ab06 Abort VM Status flow when VM(s) go to ERROR state
While waiting for VMs to go ACTIVE during the create cluster flow,
if one or more VMs go into ERROR state the VM check task continues
until it times out. If one or more VM(s) go into ERROR state, the flow
should be abort instead of waiting for that VM to go into ACTIVE state.

Change-Id: I9e3768c5a55803afe05f75fad41ecf74471b4694
Closes-Bug: 1522633
2016-01-05 14:06:20 -08:00
Min Pae 13493f7cef validate network information during cluster create
Change-Id: I466173ac7f8a8f91db51ccbdbaa437b37a9d0ad4
Closes-Bug: 1466609
2015-12-22 16:31:05 +00:00
Abitha Palaniappan ea1462af37 Adding anti-affinity for broker cluster nodes
* Also cleanup in create cluster flow constructions since this patch
updates that file.

Change-Id: Idc4436078b905425c3c91ef0b3ec950d08797410
2015-11-23 23:25:13 +00:00
dagnello 1be4288070 Adding support for error details on cluster creation
Cue's current implementation does not provide any additional information
to the user related to why a cluster went into ERROR state during
cluster creation.  This patch adds error_detail field in the
clusters table and exposes this field through the API.  The
update_cluster_task now extracts failure flow details and forwards this
information on cluster record update.

Partial-Bug:  1508730
(updates also required to Cue client and dashboard)
Closes-bug:  1516735
Change-Id: I440fec30bc3d051189585479b8d2c1219a98cf40
2015-11-19 13:51:44 -08:00
Steve Leon db76fd5617 Making cue python3 compatible
Change-Id: I91dff7128a5a7a6df575827aa58001d8ff0e8817
2015-11-12 14:17:29 -08:00
Daniel Allegood fe9f3767fb Check RabbitMQ cluster status via REST API during cluster create
This is replacing the TaskFlow task to check when a rabbit node begins to
respond to port 5672.  We now use rabbits management plugin and REST API
to check when the cluster is active and able to consume jobs. The new task
is added at the end of the create_cluster flow.  This is (arbitrarily) going
to the 0th node's RabbitMQ Management port.

Change-Id: I9dffdefd9cdcd6317f5c3114c59b4b30b8218239
2015-08-14 18:33:57 -07:00
dagnello 04761d3444 Delete Cluster Bug
closes-bug: 1469823

Change-Id: If3a6b861dcecd6cf0169dea4264226b076139dd8
2015-07-30 17:15:04 +00:00
dagnello 0dc7db6e80 Deleting VM ports on cluster delete flow
- modified delete port task to take a list of ports and delete all
  specified ports as well as taking a single port
- delete port task also does not throw an exception upon failure to
  delete a port, it instead logs a warning
- modified delete cluster flow to retrieve a list of ports for a VM and
  attempt to delete each port after deleting the VM

Change-Id: Ib311b23fdf3a58bc4b79257ed412e9d53d039013
closes-bug: 1448140
2015-06-04 14:28:47 -07:00
Min Pae 21ef0c6677 provisioning rabbitmq via userdata/cloud-init
- changed create cluster flows from a combination of unordered and
  linear flows to a graph flow
- added userdata generation step to create userdata to be used by
  each VM
- added check_or_restart_rabbitmq, to check rabbitmq status a
  number of times then restart the VM, before checking again

Change-Id: I98f2aa031ccd7e8bb068fa4cece3dd8af263e33e
2015-03-11 17:55:35 -07:00
Min Pae 85c84945c8 added security group to create cluster call
- Added a configuration item, os_security_group, to api to allow
  a default security group to be specified
- Added tests to test_create_vm to verify invalid security group
  results in a failure
- Modified nova fixture to check for security_groups in vm create
- Modified neutron create port to include security_groups
- Modified devstack plugin to create a security group for rabbitmq

Change-Id: Ib8490b15b0e90812d630d237cc4fcc8d0c8a4f9a
2015-03-10 14:59:46 -07:00
dagnello ad828d83ab Migrate Cue Policy to new Oslo_Policy Package
Change-Id: I201e1f9c2315fd593830420c44968bb31d169b97
Closes-Bug: 1430097
2015-03-10 11:48:28 -07:00
dagnello 36ee474588 Implementing Dynamic Delete Flow
* Adding dynamic delete flow tests

Change-Id: I233c521b2289e760653ebca3df037a3db3f365af
2015-02-28 09:58:48 -08:00
dagnello caaa83929c Implementation for cluster update
This patch is adding cluster/node update functionality to the
    cluster create flow.

    * Get VM status task
    * Get RabbitMQ status task
    * Added update status functions for Node and Cluster DB objects
    * Added get node by id function in objects model
    * cluster status update in objects class to DB
    * node status update in objects class to DB
    * Get VM status task unit tests
    * Get RabbitMQ status task unit tests
    * Update cluster status task unit tests
    * Updated existing tasks and create cluster flow tests for DB support
    * Updated existing tests and test fixtures for matched behavior
      with devstack clients and their mocked versions

Change-Id: I7b07e1a179b9b5e64218db9c64417d72be02cac9
2015-02-26 21:09:14 -08:00
Jenkins 9abdf8692f Merge "added delete neutron port task" 2015-02-27 00:55:36 +00:00
Min Pae 2a05c3ec50 added delete neutron port task
- Added delete neutron port task and related unit tests
- Modified neutron fixture to throw an exception when requested to
  remove a non-existent port, to mimic python-neutronclient's
  behavior

Change-Id: Id8da6d95ea2c1d544b3e0d65b43a222f62a18ea7
2015-02-24 17:39:49 -08:00
Min Pae 787c815e91 cleaning up references to cue.openstack.common.log
oslo_log is out of the incubator, so changing references in cue code to
logging module from cue.openstack.common.log to oslo_log.log

Change-Id: I1f70c2ede50b0fbf36fabd6e6cc53c03f8f1d3f4
2015-02-23 13:16:32 -08:00
Min Pae e7ce65c1be added dynamic cluster create flow
- added create_cluster_node flow factory function for creating a
  cluster node
- modified create_cluster flow factory function to call
  create_cluster_node for each cluster node
- modified neutron and nova fixtures to support testing for
  cluster create flow

Change-Id: I92aae38d71baeca9a84385813180703bbb9c2ece
2015-02-19 14:17:00 -08:00
Min Pae 089c73d556 adding nova.get_vm task
Adding nova.get_vm task to retrieve VM information

Change-Id: Id6dc05f274438f934a8baeaa2991bd76541bf6d1
2015-02-15 17:20:38 -08:00
Min Pae 4aef254997 adding Map and Reduce task and simplifying Lambda
- adding Map and Reduce tasks to mimic the map and reduce builtin
  functions

- modified Lambda task to no longer require a 'require' parameter,
  instead using the functor's argument list to specify required
  parameters to the Task

Change-Id: I048c5777028ffeb175b273ebc60396e65c614187
2015-02-14 16:31:02 -08:00
Jenkins 413d2c12be Merge "Add lambda task and complete implementation of assert task" 2015-02-14 00:15:25 +00:00
Min Pae 23caabd7a0 add create_vm task
- Add os_tasklib.nova.create_vm task for creating new VMs via nova
- Modified nova and neutron fixtures to persist more information
  about networks, flavors, and images.

Change-Id: I25a54eea44b6a24b46c98992d4699b5dd3455ca6
2015-02-13 15:52:41 -08:00
Jenkins 48369e0c92 Merge "Post Jobs - Integrate API with Backend (TaskFlow)" 2015-02-13 22:02:59 +00:00
dagnello bf069a9485 Post Jobs - Integrate API with Backend (TaskFlow)
* Connected create cluster and delete cluster functionality
* Updated existing API tests to mock-out taskflow client
* Added tests for job posting from API to jobboard (TaskFlow)

Change-Id: I59a61b250db84d2782e21393ea3a856c426541fc
2015-02-13 11:39:42 -08:00
Min Pae 13c78bbbd9 Add lambda task and complete implementation of assert task
Add lambda task and complete implementation on assert task, both of
which take functions as constructor arguments, to be run at task
execute time against arguments supplied during execute time.  Lambda
task is for applying functions to generate new, transformed, and/or
consolidated outputs/data.  Assert task is for applying a
function/predicate on input data and assert the truth value of the
function/predicate's result.

Change-Id: Ib8a0a956011f00899e8bf8eea957655e9cffce97
2015-02-13 11:31:50 -08:00
dagnello 90628ad709 Added implementation for Delete Node Task
* added unit tests for delete node task
* updated BaseFixture class for unit test mocking to accept either
  a string to class to mock or class type directly
* added mock code for nova client create vm, list vms and delete vm

Change-Id: I7ad9e29a2ce1c4e73efc6dce84146537731cc87b
2015-02-12 16:23:40 -08:00
Vipul Sabhaya 35d8d42738 Adding Create Port Functionality for Cue Backend using TaskFlow
* Create port uses neutron client
* Added unit tests for new functionality

* Added a neutron test fixture

Change-Id: Ia0f5d35d317726cd3ad22e4c5e1a34ae9eb65ddc
2015-01-29 22:05:37 -08:00
Min Pae 912d1e0772 adding taskflow support with initial workflow
- Adding taskflow support
- Added initial workflow for create cluster

Change-Id: I21ca51f50f8d983ab787c9435cfd0d576c3ed7a2
2015-01-23 14:35:59 -08:00