Commit Graph

3152 Commits

Author SHA1 Message Date
David Laban
1d5cc21c3c make error actionable when adding operator+leafnodes
There are many examples in the documentation for one half of this configuration or the other,
but none which configure a leafnode remote on an operator-authenticated cluster.

The error "operator mode requires account nkeys in remotes." is not very clear or actionable.
2021-08-18 18:07:53 +01:00
Derek Collison
a5afa86790 Merge pull request #2453 from nats-io/encrypt-checks
Add in additional checks for failures during filestore encryption.
2021-08-17 14:55:41 -07:00
Derek Collison
539cbb0f20 Bumped beta version
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-17 14:32:43 -07:00
Derek Collison
a7cf0ad985 Add in additional checks for failures during filestore encryption.
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-17 14:08:50 -07:00
Derek Collison
6871d1240b When we expired all messages on a restart we did not properly setup lmb.
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-17 13:45:50 -07:00
Derek Collison
02c702f7af Added test for system account update as well
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-17 11:09:13 -07:00
Derek Collison
84ff537e66 Make sure jwt claim update does not wipe system imports
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-17 10:03:30 -07:00
Matthias Hanel
2ec87a56ba fixed unit tests where SequencePair comparisons fail due to time last_active
Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-08-16 21:05:12 -04:00
Derek Collison
3f099f6719 Add in warn for error on catchup
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-16 08:03:53 -07:00
Ivan Kozlovic
23e30b0b98 Merge pull request #2442 from nats-io/fix_ln_wss
[FIXED] LeafNode with "wss://.." url was not always initiating TLS
2021-08-16 08:37:20 -06:00
Ivan Kozlovic
d7a124baaf [FIXED] LeafNode with "wss://.." url was not always initiating TLS
If the remote did not have any TLS configuration, the URL scheme
"wss://" was not used as the indicating that the connection should
be attempted as a TLS connection, causing "invalid websocket connection"
in the server attempting to create the remote leafnode connection.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-08-15 12:39:10 -06:00
Derek Collison
969c563822 Fix for flapper
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-15 11:31:55 -07:00
Derek Collison
75ae7c6032 When an account asked for connz should be client and leaf connections only by default.
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-15 11:04:23 -07:00
Derek Collison
f07a86c6db Merge branch 'main' into acc-connz
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-14 18:13:43 -07:00
Derek Collison
944dd248c4 Fix for tests
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-14 17:39:51 -07:00
Derek Collison
cdb5a56329 Fix for flapping test
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-14 15:26:27 -07:00
Derek Collison
b095870c2a Fixed a leak of internal clients for JetStream consumers.
We were not properly unregistering from the account on cleanup.

Signed-off-by: Derek Collison <derek@nats.io>
2021-08-14 15:09:42 -07:00
Derek Collison
b6c0412d2a More fixes for some flapping tests
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-14 13:35:04 -07:00
Derek Collison
14572b080b Fixed and moved large purge test to no race
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-14 13:07:46 -07:00
Derek Collison
9d7123213a Keep SequencePair vs SequenceInfo
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-14 12:01:29 -07:00
Derek Collison
c90dc48ba9 Fix for flapper
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-14 11:44:17 -07:00
Derek Collison
9405b77e46 Added in last active reporting for consumers for delivered and ack floor.
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-14 11:36:27 -07:00
Derek Collison
969cf60def Add in push bound status for consumer info.
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-14 08:35:40 -07:00
Derek Collison
c4a78d91b7 Remove PushActive
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-13 15:11:31 -07:00
Derek Collison
5ec5020a8b Add in DeliverGroup to consumer as optional queue group.
Changed sublist register for notifications to be queue bound.

Signed-off-by: Derek Collison <derek@nats.io>
2021-08-13 15:07:56 -07:00
Derek Collison
9f50b66ad7 Break once we see interest
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-13 10:41:26 -07:00
Derek Collison
10167b1bcf Added in ability for normal accounts to access scoped connz info.
Added in client kind and sub type for clients.
Added in ability to filter connections based on matching subject interest.

Signed-off-by: Derek Collison <derek@nats.io>
2021-08-13 10:19:12 -07:00
Matthias Hanel
1d9a891477 Merge pull request #2430 from nats-io/issuer-2415
[fixed] issue where js overwrote leafnode remotes permissions from creds
2021-08-12 15:12:37 -04:00
Derek Collison
d252f0f700 Make sure PushActive is nil for pull consumers
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-12 10:15:55 -07:00
Matthias Hanel
d39822e1d0 added check assuring subscription made it to other end of leaf connection
Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-08-12 12:57:50 -04:00
Matthias Hanel
db9fd45be2 [fixed] issue where js overwrote leafnode remotes permissions from creds
Fixes #2415. We did a set instead of merge.
changes in `jwt_test.go` are to make the `createUserWithLimit` usable by my new test.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-08-12 12:57:50 -04:00
Matthias Hanel
d6de19c649 Made test more predictable by waiting for leader after leader shutdown
Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-08-12 12:34:15 -04:00
Derek Collison
98f7d63b84 Fix for data race and corruption
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-12 06:14:19 -07:00
Derek Collison
c9875e09a0 Fix for a flapper
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-12 06:13:47 -07:00
Derek Collison
54443312a4 Fix for flapper
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-11 16:53:58 -07:00
Derek Collison
c781256dda Add in deliver status for consumer info
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-11 15:41:33 -07:00
Derek Collison
da3c89efda Add domain to PubAck1
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-11 13:25:24 -07:00
Matthias Hanel
9c21fe92e1 Merge pull request #2431 from nats-io/fc-export
fixed unit test to require fc export as well
2021-08-11 13:41:29 -04:00
scottf
84d37e8a92 assign default to MaxAckPending when AckExplicit -or- AckAll, not just AckExplicit 2021-08-10 17:38:46 -04:00
Matthias Hanel
b511f3fd7a fixed unit test to require fc export as well
Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-08-10 14:03:44 -04:00
R.I.Pienaar
a3bbb04748 Merge pull request #2409 from ripienaar/js_errors_redux
attempt to improve UX of the error system
2021-08-10 20:01:24 +02:00
Derek Collison
7dd399e355 Merge branch 'main' into max-per-default
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-10 07:33:58 -07:00
R.I.Pienaar
76ab1b8d17 attempt to improve UX of the error system
Previously we had a few confusing functions like NewT
and similar that were quite fragile to use due to minimal
validation and a panic in go stdlib string Replacer.

Now we generate helper methods for every string, these
are used to access errors, fill in templates and conditional
returns of error type using the new Unless() option

We now get compile time errors for some common mistakes
and have better IDE helpers for arguments etc

Signed-off-by: R.I.Pienaar <rip@devco.net>
2021-08-10 16:08:28 +02:00
Derek Collison
b38c361afd Merge pull request #2427 from nats-io/bad-err
Fix for #2423
2021-08-10 07:03:39 -07:00
Derek Collison
cb6b397573 Fix for #2423
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-10 06:46:48 -07:00
Derek Collison
633763a202 Fix for #2420
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-10 06:36:08 -07:00
Derek Collison
29536629eb Simplified flow control, avoid stalls due to msg loss
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-09 20:13:17 -07:00
Derek Collison
8e5314b67f Fix for subscription leak.
If an auto-unsub request was received after the subscription had already delivered more than the limit, the subscription will leak.

Signed-off-by: Derek Collison <derek@nats.io>
2021-08-07 16:58:25 -07:00
Derek Collison
e03c3da67c Bump version
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-07 14:38:11 -07:00
Derek Collison
7c089a423a Merge pull request #2418 from nats-io/dir-not-empty
[FIXED] #2417
2021-08-07 12:35:19 -07:00