23 Commits

Author SHA1 Message Date
Steve Kowalik
8881ed4378 Remove deprecated amqp1 options
The amqp1 options allow_insecure_options, username and password are all
deprecated, remove them. allow_insecure_options was deprecated during
Ocata, and the other two were deprecated in 5.22.0, released during
Pike.

Change-Id: I321266c3dba83a38fe6ebd775db2e74c14cc96cd
2018-09-05 16:59:13 +10:00
Kenneth Giusti
263dce9ea8 Add support for virtual hosts
Adds the 'pseudo_vhost' option which when enabled will incorporate the
virtual host into the address semantics.  This creates a 'subnet' like
address space for each virtual host.  Use this when the messaging bus
does not provide virtual hosting support.  It is enabled by default as
to date none of the supported AMQP 1.0 message buses natively support
virtual hosting.

It also updates SSL support: SSL can either use the connection
hostname or the vhost name when validating a server's
certificate. This is controlled by the 'ssl_verify_vhost' option.
This option is disabled by default as it requires both vhost and SNI
support from the server.  By default SSL will use the DNS name from
the TransportURL.

Change-Id: I49bb99d1b19e8e7e6fded76198da92ca5f7d65ab
Closes-Bug: #1700835
Partial-Bug: #1706987
2017-07-28 16:37:26 -04:00
Kenneth Giusti
3b53605bad [AMQP 1.0] Add default SASL realm setting
Change-Id: I2ac680bb9b594f0493dfb6d52c3f40bf5282dec7
Closes-Bug: 1681927
2017-04-13 13:46:11 -04:00
Jenkins
094f5076f2 Merge "Deprecate username/password config options in favor of TRANSPORT_URL" 2017-04-13 14:43:58 +00:00
Juan Antonio Osorio Robles
bf1cdafd03 Add "ssl" option for amqp driver
This uses the underlying x-ssl option that will attempt an SSL
connection to the server using the system's CA bundle.

Change-Id: I73f3b43b4ebc0c4ce4c0ba43b5a84361fb308686
2017-04-03 17:23:17 +03:00
ChangBo Guo(gcb)
878d9583d9 Deprecate username/password config options in favor of TRANSPORT_URL
The transport_url configuration value provides the username and
password, making the AMQP 1.0 driver's configuration instances of
username and password redundant.

Change-Id: If87d3efe616847625c5ab1329c61f1ad4c421a16
Closes-Bug: #1663721
2017-03-24 17:01:30 +08:00
Kenneth Giusti
53ead5c11d [AMQP 1.0] Fix SSL client authentication
The driver incorrectly set up SSL client authentication.  This patch
fixes the configuration. Unit tests added.

Change-Id: I64b1736f5a708c70013d9fedba73da4fa8d9ccfb
Closes-Bug: #1606985
2017-01-13 11:52:06 -05:00
Kenneth Giusti
9fab0bdbc8 [AMQP 1.0] Resend messages that are released or modified
A message ack status of 'RELEASED' or 'MODIFIED' indicates that the
message was not accepted by the destination due to some temporary
issue.  These status are used to indicate to the sender that the
message can be safely re-transmitted without risk of duplication
(i.e. the delivery is not 'in-doubt').  For example this may happen
during a message bus topology update if a message is sent before the
topology stabilizes.

This change implements re-send for these cases.

Closes-Bug: #1646586
Change-Id: I419e23b59e3eb90fda3f1c0e7ddf54ef98870e4b
2017-01-09 09:30:57 -05:00
Andrew Smith
3c9c97603f Periodically purge sender link cache
Closes-Bug: 1640266
Change-Id: Id38b756792f8fb14803bc9ead69e1fc903b9eea5
2016-12-01 10:31:56 -05:00
Kenneth Giusti
03ef584218 cast() and RPC replies should not block waiting for endpoint to ack
This patch fixes cast() and RPC replies so they do not block the
caller once the messages have been written to the link.  In both of
these cases messages are sent "at most once" with best effort.

If a negative acknowledgment is received a warning is logged.

Change-Id: I84671c62544ec388421ecd0ccafc267c3c3d6087
Closes-Bug: #1630637
2016-10-06 13:11:14 -04:00
Luong Anh Tuan
4b1ac84e3f Remove default=None when set value in Config
By default oslo.cfg sets the default values as None [1], There is
no need to explicitly do this.

[1] https://github.com/openstack/oslo.config/blob/master/oslo_config/cfg.py#L829

Change-Id: I032f1044ab96b04f0ea1f66762a832c305280522
2016-09-28 00:37:41 +00:00
Kenneth Giusti
6c973dae22 [AMQP 1.0] Make the default settlement behavior configurable
This patch allows the ack processing behavior to be configured based
on the type of message sent.  This allows the proper ack behavior for
a given backend to be customized. By default Cast messages are now
sent pre-acked (best effort).

Change-Id: I0d4e44a7a87f3c917a3eb44f6e02af74a9af10a5
Closes-Bug: #1616612
2016-08-24 15:56:51 -04:00
Kenneth Giusti
39c3901b8c Merge remote-tracking branch 'origin/master' into resync-to-master
Change-Id: Id59697351a2f5d00d8e145e95bfe6e7a919b86f2
2016-08-17 09:30:09 -04:00
Jenkins
ba387dfd1c Merge "[AMQP 1.0] small fixes to improve timer scalability" into feature/amqp-dispatch-router 2016-08-17 05:49:40 +00:00
Jenkins
5d5596a43d Merge "[AMQP 1.0] Add link credit configuration options" into feature/amqp-dispatch-router 2016-08-16 01:01:01 +00:00
Kenneth Giusti
b7717e1616 [AMQP 1.0] small fixes to improve timer scalability
This patch introduces the following tweaks to the timer
implementation:

Reduce the number of timers that need to be tracked by reducing the
timer granularity to units of seconds.

Decrease the default timeout values to further reduce the total number
of tracked timers.

Batch multiple expiring events that share the same deadline.

Inline the timer comparison code in the main event loop.

Avoid using an expensive comparison method in the heap sort by using
an integer primitive instead.

Use monotonic time instead of time.time()

Change-Id: I83e86bf203e6a641085e482c7ccf0e01f4fb4d86
2016-08-15 13:30:37 -04:00
Kenneth Giusti
480cd78157 [AMQP 1.0] Add link credit configuration options
Change-Id: Ifd483dfc67a4ff18f2047dbdca0aab311124627f
Closes-Bug: 1367911
2016-08-03 14:28:24 -04:00
Kenneth Giusti
5236e99155 Remove the max_send_retries option
This option was added for feature parity with the rabbitmq driver.
Since then the option was removed from rabbitmq.  Since this option
was never released we can simply remove it rather than deprecating it.

Change-Id: Ic10dd374c865eaf7c7563f379426e171996184a0
Closes-Bug: #1599518
2016-08-01 11:19:06 -04:00
Andrew Smith
ded89418a2 [AMQP 1.0] Add configuration parameters for send message deadline
This patch add driver configuration option parameters for oslo_messaging_amqp
reply, send and notification timeout. These timeouts are used when the caller
does not provide a timeout expiry.

Change-Id: I398a4686abf3df6e5c802d94d6bda7ba9995833d
Depends-On: I6b60b6944a4c44da9b2e41ab2a83ab59f15e396e
Closes-Bug: #1596641
2016-07-07 08:55:04 -04:00
Kenneth Giusti
4c0674d194 Re-factor the AMQP 1.0 addressing semantics
This patch introduces a new routable addressing format.  This new
address format not only works with traditional broker-based messaging
backends but can be used to optimally route messages across a mesh
messaging topology.  This new addressing format may be enabled either
via configuration or by message bus identification.

This patch moves all of the AMQP 1.0 addressing logic into a new
Addresser class.  This class is used to map an oslo.messaging Target
address and notification flag into a corresponding AMQP 1.0
message/subscription address based on the addressing mode.  This hides
the addressing details from the rest of the driver.

For backward compatibility with previous releases the Addresser can be
configured to automatically detect a non-routable messaging back end
and fall back to using the legacy addressing scheme.

The intention is to use routable addressing as the only form of
addressing supported by the driver regardless of messaging back end.
However before that can happen the legacy addressing must follow the
standard deprecation process.  Until then legacy addressing will
remain available for backwards compatibility.

Change-Id: I6b60b6944a4c44da9b2e41ab2a83ab59f15e396e
2016-07-06 10:28:19 -04:00
ChangBo Guo(gcb)
61aae0ffac Config: no need to set default=None
By default oslo.cfg sets the default value as None. There is no
need to explicitly do this.

TrivialFix

Change-Id: I57fa9651ea56a180a910d6cbf7b7f385da8af239
2016-06-28 15:47:39 +08:00
Kenneth Giusti
890ce0e543 Refactor link management to support link recovery
This refactors the driver to process send/subscribe requests as they
arrive from the application rather than blocking these requests until
the reply link is activated.  This allows recoverable failures
occurring at the connection or link level to be applied to the sender
retry count.  This patch also implements link re-connect for
subscriptions.

These changes are required to support a brokerless routed mesh
backend.

Change-Id: I14606de55e2e94d03d865fefe8c8c2327207ba5c
Closes-Bug: #1434540
2016-06-13 11:15:13 -04: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