Skip to content

Commit 5a70e4a

Browse files
committed
WIP; Khepri metadata store - phase 1
1 parent 3b85d0f commit 5a70e4a

14 files changed

+5428
-289
lines changed

deps/rabbit/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ APPS_DIR := $(CURDIR)/apps
138138
LOCAL_DEPS = sasl rabbitmq_prelaunch os_mon inets compiler public_key crypto ssl syntax_tools xmerl
139139

140140
BUILD_DEPS = rabbitmq_cli
141-
DEPS = ranch rabbit_common ra sysmon_handler stdout_formatter recon redbug observer_cli osiris amqp10_common syslog systemd seshat
141+
DEPS = ranch rabbit_common ra sysmon_handler stdout_formatter recon redbug observer_cli osiris amqp10_common syslog systemd seshat khepri
142142
TEST_DEPS = rabbitmq_ct_helpers rabbitmq_ct_client_helpers amqp_client meck proper
143143

144144
PLT_APPS += mnesia
@@ -147,6 +147,7 @@ dep_syslog = git https://github.com/schlagert/syslog 4.0.0
147147
dep_osiris = git https://github.com/rabbitmq/osiris main
148148
dep_systemd = hex 0.6.1
149149
dep_seshat = git https://github.com/rabbitmq/seshat main
150+
dep_khepri = git https://github.com/rabbitmq/khepri.git c587fabdab933e1e5f560ddd19bff7acfcecaa88
150151

151152
define usage_xml_to_erl
152153
$(subst __,_,$(patsubst $(DOCS_DIR)/rabbitmq%.1.xml, src/rabbit_%_usage.erl, $(subst -,_,$(1))))

deps/rabbit/include/internal_user.hrl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
%% This Source Code Form is subject to the terms of the Mozilla Public
2+
%% License, v. 2.0. If a copy of the MPL was not distributed with this
3+
%% file, You can obtain one at https://mozilla.org/MPL/2.0/.
4+
%%
5+
%% Copyright (c) 2021 VMware, Inc. or its affiliates. All rights reserved.
6+
%%
7+
8+
-define(is_internal_user(V),
9+
(?is_internal_user_v2(V) orelse
10+
?is_internal_user_v1(V))).
11+
12+
-define(is_internal_user_v1(V), is_record(V, internal_user, 5)).
13+
-define(is_internal_user_v2(V), is_record(V, internal_user, 6)).

deps/rabbit/src/rabbit.erl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,10 @@ run_prelaunch_second_phase() ->
366366

367367
ok = rabbit_ra_systems:setup(Context),
368368

369+
%% Khepri requires the "coordination" Ra system to be started by the
370+
%% previous call, but will ensure it runs anyway.
371+
ok = rabbit_khepri:setup(Context),
372+
369373
?LOG_DEBUG(""),
370374
?LOG_DEBUG("== Prelaunch DONE =="),
371375

0 commit comments

Comments
 (0)