Commit Graph

23 Commits

Author SHA1 Message Date
Ching Kuo bdbb6d62ee Add Support For oslo.metrics
This commit added support to send rpc metrics to oslo.metrics.

Changes includes:
- Adding client wrapper for oslo.metrics to process metrics information
  and send to oslo.metrics socket
- Modify rpc client to send metric when certain rpc events happens

For more information on oslo.metrics
https://opendev.org/openstack/oslo.metrics

Change-Id: Idf8cc0e52ced1f697ac4048655eff4c956fd5c79
2021-06-08 22:22:37 +08:00
Arnaud Morin 82492442f3 Add a ping endpoint to RPC dispatcher
The purpose of this patch is to add an endpoint directly in RPC
dispatcher, so this endpoint will always be available, in a cross
project manner, without the need for projects to manage it by themself.

This endpoint stay disabled by default, so this change is harmless
without a specific configuration option.

To enable this ping endpoint, an operator will just have to add a new
parameter in the [DEFAULT] section, alongside with rpc_response_timeout
[DEFAULT]
rpc_ping_enabled=true  # default is false

The purpose of this new endpoint is to help operators do a RPC call (a
ping) toward a specific RPC callback (e.g. a nova-compute, or a
neutron-agent).
This is helping a lot for monitoring agents (for example, if agents are
deployed in a kubernetes pod).

The endpoint is named oslo_rpc_server_ping.

Change-Id: I51cf67e060f240e6eb82260e70a057fe599f9063
Signed-off-by: Arnaud Morin <arnaud.morin@corp.ovh.com>
2020-08-18 15:09:29 +02:00
ZhijunWei cb902e5aff Update hacking version
update the hacking to latest, duo to[1]

[1]: https://github.com/openstack/oslo.messaging/blob/master/HACKING.rst

Change-Id: I1ee7387272690f0de0d7b1937d7c2b0ee404063c
2019-01-21 19:45:42 -05:00
Kenneth Giusti 9ca7359bfd Allow transport_url initialization in ConfFixture constructor
Change-Id: Ibe2a5277cdcf89cd006507f13eddbbec4b384681
2018-10-09 13:46:00 -04:00
Steve Kowalik d3f6ca0b47 Remove rpc_backend and ConfFixture.transport_driver
Now that most projects have transitioned from using
ConfFixture.transport_driver, we can remove it and rpc_backend as a
whole. rpc_backend was first deprecated in 5.10.0, released during
Ocata.

Closes-Bug: #1712399
Change-Id: I193cc0e613459a6dbbfd54ed0901a54ded78d712
2018-09-13 15:01:27 -06:00
Andy Smith f2fd8d4375 Remove the deprecated ZeroMQ driver
Users of the oslo.messaging RPC communications service must use
the rabbit ("rabbit://...") or AMQP 1.0 ("amqp://...") drivers.

Change-Id: If3474142f1fe99d41d7b4466061ed0e23ca38549
Closes-Bug: 1789259
2018-08-28 16:00:50 -04:00
Steve Kowalik 93280347ab Correct usage of transport_url in example
The example usage of transport_url in ConfFixture was not corrected when
the rest of the code was switched to using 'fake:/' for transport_url.
Since other projects will refer to this example to review changes, it
should be correct.

Also change the transport URLs used in test_transport to correspond to
the correct way of specifying virtual hosts.

Change-Id: If8e0a869e02fda2d8d2c86d82ef83ffc3a4361e4
2018-06-06 10:48:45 +10:00
Steve Kowalik 7e4ca449a0 Add ConfFixture.transport_url
As the first step towards removing rpc_backend, we need all of the test
fixtures to stop setting/using it via ConfFixture.transport_driver. Add
ConfFixture.transport_url, and move the tests over to setting it rather
than transport_driver.

Partial-Bug: #1712399
Change-Id: I6e2ae2b511fdc52790d5755a9aecaf2f427ab706
2018-06-01 11:45:12 +10:00
ChangBo Guo(gcb) 4af9127cb6 Remove usage of parameter enforce_type
We deprecate and change parameter enforce_type's default value
to True[1], so don't need usage enforce_type.

[1] https://review.openstack.org/328692

Change-Id: Ib89cb9bc8afa13e13350e80ec9210ab9e878201f
2017-04-11 14:32:53 +08:00
Oleksii Zamiatin f61f0c1c1b [zmq] Redis unavailability is not critical
Each time driver couldn't update from Redis
warning message is being logged and work continues
with cached targets state and on existing connections.

Change-Id: I459532f1f60fab1d4c9926e02cdc3c3c6a162047
Closes-Bug: #1610958
2016-08-16 11:29:59 +03:00
Oleksii Zamiatin 7c5d039fd3 Move zmq driver options into its own group
ZeroMQ driver options are current stored into the DEFAULT group.
This change makes the zmq configuration clearer by putting its
options into oslo_messaging_zmq group.

Change-Id: Ia00fda005b1664750d2646f8c82ebdf295b156fb
Closes-bug: #1417040
Co-Authored-By: Oleksii Zamiatin <ozamiatin@mirantis.com>
2016-08-05 11:36:50 +03:00
Mehdi Abaakouk 865bfec975 tests: rabbitmq failover tests
This leverages the pifpaf library to exercice
rabbitmq failover.

Change-Id: Ic6acc5d006344e08c219724e488fc9222786d849
2016-07-04 00:24:13 +00:00
Kenneth Giusti e72a8d5bc4 Reorganize the AMQP 1.0 driver source files
This patch simply moves the existing AMQP 1.0 driver files into a
directory layout that is consistent with the other drivers.  The
driver unit tests are also moved to the proper test directory. There
are no changes in driver functionality or API.

Change-Id: I83a5d5433be8c3b317597100af69192ec5be81f1
Closes-Bug: #1579823
2016-05-13 14:04:37 -04:00
Javeme ca6c34ac71 make enforce_type=True in CONF.set_override
Each config option has limitation for type and value. If we use
method CONF.set_override without parameter enforce_type=True, we
may pass wrong type to config option.

This commit makes sure calling method CONF.set_override with
enforce_type=True.

Change-Id: I1430c93777d6e5d98086a8700663ab9f58c1e5ab
Closes-Bug: #1517839
2016-01-08 13:32:03 +08:00
Davanum Srinivas 74a0ec8b1c setUp/tearDown decorator for set/clear override
Problem with recursion shows up only in full runs
of Nova for example. So split the code that sets
up the decorator and add a method to cleanup
the decorated set_override during teardown.

Also add a decorator for clear_override similar to
the one for set_override.

Added more tests for all the above.

Change-Id: Ib16af2e770e96d971aef7f5c5d48ffd781477cfe
2015-12-03 11:13:35 +00:00
Davanum Srinivas b6ad95e1ca Support older notifications set_override keys
Neutron and Ceilometer use set_override to set
the older deprecated key. We should support them
using the ConfFixture

Closes-Bug: #1521776
Change-Id: I2bd77284f80bc4525f062f313b1ec74f2b54b395
2015-12-02 14:05:02 +00:00
Davanum Srinivas 33c1010c32 Option group for notifications
In change Ief6f95ea906bfd95b3218a930c9db5d8a764beb9, we 
decoupled RPC and Notifications a bit. We should take another
step and separate out the options for notifications into 
its own group.

Change-Id: Ib51e2839f9035d0cc0e3f459939d9f9003a8c810
2015-11-30 19:30:05 +00:00
Flavio Percoco 925eb734a9 Remove qpidd's driver from the tree
Back in liberty we marked this driver as deprecated. This patch removes
it from the tree. The patch also removes tests, options and other
references in the documentation. Note that one script is being kept
because it's required by the amqp driver.

Depends-On: If4b1773334e424d1f4a4e112bd1f10aca62682a9
Change-Id: I4a9cba314c4a2f24307504fa7b5427424268b114
2015-11-20 18:43:28 +00:00
Kenneth Giusti 4efd89f7c2 AMQP 1.0: Properly initialize AMQP 1.0 configuration options
This patch adds AMQP 1.0 configuration options to the ConfFixture
class.

Change-Id: I01e7113358967939f22d6bc452b03e80101c9814
Closes-Bug: #1503299
2015-10-06 12:07:04 -04:00
Victor Sergeyev 9e4831c022 ZMQ: Initial matchmaker implementation
This patch replaces the old outdated matchmakers and replace it into the
new ones.

Call/Cast test_specific_server() functional tests passes now.

Change-Id: I8635396110d30d26812f39b242fbbabd1a0feaaa
2015-07-16 09:23:46 +00:00
Mehdi Abaakouk 80ece65a54 Don't use devstack to setup our functional env
This adds a setup script for each tox functional target to start a
rabbitmq-server, qpidd or redis daemon dedicated for the functional
testing.

This script is responsible to spawn a preconfigured daemon needed for
the functional tests.

This also changes the gate script to just install the required packages
instead of setup a devstack.

This also fixes the zmq config options loading in tests

Closes-bug: #1442612

Change-Id: I27eb2c1d3d0ca67aa361c83e41372138e03d9bdd
2015-06-11 12:01:01 +02:00
Mehdi Abaakouk 824313ac9c Move each drivers options into its own group
All drivers options are current stored into the DEFAULT group.
This change makes the configuration clearer by putting driver options
into a group named oslo_messaging_<driver>.

Closes-bug: #1417040
Change-Id: I96a9682afe7eb0caf1fbf47bbb0291833aec245b
2015-02-02 10:58:54 +01:00
Doug Hellmann e55a83e832 Move files out of the namespace package
Move the public API out of oslo.messaging to oslo_messaging. Retain
the ability to import from the old namespace package for backwards
compatibility for this release cycle.

bp/drop-namespace-packages

Co-authored-by: Mehdi Abaakouk <mehdi.abaakouk@enovance.com>
Change-Id: Ia562010c152a214f1c0fed767c82022c7c2c52e7
2015-01-12 12:50:41 -05:00