Skip to content

Commit 4cae29b

Browse files
committed
fix schema validation
Signed-off-by: Alejandro M. Ramallo <alejandro.ramallo@leapsight.com>
1 parent 7294cf3 commit 4cae29b

3 files changed

Lines changed: 48 additions & 19 deletions

File tree

config/bondy.conf.defaults

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ broker_bridge.mailgun.adapter = mailgun2
217217
broker_bridge.mailgun.enabled = off
218218
broker_bridge.sendgrid.adapter = sendgrid
219219
broker_bridge.sendgrid.enabled = off
220+
broker_bridge.smtp.enabled = off
220221
cluster.automatic_leave = off
221222
cluster.channels.control_plane.compression = on
222223
cluster.channels.control_plane.parallelism = 1
@@ -226,6 +227,7 @@ cluster.channels.default.compression = off
226227
cluster.channels.default.parallelism = 1
227228
cluster.channels.wamp_relay.compression = false
228229
cluster.channels.wamp_relay.parallelism = 2
230+
cluster.connection_high_watermark = infinity
229231
cluster.exchange_tick_period = 10s
230232
cluster.lazy_tick_period = 1s
231233
cluster.max_message_size = 64MB
@@ -236,15 +238,17 @@ cluster.peer_discovery.initial_delay = 10s
236238
cluster.peer_discovery.polling_interval = 10s
237239
cluster.peer_discovery.timeout = 5s
238240
cluster.peer_port = 18086
241+
cluster.rpc_max_concurrency = 10000
239242
cluster.tls.allow_insecure = off
240243
cluster.tls.client.verify = verify_none
241244
cluster.tls.client.versions = 1.3
242245
cluster.tls.enabled = off
246+
cluster.tls.handshake_timeout = 5s
243247
cluster.tls.server.verify = verify_none
244248
cluster.tls.server.versions = 1.3
245249
db.aae = on
246250
db.aae.fanout = 3
247-
db.aae.fence.max_lag = 1s
251+
db.aae.fence.max_lag = 60s
248252
db.aae.fence.on_isolation = refuse
249253
db.aae.interval = 500ms
250254
db.aae.live_sync = on
@@ -269,16 +273,22 @@ db.pack_seal_mode = async
269273
db.reclaim = on
270274
db.reclaim.batch_cells = 500
271275
db.reclaim.interval = 1m
276+
db.registry.retention.max_age_ms = 0
277+
db.registry.retention.max_events = 0
272278
db.registry.shard_count = 16
273279
db.wal.batched_fsync_bytes = 1MB
274280
db.wal.batched_fsync_interval = 50ms
275281
db.wal.fsync_mode = per_write
276282
db.wal.max_segment_bytes = 64MB
277283
load_regulation.aae_reactor.pool.size = 16
278284
load_regulation.enabled = on
285+
load_regulation.hello.enabled = on
279286
load_regulation.job_manager.pool.size = 16
280287
load_regulation.job_manager.queue.size = 160000
281288
load_regulation.job_manager.queue.ttl = 1m
289+
load_regulation.load_monitor.run_queue_high_watermark = 8
290+
load_regulation.load_monitor.run_queue_low_watermark = 4
291+
load_regulation.load_monitor.sample_interval = 100ms
282292
load_regulation.router.flow_pool.capacity = 100000
283293
load_regulation.router.pool.capacity = 2000000
284294
load_regulation.router.pool.size = 16
@@ -317,6 +327,8 @@ log.handlers.default.formatter.time_designator = T
317327
log.handlers.default.formatter.time_offset = 0
318328
log.handlers.default.level = info
319329
log.level = info
330+
mail.status.max_size = 50000
331+
mail.status.ttl = 1h
320332
oauth2.client_credentials_grant.duration = 15m
321333
oauth2.code_grant.duration = 10m
322334
oauth2.config_file = {{platform_etc_dir}}/oauth2_config.json
@@ -358,6 +370,8 @@ security.rate_limit.handshake.rate = 10
358370
security.rate_limit.message.capacity = 2000
359371
security.rate_limit.message.enabled = off
360372
security.rate_limit.message.rate = 1000
373+
security.reclamation.enabled = on
374+
security.reclamation.interval = 6h
361375
security.ticket.allow_not_found = on
362376
security.ticket.authmethods = all
363377
security.ticket.expiry_time = 30d
@@ -384,6 +398,7 @@ wamp.broker.subscriber_blackwhite_listing = true
384398
wamp.broker.subscription_meta_api = false
385399
wamp.broker.subscription_revocation = false
386400
wamp.call_timeout = 30s
401+
wamp.connection.message_queue_data = off_heap
387402
wamp.connection_lifetime = session
388403
wamp.dealer.call_canceling = true
389404
wamp.dealer.call_reroute = true

doc/guides/configuration/migrating_from_1.0.0-rc.65.md

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,33 @@ configuration.
1313

1414
## Steps
1515

16-
### 1. Accept that this is not an in-place upgrade
16+
### 1. Move your data before you wipe anything
1717

1818
On-disk data written by 1.0.0-rc.65 (or any earlier release) is in PlumDB's
19-
RocksDB format, which this release cannot read. There is no tool that
20-
converts it: `bondy_export`, this release's data mover, reads and writes only
21-
the new storage engine, so it has nothing to read on a PlumDB data
22-
directory.
19+
RocksDB format, which this release cannot read. `bondy_export` reads and
20+
writes only the new storage engine, so pointing it at a PlumDB data
21+
directory gives it nothing to read.
2322

24-
Concretely, this means:
23+
The migration path runs through a backup **file**, not the data directory.
24+
Take one on the old node with `bondy.backup.create` while it is still
25+
running; this release's `bondy.export.import` recognises that file's format
26+
and translates each record as it reads. Users, groups, grants, sources, API
27+
Gateway specs and OAuth refresh tokens come across. Realm records do not —
28+
recreate realms from configuration, and their per-realm data still imports,
29+
because it is banded by the realm URI.
30+
31+
The full procedure — backing up on the old deployment, confirming it
32+
finished, copying the file, and importing it — is
33+
[Upgrading to 1.0.0](https://developer.bondy.io/guides/deployment/upgrading_to_1_0_0).
34+
Follow that guide for the data; this one covers only the configuration.
35+
36+
Two things hold either way:
2537

2638
- **Wipe the data directory** (`platform_data_dir`) before starting the new
27-
release on a node. Starting it against an old data directory does not
28-
corrupt anything — the new code simply doesn't recognise the layout — but
29-
it also doesn't give you your data back.
30-
- **Recreate realms, users, groups, grants, sources, tickets, tokens and
31-
API Gateway specs** on the new cluster. If you provisioned these
32-
originally through a script, Terraform/Ansible run, or a stored set of
33-
WAMP `bondy.realm.create` / `bondy.security.*` / `bondy.http_gateway.*`
34-
calls, replay it. If you provisioned by hand, there is no shortcut —
35-
budget time to redo it.
39+
release on a node — but only once the backup above is confirmed finished,
40+
since the data directory is the only thing the backup can be taken from.
41+
Starting the new release against an old data directory does not corrupt
42+
anything; the new code simply doesn't recognise the layout.
3643
- This is a **new cluster**, not a rolling upgrade. Don't mix a 1.0.0-rc.65
3744
node and a node running this release in the same Partisan cluster.
3845

@@ -175,8 +182,8 @@ the defaults are safe to run with unchanged.
175182
## Result
176183

177184
You have a `bondy.conf` (and, if applicable, `advanced.config`) that this
178-
release accepts, and a plan for recreating your realm and security state on
179-
a freshly provisioned cluster. To confirm your file is complete before
185+
release accepts. Your data moves separately, through the backup and import
186+
described in step 1. To confirm your file is complete before
180187
deploying it, start a node with it: an unrecognised or mistyped key fails
181188
boot immediately, naming the key and suggesting the closest valid one. If
182189
you're building from source, `config/bondy.conf.defaults` (regenerate it
@@ -185,6 +192,9 @@ diff target.
185192

186193
## See also
187194

195+
- [Upgrading to 1.0.0](https://developer.bondy.io/guides/deployment/upgrading_to_1_0_0)
196+
— the data half of the migration: back up on the old deployment, copy the
197+
file, import it on the new cluster.
188198
- [Reclamation configuration reference](reclamation_options.md) — the full
189199
set of reclamation/retirement options and their telemetry.
190200
- [Understanding deletion and reclamation](../database/deletion_and_reclamation.md)

schema/bondy.schema

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1645,8 +1645,12 @@ end}.
16451645
%% and every summary change is written through.
16461646
%% @end
16471647
%% -----------------------------------------------------------------------------
1648+
%% `integer` is listed alongside the duration so that `0` is expressible: the
1649+
%% duration parser rejects zero in every spelling (`0`, `0ms`, `0s`), so a
1650+
%% bare duration datatype makes the documented "set 0 to disable" impossible
1651+
%% to write and makes the generated defaults file fail to parse back.
16481652
{mapping, "registry.rib.damping", "bondy_router.registry_rib_damping", [
1649-
{datatype, {duration, ms}},
1653+
{datatype, [integer, {duration, ms}]},
16501654
{default, 0}
16511655
]}.
16521656

0 commit comments

Comments
 (0)