Commit Graph

190 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
bathri.s e2e1372c9b Node resources should not be exposed
Change-Id: I49a4835c2186c0b439abdfb12d2ca86fea29e235
Closes-Bug: #1441919
2016-06-06 18:32:28 +00:00
Min Pae 8ccb914277 fix for taskflow, py34, and image-build
updated taskflow related code to use newest version of taskflow

it seems like filtering logic in monitor_service does not work in py34,
changing to more verbose code that seem to work in both py27 and py34

rabbitmq-image build is broken and causing verification gates to fail,
applying fixes to get build to work and also updating to remove some
dependencies on tripleo-image-elements

Change-Id: Ic5fac635fa9f1ebdc6cb7498370c701de8172766
2016-06-04 19:54:16 -07: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
Michael Krotscheck 98bd25c584 Moved CORS middleware configuration into oslo-config-generator
The default values needed for cue's implementation of cors
middleware have been moved from paste.ini into the configuration
hooks provided by oslo.config. Furthermore, these values have been
added to the default initialization procedure. This ensures
that if a value remains unset in the configuration file, it will
fallback to using sane defaults. It also ensures that an operator
modifying the configuration will be presented with that same
set of defaults.

Change-Id: Ia179bbd7489ca128186990439a161903b7b4c28d
Closes-Bug: 1551836
2016-03-11 13:11:03 -08:00
Abitha Palaniappan 5d4550122d Validate cluster flavor with image metadata
cue cluster creation fails if the flavor disk size is too small
for the broker image.this fix validates the flavor disk size with
image metadata ,raising the exception from api instead of nova.

Change-Id: I18330c66cddf527d5fddfdbc29656e0313b04e16
2016-03-04 19:34:31 +00:00
Swapnil Kulkarni (coolsvap) 76e97efa29 Use assertTrue/False instead of assertEqual(T/F)
The usage of assertEqual(True/False, ***) should be changed
to a meaningful format of assertTrue/False(***).

Change-Id: Ibc6da6ddf0966da2441711a0460ca837209ae274
Closes-Bug:#1512207
2016-01-13 22:54:40 +00:00
Abitha Palaniappan d7168f57ce Adding support to cleanup taskflow job details
zookeeper runs out of heap space as the data we save to it
never gets deleted.this patch allows us to enable a flag in cue-config
to remove taskflow jobdetails from zookeeper/persistence backend.

Closes-Bug: 1514559

Change-Id: I64e72a7f4c917ec076a6d22c20e5aa6d91f6f75d
2016-01-08 15:01:02 -08:00
Jenkins 3866e6065d Merge "Add enforce_type=True in CONF.set_override" 2016-01-06 23:41:11 +00:00
Jenkins 0d0e5e6cd6 Merge "Trivial: Remove useless return from files in Cue" 2016-01-06 21:51:51 +00:00
Jenkins 2494ec4f0d Merge "Remove unused logging import in Cue" 2016-01-06 21:33:46 +00:00
Jenkins de267f5758 Merge "Use keystoneauth instead of keystoneclient" 2016-01-06 19:28:26 +00:00
LiuNanke 2154861bd9 Add enforce_type=True in CONF.set_override
Each config option has limitation for type and value.
In production code, oslo.conf can ensure user's input
is valid, but in unit test, test methods can pass if
we use method CONF.set_override without parameter
enforce_type=True even we pass wrong type or wrong
value to config option. This commit makes sure calling
method CONF.set_override with enforce_type=True.
Closes-bug: #1517839

Change-Id: I7a4e00c0eb6423d0826eb1c1b1e1ad3da786fb52
2016-01-07 02:45:02 +08:00
LiuNanke 758d871760 Trivial: Remove useless return from files in Cue
Change-Id: I35b8f230ecf9af5ae8901099702c84a4a0c931a4
2016-01-07 02:26:03 +08: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
Jenkins b9290138bf Merge "Abort VM Status flow when VM(s) go to ERROR state" 2016-01-06 01:07:51 +00: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
Bertrand Lallau 1df776e86e Use keystoneauth instead of keystoneclient
keystoneauth was split out last cycle as a library specifically to deal
with doing auth functions so that people who do not need to do keystone
CRUD operations can just consume only the auth session parts. As part
of modernizing keystone interactions, use keystoneauth instead of
keystoneclient.

Change-Id: Ief82837103450de209fcbbd92d8f4e898949fac4
2016-01-05 20:40:56 +01:00
Jenkins 200ffe2af1 Merge "py3: Get urllib modules from six.moves" 2016-01-04 19:40:46 +00:00
Victor Stinner 312dda7866 py3: Get urllib modules from six.moves
Replace urllib imports with six.moves.urllib to make modified code
compatible with Python 2 and Python 3.

This patch was generated by the urllib operation on the sixer tool.

The mock in cue.tests.functional.fixtures.urllib2_fixture is not
modified because it breaks functional tests on Python 2. It can be
fixed later.

Change-Id: Idd561fef168d234311a469c35f8672c518b90543
2016-01-04 12:23:39 +01:00
Michael Krotscheck ebb06fb49f Added CORS support to Cue
This adds the CORS support middleware to Cue, allowing a deployer
to optionally configure rules under which a javascript client may
break the single-origin policy and access the API directly.

For cue, the middleware was added directly to the application
factory, including various default headers usually required by
keystone. Note that the CORS middleware must be the first one in
the middleware chain, so that it can annotate all responses -
even error responses - generated by other middleware.

oslo_config initialization was added to the functional test
initialization, in order to ensure that a fully initialized
config instance is available during tests.

OpenStack CrossProject Spec:
   http://specs.openstack.org/openstack/openstack-specs/specs/cors-support.html
Oslo_Middleware Docs:
   http://docs.openstack.org/developer/oslo.middleware/cors.html
OpenStack Cloud Admin Guide:
   http://docs.openstack.org/admin-guide-cloud/cross_project_cors.html

Change-Id: I7ff60a96f545ff991de06073a80a5750512ebd31
2015-12-23 11:00:45 -08:00
Michael Krotscheck e283ffc208 Fix error: Starting cue with empty config_dir causes runtime error
This patch corrects an error encountered when starting the cue app
with an empty config_dir commandline parameter.

Change-Id: I38dea66677d61819d76fb8a0c4ddfd98352ee4bb
2015-12-23 17:57:13 +00:00
Saurabh Surana bbe9a3f651 monitor now uses objects layer to access db records
since we moved policy checks into the API layer, we
can now use objects layer to access db records from
cue monitor.

When objects layer was doing policy checks we couldn't use
object layer without a valid conext object, and since cue
monitor doesn't have a conext object earlier we couldn't
use objects layer in cue monitor.

Closes-Bug: 1517174
Change-Id: I1a66b1fd5e66a807498d69ceb0ac9748f6547e2b
2015-12-22 17:26:57 -05:00
Saurabh Surana 880a103778 policy checks are now being done in the api layer
API layer talks to object layer to get DB records, it then
uses that DB record and context object to perform policy checks
to determine if the necessary API request has required
authorization to access the REST endpoint/resource.

Modified tests to use new methods in API which are doing
policy checks.

Closes-Bug: 1517177
Depends-On: I385c161bc10d6a22c6b46fa19dc7c195ff222f8b

Change-Id: I767f59061cc9aa1df20bde0b1fe33d069e01d751
2015-12-22 17:26:54 -05:00
Jenkins 32a62eb42e Merge "validate network information during cluster create" 2015-12-22 19:35:56 +00:00
Jenkins ca52b5c759 Merge "Validate uuid parameters at api layer" 2015-12-22 18:48:48 +00: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 9ceb03bf18 Validate uuid parameters at api layer
Closes-Bug:1426103
Change-Id: I06ce0abf28dc60f70744b4e046dd20cbb27e73d3
2015-12-22 06:53:15 +00:00
Vipul Sabhaya 3e5a4276f5 Better loading of policy config files
Change-Id: I811c4a2b3985fb8163c6f58422369ae7208c471a
2015-12-22 06:52:02 +00:00
Jenkins 1b64ac8182 Merge "Renaming update_endpoints_task and update_node_task" 2015-11-24 21:33:25 +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 2362a630cc Renaming update_endpoints_task and update_node_task
Adding 'Record' to the name since these tasks are limited to updating
the respective Database records only.

Change-Id: I77c949d9282527f7b155a803ed8f18f869205f03
2015-11-23 11:12:49 -08: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
dagnello 1626115e23 Renaming cluster update task
Cluster update task updates a cluster record in general, the previous
name implied it was only updating cluster status.

Change-Id: I912d829926e52ba11668f933481b364299f50fcc
2015-11-19 10:54:06 -08:00
Victor Stinner 5ec5171fd7 py3: Replace unicode with six.text_type
* Replace unicode with six.text_type
* Replace (str, unicode) with six.string_types

This change makes modified code compatible with Python 3.

Move also imports in cue/api/controllers/v1/cluster.py to respect the
OpenStack coding style on imports.

The initial patch was generated by the unicode operation of the sixer
tool.

Change-Id: Ib53087f74d52fe60381e8cca2f0209d39f09e24d
2015-11-12 16:18:24 -08:00
Steve Leon db76fd5617 Making cue python3 compatible
Change-Id: I91dff7128a5a7a6df575827aa58001d8ff0e8817
2015-11-12 14:17:29 -08:00
Jenkins 8315683e53 Merge "Cue genconfig" 2015-11-11 19:24:30 +00:00
Michael Krotscheck 28519ccefe Cue genconfig
This updates tox -egenconfig to correctly generate configuration
files for the various components of cue. Included are list_opts
invocations for all places where configuration is found, appropriate
setup.cfg hooks for generic oslo-config-generator invocations, and
explicit genconfig configuration files for the monitor, worker, and api.

Sample configurations have been regenerated from source.

Change-Id: Ib838269b3ba1e81587cd984933edb41d6d6a555a
2015-10-29 12:01:36 -07:00
Abitha Palaniappan 800a09c7ed Fix for taskflow reduce error when monitoring cluster of size one
Closes-Bug:1510228
Change-Id: I2431c05dab7dcd2206157f83220a6752f74b9ec6
2015-10-28 22:00:27 -07:00
Vipul Sabhaya 3f21a7682d Allow endpoint_type to be configurable for Openstack services
Change-Id: Iac3a37c20bf9a6837cc00626d9e0bbf080ce49f7
2015-10-15 18:46:08 -07:00
Jenkins a050413430 Merge "fix for systemd based rabbitmq guest" 2015-10-12 17:22:32 +00:00
Jenkins c691985568 Merge "cue-monitor service" 2015-10-12 16:27:56 +00:00
Steve Leon d372f0125f fix for systemd based rabbitmq guest
Upstart seemed to be providing output from rabbitmqctl, which we
were depending on to tell whether rabbit was up, but systemd does
not do this. Changing the status check to use rabbitmqctl instead
so that status check works for both systemd and upstart.

Also moved the command to enable the management console to after
rabbitmq startup since the command was failing if rabbit was not
up.

Change-Id: I5f0c277a3201911b0bc998ff7f17d526dab6b33e
2015-10-12 15:35:42 +00:00
Jenkins f455fe04aa Merge "py3: Get StringIO from the six module" 2015-10-09 23:43:35 +00:00
Daniel Allegood 74124f363a cue-monitor service
Change-Id: I24aff0c016a06b26a8252e2b31ab7c7cfdde08db
2015-10-09 16:34:55 -07:00
Abitha Palaniappan 0597d3a8b6 Add cluster status check flow for cue-monitor
Change-Id: Ib564c77180a8d31461de5466edb23e20f2966861
2015-10-09 18:03:19 +00:00
Abitha Palaniappan c475b3b6a2 Add management_ip to node object
Change-Id: I17bed764b895fadd35c18599788f5763c55502d1
2015-10-09 11:02:44 -07:00
Daniel Allegood 700935db3f Code coverage fix and devstack fix
Checkin gates are failing (both coverage and integration/tempest)

Handling the case where testr fails by exiting and returning the
exit status. Newest 'coverage' package does not support 'ignore-errors'
in config section '[report]'.

Also updating devstack plugins/scripts to use updated keystone v3
compatible commands (openstack vs nova)

Change-Id: I06d4e1179f115220608bcb15bbcfccc96769e11e
2015-10-08 19:10:53 -07:00
Victor Stinner 21a02e6e2a py3: Get StringIO from the six module
Get StringIO from the six module to make modified code compatible
with Python 2 and Python 3.

Change-Id: Ie99a2b3cedf786ca04656a05bc827e0fc890aa8d
2015-09-29 22:17:39 +02:00
dagnello 9a4c86f627 Adding authentication support to API
Authentication field is used to provide broker credentials in
Cue create cluster requests.

This patch also includes:

- resolution to issue on retrieving base ubuntu image for build
  Cue's Rabbitmq image.

implements: blueprint custom-default-user
Change-Id: Icfeac617e82a4213277209990551120b8caf8530
2015-09-16 09:47:26 -07:00