rabbitmq and openstack: what’s new! suse became the ... · options =...

22
RabbitMQ and OpenStack: what’s new! OpenInfra Day - Rome 3 Oct 2019 Gabriele Santomaggio @gsantomaggio SUSE became the largest independent company in the open source market

Upload: others

Post on 13-Aug-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

RabbitMQ and OpenStack: what’s new!OpenInfra Day - Rome 3 Oct 2019

Gabriele Santomaggio @gsantomaggio

SUSE became the largest independent company in the open source market

Page 2: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

About me..

● Senior software developer @SUSE● Part of Oslo-Messaging core team

○ issues/features for RabbitMQ ● RabbitMQ Member/Supporter● Co-Author of RabbitMQ cookbook● RabbitMQ on Kubernetes

RabbitMQ and OpenStack

Page 3: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

Agenda

● Quick introduction● What’s new in OpenStack - Oslo Messaging● Demo● What’s new in RabbitMQ 3.8● Live view

RabbitMQ and OpenStack

Page 4: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

OpenStack - Messaging systems

OpenStack can use different messaging system, RabbitMQ is one of the most used.

Core component

RabbitMQ and OpenStack - Introduction

Page 5: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

OpenStack and DRP calls

RabbitMQ and OpenStack - Introduction

Module-Client sends a message/command and waits

Message ended up to one queue

Module-Server executes the operations

reply_xxxx queue

RabbitMQ

Reply within

timeoutotherwise raise

timeout error

Send- timeout

Operations

OK or Error

Page 6: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

Messaging LibraryThe OpenStack messaging library is Oslo-Messaging[1]

RabbitMQ and OpenStack - Introduction

1-https://github.com/openstack/oslo.messaging

Page 7: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

RabbitMQ and Messages without destinations...

RabbitMQ and OpenStack - What’s new in Oslo-Messaging

Producer exchange queue(2)

RabbitMQ

RabbitMQ does not raise any callback/error (unless the Mandatory Flag is set)

Page 8: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

RabbitMQ and Messages without destinations...

How does OpenStack handle this case?

RabbitMQ and OpenStack - What’s new in Oslo-Messaging

It does not!

Until now..

Page 9: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

Transport Options (10.2.0) [1]

● Add custom parameters to the drivers[1]● Currently used only in RabbitMQ driver

○ Mandatory Flag (for unroutable messages)● Add new error (MessageUndeliverable)

RabbitMQ and OpenStack - What’s new in Oslo-Messaging

1-https://blueprints.launchpad.net/oslo.messaging/+spec/transport-options

Page 10: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

The codeoptions = oslo_messaging.TransportOptions(at_least_once=True)

client = oslo_messaging.RPCClient(transport, target, transport_options=options)

// at_least_once will be translated in Mandatory Flag in RabbitMQ

RabbitMQ and OpenStack - What’s new in Oslo-Messaging

Page 11: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

Demo

RabbitMQ and OpenStack - Introduction

Module-Client sends a message/command and waits

Message ended up to one queue

Module-Server executes the operations

reply_xxxx queue

RabbitMQ

Send- timeout

MessagingTimeout: Timed out waiting for a reply to message ID MessageUndeliverable error

Page 12: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

RPC TimeOut "/usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 318, in wait message = self.waiters.get(msg_id, timeout=timeout) File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 223, in get 'to message ID %s' % msg_id)

MessagingTimeout: Timed out waiting for a reply to message ID

RabbitMQ and OpenStack - What’s new in Oslo-Messaging

Application Error, nothing to do with RabbitMQ

Page 13: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

Problem Heartbeat

“Too many heartbeats missed”

RabbitMQ and OpenStack - What’s new in Oslo-Messaging

Page 14: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

Heartbeat improvement

● Run heartbeat in a native thread[1]● “Too many heartbeats missed”● Still experimental

RabbitMQ and OpenStack - What’s new in Oslo-Messaging

1-https://github.com/openstack/oslo.messaging/blob/master/oslo_messaging/_drivers/impl_rabbit.py#L475

Page 15: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

Fixed bug in SSL module [1] (9.5.0)

● Too many heartbeats missed● MessagingTimeout: Timed out waiting for a

reply to message ID● Modules crash - memory allocation● Credit to SUSE :)

RabbitMQ and OpenStack - What’s new in Oslo-Messaging

1-+bug/1800957

Page 16: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

● What’s new in RabbitMQ

Second part

RabbitMQ and OpenStack - What’s new in RabbitMQ

Page 17: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

● Quorum Queues● Observability● Single Active Consumer● Feature Flags

RabbitMQ 3.8

RabbitMQ and OpenStack - What’s new in RabbitMQ

Page 18: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

● Implement RAFT protocol (consensus algorithm)● No ring topology, parallel replication● More stable in case of failures

Quorum Queues [1]

RabbitMQ and OpenStack - What’s new in RabbitMQ

1-https://www.rabbitmq.com/quorum-queues.html

Page 19: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

● New metrics for Erlang● Unroutable messages● Built-in Prometheus support (Grafana templates)

Observability

RabbitMQ and OpenStack - What’s new in RabbitMQ

Page 20: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

● https://github.com/rabbitmq/rabbitmq-prometheus ● Easy to deploy in K8s● Easy to integrate prometheus

Native prometheus plugin

RabbitMQ and OpenStack - What’s new in RabbitMQ

Page 21: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

RabbitMQ Grafana Overview

RabbitMQ Grafana Erlang

RabbitMQ Grafana RAFT

Live View

RabbitMQ and OpenStack - What’s new in RabbitMQ

Page 22: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)

@gsantomaggio