4319 Commits

Author SHA1 Message Date
liu-sheng
c00f2c0723 Drop the downgrade function of migration scripts
We stopped supporting downgrade of OpenStack, so drop the downgrade
function of migration scripts.

Change-Id: I785a19c312488eca531ffc2c4f4401562a283324
Closes-Bug: #1434103
2015-08-12 00:44:32 +00:00
gordon chung
a27643a75f start rpc deprecation
we switch to work queues in Juno and made it the default rather
than rpc. the main advantage of using RPC is it offers callback
functionality at the expense of performance. we don't need callback
for our use cases so it's best to stop supporting rpc and leave just
udp and queues in our collector.

Change-Id: Ia02421ae09cdf27998ce76a99170100f36595f71
Related-Bug: #1479820
2015-08-11 14:44:00 -04:00
gordon chung
ab3812a0a2 support multiple-meter payloads
some payloads (ie. CADF) may contain multiple meters per payload.
we need to support ability to loop through meters and process them
individually.

this patch adds support for gathering a list of meters with
consistent schema. a multi attribute is added to denote which fields
are jsonpath and could return multiple values. currently, this
supports looping across multiple meters of the same resource only.

Implements: blueprint declarative-notifications
Change-Id: I94ff536e2563d4c740a8514f814316474dc58e87
2015-08-11 13:13:57 -04:00
gordon chung
ca1f65bcb1 add poll history to avoid duplicate samples
this is a patch until we properly separate polling logic. this
patch adds history so if a resource is defined in separate pipelines
it will only be processed in one. by doing this, we send only a
single copy of each sample and it can be processed appropriately
by the notification agent

this removes duplication check as it is covered by poll history and
removes the pipeline references in polling.

Change-Id: I9c1d3e25740fff5281d796c7bfea2f0e105bb5c5
Closes-Bug: #1480442
2015-08-11 12:18:58 -04:00
Jenkins
5edd2b4825 Merge "api: fix alarm deletion and update" 2015-08-11 15:19:24 +00:00
Jenkins
b6af38032c Merge "Correct thread handling in TranslationHook" 2015-08-11 10:54:04 +00:00
Jenkins
d93568130b Merge "Revert "Revert "remove instance:<flavor> meter""" 2015-08-11 10:22:39 +00:00
Jenkins
782266401c Merge "initialise opencontrail client in tests" 2015-08-11 09:20:22 +00:00
liu-sheng
9c209f8d53 Add Kilo release note reference
The Kilo release note reference is missing in doc.

Change-Id: Ia47f160220135b19f277592218835a5ea8808325
2015-08-11 09:44:57 +08:00
Jenkins
9815d941f4 Merge "Updated from global requirements" 2015-08-11 01:16:35 +00:00
gordon chung
cd55858aa9 initialise opencontrail client in tests
similar patch as Ib0674c93c8e41ab610fb799470a99fa427dfd14f but for
opencontrail

Change-Id: I4462e5c2f56490a5a0f5b5a96b7abe376d70998a
Related-Bug: #1482740
2015-08-10 17:32:59 -04:00
Chris Dent
00aa6cec3e Make ConnectionRetryTest more reliable
The previous test relied on mocks of retrying.time.sleep. This is
the same sleep as time.sleep so there's a chance, if eventlet is in
context, that something else can call that.

So instead the test now checks to see how many times should_reject
is called. This is the same as the max retries that will be
attempted.

Also the retry wait time has been set to something very small so the
test doesn't hang around sleeping uselessly, making test runs
faster.

Change-Id: Ib15d4d6f8dd23ba534d58005da5dc64aad9e0e90
Closes-Bug: #1482722
2015-08-10 09:57:57 +01:00
Chris Dent
8290bdea6d Correct thread handling in TranslationHook
TranslationHook was using a threading.local() to store an error
message however the threading.local() was being created in __init__
of the Hook. Hooks are not per request, so this wasn't really
working as planned.

Now, instead of using threading.local() at all, we just modify the
environ held by pecan (and later used by the
ParsableErrorMiddleware). environ is request-local.

This change feels a bit crufty because it is but because of the way
Exceptions are managed in the app there's not really any good way to do
it. We could consider changing the way Exceptions related to error
messages, but that would be a very large change.

Duplicated from similar change in aodh:
I463059df28f291cea0644b1a9908a907f146ba1f

Change-Id: Ie561ec7ee7ec8b6d4a535ba7b20569b5a1101878
Closes-Bug: #1481244
2015-08-10 09:52:28 +01:00
OpenStack Proposal Bot
5ef30843d0 Updated from global requirements
Change-Id: I0478ad08a21540e5e6410f7074c97fd7ca0dc0cf
2015-08-10 01:04:58 +00:00
Jenkins
a68448b975 Merge "Don't start up mongodb for unit test coverage" 2015-08-08 15:36:05 +00:00
Chris Dent
59d1a602da Correctly intialized olso config fixture for TestClientHTTPBasicAuth
Otherwise it can fail intermittently when run with other tests or
consistently when run in isolation.

Change-Id: Ib0674c93c8e41ab610fb799470a99fa427dfd14f
Closes-Bug: #1482740
2015-08-07 18:52:12 +00:00
Chris Dent
81fbcb6999 Don't start up mongodb for unit test coverage
If we are just doing the unit tests we don't need mongodb to be
started.

Change-Id: I84bf886fbab5cbca92f09f569b1ee0f2958a0af3
2015-08-07 18:32:21 +00:00
Jenkins
4793854931 Merge "Cast Int64 values to float" 2015-08-07 17:20:03 +00:00
Jenkins
74d7c39923 Merge "Convert identity, sahara and volume to meters yaml" 2015-08-07 14:11:44 +00:00
Jenkins
02a10d6735 Merge "Enable entry points for new declarative meters" 2015-08-07 14:11:20 +00:00
gordon chung
5a7cd95596 disable non-metric meter definitions
this patch adds support for disable_non_metric_meters option.
depending on option, meter definitions where volume=1 will either
be skipped or loaded.

Change-Id: Ia84313785ea27d684ff0ddd221e3162f3155ad88
2015-08-07 11:56:09 +00:00
Igor Degtiarov
c2a42bc906 Cast Int64 values to float
Currently MongoDB and HBase return integer values from samples and statistics,
but wsme expected a float type.
In this CR MongoDB and HBase statistics and sample values cast to float.

Change-Id: I97ccf8f8cd10e065ebd80ccbe1a688bf8d722b2f
Closes-Bug: #1474031
2015-08-07 11:50:13 +03:00
Pradeep Kilambi
201b3ef522 Convert identity, sahara and volume to meters yaml
Change-Id: Ica102ab3a003f4a7d84ad435c00993d5d81db767
2015-08-07 08:30:33 +00:00
Pradeep Kilambi
94b3d40cea Enable entry points for new declarative meters
Include the new entry point for meters notifications
and deprecate the migrated ones. Also add the exchange
controls to the notification agent directly.

As a first step, this commit converts glance, magnetodb
and orchestration meters.

Partially Implements: blueprint declarative-notifications

Depends-On: I9de94c5ac6349c3b46adbacb77fc877b5201285c

Change-Id: I45ea9ab20bbed1ec12b91a20977e8adb52bf59da
2015-08-07 08:28:00 +00:00
Rohit Jaiswal
833385f846 Fix for rgw still throwing errors
When raising the PollsterPermanentError,
the list of resources(tenants) are passed,
which enables the Agent Manager to blacklist
those resources. This stops those resources
from being polled again and avoids any unwanted
error messages from being logged.

Change-Id: I4f7bf23d5d7f3c182e4089d80b03a1587fa31222
Closes-Bug: #1475441
2015-08-06 16:39:24 +00:00
Jenkins
ece5275fce Merge "Fixes the kafka publisher" 2015-08-06 15:08:18 +00:00
Jenkins
ef11de2834 Merge "Imported Translations from Transifex" 2015-08-06 15:06:36 +00:00
gordon chung
3ec58ba18e group pollsters by interval
there was a regression in code which led to discrete polling tasks
being created per pipeline. while logical, this meant that the cache
between tasks with same interval never got shared and therefore
duplicate calls were made.

Change-Id: I72876f61a73f4ca2f4ca48aebb1489ce7ebb702e
Related-Bug: #1480442
2015-08-06 07:49:54 -04:00
gordon chung
23114ce5d6 Revert "Revert "remove instance:<flavor> meter""
This reverts commit 2fb046fb6682ceadc82acdbfd3d708ac23fe9fa2.

Change-Id: Ic16a39fb541d16ed944afcfb4a2209b81e3e82d4
2015-08-06 07:44:14 -04:00
Jenkins
392fc100f4 Merge "Sync devstack plugin with devstack:lib/ceilometer" 2015-08-06 11:34:45 +00:00
Jenkins
da4de7e97f Merge "Drop out-of-time-sequence rate of change samples" 2015-08-06 11:22:40 +00:00
Jenkins
f97b536736 Merge "integration: use the right user in gate" 2015-08-06 10:45:23 +00:00
Mehdi Abaakouk
74c393a827 api: fix alarm deletion and update
The API allow the actions to be null.

This allow the alarm to be deleted and updated in this case.

Backported from:

b40b4513e6

Closes bug: #1479274

Change-Id: Id29ede93951e9d21bf5e6416955ae096a1259d72
2015-08-06 11:53:52 +02:00
Mehdi Abaakouk
fb0601a90d Fixes the kafka publisher
The kafka publusher is not concurrency safe at all.
And the sample/event payload cannot be serialized correctly

To fix that:
* the code now is shared with the messaging one.
* the connection to kafka is done before sending messaging to not touch
  the queue
* use jsonutils to serialize samples

Change-Id: I3fb731d2eb33cbfba38c5165ce9874af89072e34
Closes-bug: #1479976
2015-08-06 11:53:11 +02:00
Chris Dent
7b2376068f Sync devstack plugin with devstack:lib/ceilometer
While the removal of ceilometer from core devstack is still pending
we need to make sure that change in lib/ceilometer are reflected in
the plugin. This synchronizes the small number of recent changes.
We're nearly there on the extractions so there shouldn't be too much
more of this.

Change-Id: I8c99d57ba5183d3c63b4814ca0664d5bf3420832
2015-08-06 09:27:32 +00:00
Mehdi Abaakouk
4bc36baf4d integration: use the right user in gate
This change uses the correct user to work in gate.
It also fixes the condition that checks if we run in gate or not.

Change-Id: I0240bf64275a599b899a097a6e55c57f78f361df
2015-08-06 08:31:54 +00:00
OpenStack Proposal Bot
090e40fe96 Imported Translations from Transifex
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I79a2664546088c7901c89d9d46f6e46f5565911f
2015-08-06 06:33:47 +00:00
Ilya Tyaptin
49f53f35a5 Initial separating unit and functional tests
Currently we run tests which uses real backend or real daemons with
other unit tests.
This CR is initial for sequence of functional tests implementation.
It contains only moving files and modules to right directories and
fixing tox.ini. This approach allows to avoid constantly rebase conflicts,
because git handles file removing correct.

Next step - separate classes and functions from moved files to right
test types.

Depends-On: Ifdb0de150b2c738117308b2aae6c0c197e162821

Change-Id: I16b84ed83ac075658626f3ec6a35a24e228b61e7
Partialy-Implement: blueprint ceilometer-functional-tests
2015-08-06 07:59:45 +03:00
Jenkins
e16c0ddd9d Merge "Stop using openstack.common from keystoneclient" 2015-08-05 22:06:55 +00:00
Jenkins
558710cf68 Merge "Corrected unit of snmp based harware disk and memory meters" 2015-08-05 16:00:50 +00:00
Jenkins
6ddee05da8 Merge "gnocchi: retry with a new token on 401" 2015-08-05 10:55:02 +00:00
Julien Danjou
08825e46db Stop using openstack.common from keystoneclient
They switched away from it.

Change-Id: Iea7fd67d764443dfb6e7192ab3dff475bc2e3095
Closes-Bug: #1481501
2015-08-05 10:43:40 +02:00
Jenkins
c8709ce435 Merge "Fix some gabbi tests" 2015-08-04 20:50:23 +00:00
Jenkins
e5a1072345 Merge "Updated from global requirements" 2015-08-04 20:43:47 +00:00
Jenkins
de71be0bf5 Merge "minimise scope of hmac mocking" 2015-08-04 19:39:07 +00:00
gordon chung
12695cf4ae minimise scope of hmac mocking
we minimise it by deleting the test. the method itself is tested
to ensure empty secret is processed accordingly so the
coverage is already there.

Change-Id: I9a3f2530cfbeb1e3a6f768da2c098f9cca92b20b
Closes-Bug: #1481149
2015-08-04 10:24:03 -04:00
OpenStack Proposal Bot
9d2660b7d3 Updated from global requirements
Change-Id: I2a72f2680a9442e2be4d8b128edae2811290588b
2015-08-04 14:20:59 +00:00
Jenkins
3cb034ffa7 Merge "[MongoDB] Refactor indexes for meter and resources" 2015-08-04 13:43:25 +00:00
Mehdi Abaakouk
aa67c96b68 gnocchi: retry with a new token on 401
The gnocchi dispatcher just bail out on any unexpected Gnocchi HTTP code.

This change moves all Gnocchi API and HTTP stuffs in the gnocchi_client
module.
And improves the handling of 401 error code to retry requests when the
authentication fail, usualy because the token have expired.

Change-Id: I9d7e29337de2cb480c64af03032dcf9fa2a3829c
2015-08-03 17:07:23 +02:00
Jenkins
ce3bef075a Merge "mongo: fix last python3 bugs" 2015-08-03 14:54:34 +00:00