* https://review.openstack.org/#/c/530454/ moves the
monasca_log_api tempest plugin to monasca tempest plugin
Let's consume it.
* Moved contrib to root folder and removed dummy pre_test_hook.sh
Change-Id: I1a73fdf0d10045326dc9ca09fd1c9b485a420089
Community has set a community wide goal
in Pike cycle: "Control Plane API endpoints deployment via WSGI" [1].
monasca-log-api is already capable of being deployed under mod-wsgi but
not under uwsgi. This commits enables that feature. Until Queens release
API will hence support:
* gunicorn
* mod_wsgi (remove in Queens)
* uwsgi (preffered)
Refs:
[1]:
https://governance.openstack.org/tc/goals/pike/deploy-api-in-wsgi.html
Story: 2001464
Task: 6180
Change-Id: Ie4a94c9c2e166915c3f4a1783dc3527f4eb62f29
Currently mod_wsgi returns the following error:
Target WSGI script '/var/www/monasca-log-api/monasca_log_api'
does not contain WSGI application 'application'.
Also fix a type in README.
Change-Id: Ic70c3ddb8aaa076c09fc2434f6e890be24b599d5
Depending on the actual server in which monasca-log-api
is running, the error code for empty body may differ.
For example, for mod_wsgi the error code is 411,
but, on the other hand, gunicorn (devstack's setup)
returns 422. Since the actual error code is not that important,
simply accept all of them.
Change-Id: I6ab160148863f38b08172eee430ebce4c3e9e04d
Added proper handling of unicode messages by expiclit
usage of unicode and utf-8 encoding for Python2.
For Python3 it was just sufficient to ensure that message
is properly UTF-8 encoded. Results of that change can be examined
inside Kibana (or using link [2]).
To prevent any regression, a set of unicode messages has been
added. It contains:
* 'Unicode is evil...' sentence translated to several languages
* border conditions of UnicodeStressTest [1]
* some funnier examples just because programming is fun
Extra:
* unified setting up API test case
[1]: http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt
[2]: https://pasteboard.co/x9gQqicR.png
Story: 2001084
Task: 4734
Change-Id: I36e3c2f1ea5788ecb19089089d84924b7d6666bf
Function 'tempest.test.attr()' has moved to 'tempest.lib.decorators
.attr()' in Pike and will be removed in a future version[1].
This patch replaces the 'tempest.test.attr()' with the 'tempest.lib
.decorators.attr().'
[1] Iaafbb112b6eee458089cc49918359a8a8d0485e2
Change-Id: Ia9bf03fab71066a5fe8d7653fc62a0918e347136
Adjusted log-api devstack configuration
to works with uwsgi deployed keystone.
It is done by removing custom pieces
of configuration regarding keystone
communication and replacing that with
devstack utilities wherever it is possible.
Summary:
* using configure_auth_token_middleware for log-api
configuraton file
* removed custom tempest.conf
* using devstack/openrc to generate environmental
variables OS_ containing necessary details for tempest.conf
Extra:
* moved kibana_version into monitoring group
Story: 2000995
Task: 4183
Depends-On: I22686d05670fc6c947611f8044dea498239a4212
Change-Id: Ia95b3bef2734d639c6fec57484b60bc5377d659f
test.call_until_true has been deprecated since Newton on Tempest side,
and now Tempest provides test_utils.call_until_true as the stable
library method. So this patch switches to use the stable method before
removing old test.call_until_true on Tempest side.
Change-Id: Idfbd20c31246ec884ad10f9fce42816ce5f15bf3
The Tempest Manager class must have changed and the service
argument apparently no longer exists. Instead, it was being set
as the scope which caused the catalog to not be retrieved
See-also: If934bac4e2cd833fe4e381c373218383354969ec
Change-Id: I43c023e91eb93e2c19096b0de812eabf7b2db62c
* sending 'None' as a request body implies header
'Content-Length: 0', but the test was expecting
no header.
* invalid parameters were passed to call_until_true
Depends-On: Icce74fd6d7e674f408277e328468bedbc3d0aa6b
Change-Id: Ia4fc7cdec0a38d0b46aadfedd6cc9919edaa1963
Following change allows to run monasca-log-api
devstack plugin on the Xenial environment.
That was implemented with the help of:
* start/stop of processes handles through run_process
and stop_process & no services files
* setting up environment using devstack functions
** monasca-log-api virtual env (USE_VENV)
** installing monasca-log-api dependencies from git
** saving data in keystone catalog with Openstack CLI
Additionally added method that downloads tarballs
only if they are not found in the system.
Change-Id: I08b2ddbe17b2c7899056a63a5633070ae9a2c2db
If message that is about to be sent to kafka exceeds maximum allowed size
(i.e. log_publisher.max_message_size), log's message being part of
it is truncated by the difference between maximum and current size.
With this message can be still sent to kafka instead of being
dropped.
Change-Id: Ide1d369a0f58efb3a56b22c47118d2aa062fdc09
Change includes:
- modification to use newest Tempest version
- modification of using new Kibana
- modification of using ElasticSearch queries
Change-Id: I616d21900501c0d3ebd88176e4f589039f032636
Received request's content should be validated if
its size does not exceed allowed value. Bytes refers
to byte size of the object instead of amount
of characters. This change is required in order
to reject those meesages that couldn't be processed
by Kafka queue.
Changed:
- added payload size validation to Python
- added validation of message size that it sent to Kafka
- reworked validation of message size in Java
Change-Id: I2acc647550d7c851a5715a7cf44f749db1f54d7b