Commit Graph

49431 Commits

Author SHA1 Message Date
Jean-Sébastien Pédron 46b8321bd9
Add support for $RABBITMQ_DEFAULT_{USER,PASS,VHOST} env vars
They are the equivalent of the `default_{user,pass,vhost}` configuration
settings. Each set environment variable will take precedence over its
configuration file counterpart.

Fixes docker-library/rabbitmq#508.
2021-08-11 15:50:40 +02:00
Jean-Sébastien Pédron 33c6cbf239
rabbit_env: Add $RABBITMQ_DEFAULT_{USER,PASS,VHOST} and $RABBITMQ_ERLANG_COOKIE vars
Those environment variables are unset by default. The default values are
set in the `rabbit` application environment and can be configured in the
configuration file. However, the environment variables will take
precedence over them respectively if they are set.
2021-08-11 15:50:36 +02:00
Jean-Sébastien Pédron 85d5db65d0
Merge pull request #3298 from rabbitmq/disable-logging-burst-limit-with-debug-level
Logging: Disable burst limit if the log level is set to `debug`
2021-08-11 15:49:51 +02:00
Alexey Lebedeff 1e8ba5bffc Use elixir itself to find its lib directory
This removes all the guesswork from the process. E.g. the old version
was not working with elixir from nixpkgs/NixOS.
2021-08-11 15:41:00 +02:00
Jean-Sébastien Pédron 2e955b0a50
Logging: Disable burst limit if the log level is set to `debug`
Otherwise, messages are being dropped, in particular during RabbitMQ
startup because of the amount of debug messages logged in that phase.

Burst limit is enabled again if the log level is set to `info` or
higher.
2021-08-11 15:32:39 +02:00
Gerhard Lazu 62d82e1660
Break down metrics by node in all RabbitMQ-Stream pie charts
Otherwise we won't be able to see which nodes are running "hot"

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-08-11 13:39:30 +01:00
Loïc Hoguin 8c019fb993
Merge pull request #3295 from rabbitmq/lh-test-dropwhile-restart-bug
Add tests for the regression introduced in #3041
2021-08-11 14:27:56 +02:00
Michael Klishin 5a7466181a
3.9.3 release notes 2021-08-11 13:54:25 +03:00
Michael Klishin 01f4c06e0a
3.8.21 release notes 2021-08-11 13:54:18 +03:00
Loïc Hoguin 24c25ab3cc
Add tests for the regression introduced in #3041 2021-08-11 12:50:04 +02:00
Michael Klishin 133e0ab72d
Manually apply rabbitmq/rabbitmq-website#1241 by @lushndm 2021-08-11 13:34:27 +03:00
Jean-Sébastien Pédron b81e46f049
Merge pull request #3280 from rabbitmq/do-not-report-stopping-state-to-systemd
Do not report stopping state to systemd
2021-08-10 15:34:32 +02:00
Jean-Sébastien Pédron 51cfa4eb96
rabbit_boot_state: Wrap boot_state() type definition line
... to fit in 80 columns.
2021-08-10 15:12:05 +02:00
Jean-Sébastien Pédron 5a96d18aa2
systemd: Enclose status description inside quotes
... in the log message.
2021-08-10 15:12:05 +02:00
Jean-Sébastien Pédron 23c71b254f
systemd: Do not report "stopping" state to systemd
The problem is we only know about the state of the `rabbit` Erlang
application — when it is started and stopped. But we can't know the fate
of the Erlang VM, except if `rabbit:stop_and_halt()` is called. This
function is not called if `init:stop()` or a SIGTERM are used for
instance.

systemd is interested in the state of the system process (the Erlang
VM), not what's happening inside. But inside, we have multiple
situations where the Erlang application is stopped, but not the Erlang
VM. For instance:

    * When clustering, the Erlang application is stopped before the
      cluster is created or expanded. The application is restarted once
      done. This is controled either manually or using the peer
      discovery plugins.

    * The `pause_minority` or `pause_if_all_down` partition strategies
      both stop the Erlang application for an indefinite period of time,
      but RabbitMQ as a service is still up (even though it is managing
      its own degraded mode and no connections are accepted).

In both cases, the service is still running from the system's service
manager's point of view.

As said above, we can never tell "the VM is being terminated" with
confidence. We can only know about the Erlang application itself.
Therefore, it is best to report the latter as a systemd state
description, but not reporting the "STOPPING=1" state at all. systemd
will figure out itself that the Erlang VM exited anyway.

Before this change, we were reporting the "STOPPING=1" state to systemd
every time the Elang application was stopped. The problem was that
systemd expected the system process (the Erlang VM) to exit within a
configured period of time (90 seconds by default) or report that's it's
ready again ("READY=1"). This issue remained unnoticed when the cluster
was created/expanded because it probably happened within that time
frame. However, it was reported with the partition healing strategies
because the partition might last longer than 90 seconds. When this
happened, the Erlang VM was killed (SIGKILL) and the service restarted.

References #3262.
Fixes #3289.
2021-08-10 15:12:01 +02:00
Jean-Sébastien Pédron 6cf22b1d28
Merge pull request #3283 from rabbitmq/use-colon-as-verbosity_map-separator
Logging: Use `:` as the separator in verbosity mapping
2021-08-10 15:08:29 +02:00
Jean-Sébastien Pédron 47e0a5fb4c
Logging: Use `:` as the separator in verbosity mapping
This is the same separator as the field mapping. I don't remember why I
picked a different character... Now, it feels awkward and non-intuitive
for users.
2021-08-10 14:26:27 +02:00
Jean-Sébastien Pédron bab59a71dd
Merge pull request #3282 from rabbitmq/use-integers-to-represent-Epoch-based-timestamps
Logging: Always represent Epoch-based timestamps as integers
2021-08-10 14:25:02 +02:00
Jean-Sébastien Pédron 29bab5935c
Logging: Always represent Epoch-based timestamps as integers
Before this change, seconds were represented as floats.
2021-08-10 13:33:52 +02:00
Jean-Sébastien Pédron c2ea12ba39
Merge pull request #3281 from rabbitmq/fix-epoch-timestamp-crash-in-json-logging
Logging: Fix crash when Epoch-based timestamps are used with JSON
2021-08-10 13:32:40 +02:00
Michael Klishin 5f7c79ff16
Merge pull request #3279 from rabbitmq/stream-coordinator-unlink
Unlink spawned processes once we're done
2021-08-10 13:54:42 +03:00
Jean-Sébastien Pédron 6c8cf4c510
Logging: Fix crash when Epoch-based timestamps are used with JSON
The code was passing a number (the timestamp) to
unicode:characters_to_binary/1 which expects an iolist to convert to
UTF-8.

We now verify if we have a number before calling that function. If this
is a number (integer or float), we keep it as is because JSON supports
that type.
2021-08-10 12:34:11 +02:00
dcorbacho de7028979e
Unlink spawned processes once we're done
`EXIT` messages captured by ra polute the log.
The link is only needed to ensure no orphan processes are left behind,
so they can be safely unlinked once the work is done.

Maybe resizing cluster coordinator does not require linking, only
phases are problematic when a coordinator is stopped
2021-08-10 13:22:18 +03:00
Michael Klishin 8c1183b0fd
Ditto in rabbitmq_stream_management 2021-08-10 12:16:54 +03:00
Michael Klishin ace3ee9cd9
Bump Java stream client used in tests 2021-08-10 11:32:57 +03:00
Michael Klishin 0b024f7421
3.8.20 release note edits 2021-08-10 02:52:41 +03:00
Michael Klishin 779dc013ac
Merge pull request #3284 from rabbitmq/mk-revert-3ef8587
Revert "CQ: don't deliver right before acking in the index"
2021-08-10 02:29:20 +03:00
Michael Klishin f4754eae43
3.9.x release notes edits 2021-08-10 01:52:23 +03:00
Michael Klishin 36ad3a5b3d
Revert "CQ: don't deliver right before acking in the index"
This reverts commit 3ef858746c.

This change does not handle expired messages safely.

See https://github.com/rabbitmq/rabbitmq-server/discussions/3272.
2021-08-10 01:33:32 +03:00
Gerhard Lazu b6d83dbb60
Drop header from 3.9.x release notes
We don't want to include the header in the GitHub releases, as we will
end up with two headers with the same value. Considering that we are
thinking of fully automating patch releases, this change helps with that
too. Small steps.

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-08-09 13:15:17 +01:00
Gerhard Lazu dfdce17a52
Fix line breaks and add extra info for release notes in 3.9.2
Mentioning the release-notes change is important, as we want to change
the way contributors (including us) make changes. Release notes should
be part of the change, and the reasoning behind it is in the 3.9.2
release notes.

Removing any mention of the Grafana dashboard as it is not something
that end-users will see. We didn't mention it in the 3.9.1 release
notes, and we are even thinking of removing all Grafana dashboards from
rabbitmq_prometheus. This explains why:
https://github.com/rabbitmq/release-engineering/issues/11#issuecomment-887627938

cc @michaelklishin

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-08-09 13:06:26 +01:00
Michael Klishin 414b021958
3.8.20 release notes update 2021-08-09 14:25:13 +03:00
Michael Klishin 8255acd5f9
3.9.2 release notes update 2021-08-09 14:24:15 +03:00
Michael Klishin 74f76fcf8f
Merge pull request #3277 from rabbitmq/mk-3.8.20-release-notes
3.8.20 release notes
2021-08-08 22:59:41 +03:00
Michael Klishin 30ceca7406
A typo 2021-08-08 22:59:18 +03:00
Michael Klishin 77c0c9680a
3.8.20 release notes 2021-08-08 22:58:12 +03:00
Michael Klishin 93a677d7bb
Merge pull request #3275 from rabbitmq/mk-3.9.2-release-notes
3.9.2 release notes
2021-08-08 15:11:38 +03:00
Michael Klishin 35ee280cf0
3.9.2 release notes 2021-08-08 15:10:50 +03:00
Michael Klishin 8272b77f68
Merge pull request #3270 from rabbitmq/alebedeff/lazy-makefile-vars-for-test-and-dev
Make test/development related makefile vars lazy
2021-08-08 12:00:09 +03:00
Alexey Lebedeff 87532c4af4 Make test/development related makefile vars lazy
They were trying to run `hostname` and `which`, which produced a bunch
of error messages in a hermetic build environment.

And performance of those `shell` calls is not very important, as they
are caled just a few times during script runtime anyway (there is a
hack to make these lazy, but evaluating only once - but it's hardly
worth it).
2021-08-06 17:32:04 +02:00
Michael Klishin ad9b4aafb5
Merge pull request #3266 from rabbitmq/mk-improve-rabbitmq-upgrade-drain-log-levels
Make sure 'rabbitmq-upgrade {drain, revive}' do not produce scary log messages
2021-08-05 16:34:52 +03:00
Michael Klishin 49fd6b3e8d
Make sure 'rabbitmq-upgrade {drain, revive}' do not produce scary log messages
"scary" here means log messages that show up as "errors". Warnings
and info messages make more sense.

Per discussion with @mkuratczyk.
2021-08-05 16:26:13 +03:00
Michael Klishin cf2c6099b3
Merge pull request #3263 from rabbitmq/rabbitmq-server-3260
Partially reintroduce locking to mirrored_supervisor
2021-08-05 15:33:06 +03:00
Michael Klishin c84115f102
Warn when lock could not be acquired successfully 2021-08-05 11:31:35 +03:00
Michael Klishin 22add3c8ca
Acquire locks when starting mirrored supervisor children
Unlike pg2, pg in Erlang 24 is eventually consistent. So this
reintroduces some of the same kind of locking mirrored_supervisor
used to rely on implicitly via pg2.

Per discussion with @lhoguin.

Closes #3260.

References #3132, #3154.
2021-08-05 00:39:16 +03:00
Michael Klishin 9a0f4b17cd
More mirrored supervisor logging 2021-08-04 16:58:44 +03:00
Michael Klishin 4f3d5e5e13
Mirrored supervisor: more logging at debug level 2021-08-04 15:56:45 +03:00
Philip Kuryloski 04371b0340 Bump a test timeout 2021-08-04 14:55:44 +02:00
Philip Kuryloski a3410904d6 Bump a test timeout 2021-08-04 13:06:29 +02:00
Philip Kuryloski aefb8ad753 bump a test timeout 2021-08-04 09:42:03 +02:00