Commit Graph

6747 Commits

Author SHA1 Message Date
Derek Collison
55352f2a7e Merge branch 'main' into dev 2023-01-04 22:59:09 -08:00
Derek Collison
b9d10add08 Merge pull request #3760 from nats-io/ghost-consumers
Ensure we add in new consumers from a meta snapshot from the leader.
2023-01-04 22:58:37 -08:00
Derek Collison
6c5f0a669d Ensure we add in new consumers from a meta snapshot from the leader.
Signed-off-by: Derek Collison <derek@nats.io>
2023-01-04 22:18:31 -08:00
Derek Collison
2520468399 Bump to v2.10.0-beta.8
Signed-off-by: Derek Collison <derek@nats.io>
2023-01-03 15:40:04 -08:00
Derek Collison
3c889478bd Merge pull request #3719 from nats-io/auth_callout
Authorization Callouts
2023-01-03 15:34:10 -08:00
Derek Collison
00c98a01db Merge pull request #3743 from Alberic-Hardis/winserviceDelay
Set startup time with env NATS_STARTUP_DELAY
2023-01-03 12:43:26 -08:00
Derek Collison
a63929c528 Add in account scoped auth error event. If external auth, supply reason from the callout service.
Signed-off-by: Derek Collison <derek@nats.io>
2023-01-02 17:18:45 -08:00
Derek Collison
6ac99f489c Merge branch 'main' into dev 2023-01-02 12:53:01 -08:00
Derek Collison
2808bbe95f Merge pull request #3756 from nats-io/fix_3734
Fix for #3734
2023-01-02 12:52:39 -08:00
Alberic Corniere
d21c9fb9b1 Test on windows for the OS service API compliance 2023-01-02 10:43:05 +01:00
Derek Collison
d9cb1e6286 Fix for #3734
When a msg blk was not writen correctly, but the idx file was, max bytes for a stream would no longer be honored since the deletion of any messages in that empty block were not being handled properly.

Signed-off-by: Derek Collison <derek@nats.io>
2022-12-31 18:50:46 -08:00
Derek Collison
ff79afef39 Merge branch 'main' into dev 2022-12-30 12:23:23 -08:00
Neil
1d53b47b33 Merge pull request #3754 from nats-io/neil/golangcilint
Switch to `golangci-lint`
2022-12-30 20:12:03 +00:00
Neil Twigg
14d0ba1c65 Fix some lint errors after move to golangci-lint 2022-12-30 20:00:08 +00:00
Neil Twigg
7042fc1638 Switch to golangci-lint 2022-12-30 19:46:50 +00:00
Derek Collison
307ea2df3d Merge branch 'main' into dev 2022-12-30 10:25:22 -08:00
Derek Collison
a9a9b92f6d Merge pull request #3752 from nats-io/zero_meta
Healthz works on single server systems and allow recovery if stream meta not flushed.
2022-12-30 10:24:51 -08:00
Derek Collison
713f632fa7 If a stream's meta was not properly written but the file existed, we could re-add the stream but a subsequent restart would lose the stream again.
Also added in healthz for single server systems to make sure all stream directories resulted in recovered streams.

Signed-off-by: Derek Collison <derek@nats.io>
2022-12-29 20:08:56 -08:00
Derek Collison
43c26a49f8 Merge branch 'main' into dev 2022-12-29 15:40:00 -08:00
Derek Collison
71b90673ee Merge pull request #3751 from nats-io/leaf-wc-fix
Fix dup msgs when leafnode binds to account with service imports
2022-12-29 15:39:25 -08:00
Waldemar Quevedo
861f98128a Remove individual import subs from leafnodes
When a leafnode connection is bound to an account where there was already
a wildcard response import subscription to handle the requests (e.g. `_R_.foo.>`),
this would have created message duplicates due to an extra subscription
being created that also matched the wildcard (e.g. `_R_.foo.bar`).

To avoid this condition, we now skip creating the latter extra subscription
for leafnode connections.

Signed-off-by: Waldemar Quevedo <wally@nats.io>
2022-12-29 15:30:17 -08:00
Derek Collison
2daf90493b Authentication and Authorization callouts for server configuration mode.
This adds the ability to augment or override the NATS auth system.

A server will send a signed request to $SYS.REQ.USER.AUTH on the specified account. The request will contain client information, all client options sent to the server, and optionally TLS information and client certificates.
The external auth service will respond with an empty message if not authorized, or a signed User JWT that the user will bind to.

The response can change the account the client will be bound to.

Signed-off-by: Derek Collison <derek@nats.io>
2022-12-28 10:32:45 -08:00
Derek Collison
ec6f303aff Merge pull request #3748 from nats-io/jarema/fix-tiered-stream-create
Default to replicas == 1 in tiered jetStream setup
2022-12-28 10:00:31 -08:00
Tomasz Pietrek
6e9d05988c Try dirty approach
Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
2022-12-28 13:06:17 +01:00
Alberic Corniere
8a1b2f0d4c More compact syntax 2022-12-27 09:41:39 +01:00
Derek Collison
ae988ed919 Merge branch 'main' into dev 2022-12-26 08:15:49 -08:00
Derek Collison
51678dd8bf Merge pull request #3744 from nats-io/fix-3704-compat
Add back existing HealthzOptions.JSEnabled field
2022-12-26 08:14:32 -08:00
Byron Ruth
1477b675ff Add back existing HealthzOptions.JSEnabled field
This fixes a backwards incompat change for library usage as well as
using the healthz NATS API which depends on the JSON payload.

Signed-off-by: Byron Ruth <byron@nats.io>
2022-12-26 08:45:22 -05:00
Alberic Corniere
86f224bcf4 Set stratup time with env NATS_STARTUP_DELAY
The startup delay when starting as a service under windows was set to 10
seconds.

This value was fixed and hardcoded since before JetStream. On (some)
Windows systems, this leads to service startup failures, as the store
dir sorting may be hindered by an important load, or slowed down by
increased accesses times, typically from security software influence.

This commit allows overriding the startup delay using an environment
variable NATS_STARTUP_DELAY. This variable is checked outside init() to
allow reporting into the service log.

Any value can be used (even lower than the initial 10s). Bare NATS
start can be far faster than 10s. Ops may want to setup this env var to
lower values in order to trigger an error on stricter constraints.
2022-12-26 11:02:53 +01:00
Waldemar Quevedo
8346fd3209 Bump server version
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2022-12-20 08:05:04 -08:00
Waldemar Quevedo
d44362f696 Merge pull request #3726 from nats-io/bump-2.9.11
Bump version to 2.9.11-beta
2022-12-20 07:59:21 -08:00
Byron Ruth
f6b8d9f422 Bump version to 2.9.11-beta
Signed-off-by: Byron Ruth <b@devel.io>
2022-12-20 10:56:55 -05:00
Waldemar Quevedo
4caf6aa03d Merge pull request #3725 from nats-io/release-2-9-10
Prepare for v2.9.10 release
2022-12-20 07:46:27 -08:00
Byron Ruth
b6a19e5199 Prepare for v2.9.10 release
Signed-off-by: Byron Ruth <b@devel.io>
2022-12-20 10:33:43 -05:00
Derek Collison
3171309c87 Merge branch 'main' into dev 2022-12-16 13:28:12 -08:00
Derek Collison
c2285ab166 Merge pull request #3715 from nats-io/two-stream-same-sub
fix and test for overlapping stream subscription on update
2022-12-16 13:27:25 -08:00
Todd Beets
c463b398db Validate no overlapping stream subscriptions on update config (non-clustered jetstream) 2022-12-16 12:58:59 -08:00
Waldemar Quevedo
a04b2a7cff Merge pull request #3718 from nats-io/go-get-nsc-v2
Update nsc go install to use go modules
2022-12-15 11:29:29 -08:00
Derek Collison
51341c6367 Bump to v2.9.10-beta.1
Signed-off-by: Derek Collison <derek@nats.io>
2022-12-15 10:09:13 -08:00
Derek Collison
5e531b38cb Merge branch 'main' into dev 2022-12-15 07:27:54 -08:00
Derek Collison
860c032939 Merge pull request #3717 from nats-io/fix-3652
[FIXED] Failure to store msg with `error opening msg block file [""]: open : no such file or directory`
2022-12-15 07:26:47 -08:00
Derek Collison
a85318bc76 Under the right circumstances Compact could leave a danling last msg block leading to error opening msg block file [""]: open : no such file or directory
When the compaction would not uplevel to a normal purge, but after completion all msg blocks were empty the mb.lmb was not cleared or reset properly.

Signed-off-by: Derek Collison <derek@nats.io>
2022-12-15 06:59:54 -08:00
Derek Collison
92766f0dfc Merge branch 'main' into dev 2022-12-15 04:53:15 -08:00
Derek Collison
d937e92d55 Merge pull request #3714 from nats-io/consumer-info
Simplify locking for consumer info requests.
2022-12-15 04:46:23 -08:00
Derek Collison
786298469c Simplify locking for consumer info requests.
Signed-off-by: Derek Collison <derek@nats.io>
2022-12-14 18:52:15 -08:00
Waldemar Quevedo
74d9c51533 Update nsc go install to use go modules 2022-12-14 17:11:14 -08:00
Derek Collison
d7b1723d1d Merge branch 'main' into dev 2022-12-14 16:56:52 -08:00
Derek Collison
a68194579d Merge pull request #3713 from nats-io/lazarus-mem-leader
fix and test for clustered mem store asset no-quorum if leader restarted
2022-12-14 16:56:33 -08:00
Todd Beets
47c87eb71c fix and test for clustered mem store asset no-quorum if leader restarted 2022-12-14 16:16:08 -08:00
Derek Collison
41c1dd9ea8 Merge branch 'main' into dev
Signed-off-by: Derek Collison <derek@nats.io>
2022-12-14 12:14:22 -08:00