Commit Graph

2248 Commits

Author SHA1 Message Date
Derek Collison
d2a92221fb Duplicate leader elect and lost advisories to the system account as well.
Also suppress lost quorums to at most once every 10 secs.

Signed-off-by: Derek Collison <derek@nats.io>
2021-01-29 08:51:20 -08:00
Ivan Kozlovic
e0487b95cc [FIXED] Return no match result if subject contains empty token
A subject such as `foo..bar` is invalid, but if it is published
from a connection that has disabled pedantic, then the message
is matched against subscriptions and will be delivered.

This change causes Sublist.Match() to return no result.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-01-28 17:43:22 -07:00
Matthias Hanel
c9e0eb6c3a [added] cluster/gateway/leafnode tls required/verify/timeout to varz (#1854)
Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-01-28 14:08:58 -05:00
Derek Collison
67dc580a39 Removed stream state for advisories
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-28 09:52:56 -08:00
Derek Collison
9d4951d2bb Updated lost quorum signalling to be less fragile.
We will now alert when the old leader detects a lost quorum just as before, but also detect if a candidate is flapping and failing to get votes because of no quorum.

Signed-off-by: Derek Collison <derek@nats.io>
2021-01-28 09:27:17 -08:00
Derek Collison
8b79114168 Add in advisories for leader elected and quorum lost advisories.
Note that quorum lost only fires if the old leader steps down.
If the leader itself fails and that causes the loss of quorum currently no advisory is sent.

Signed-off-by: Derek Collison <derek@nats.io>
2021-01-28 08:37:54 -08:00
Derek Collison
6d27307453 Fix for broken stream restore functionality
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-27 17:44:42 -08:00
Derek Collison
4f62724fcd Bumped Beta Version
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-27 16:27:23 -08:00
Derek Collison
132a4e7f7d Allow memory store for clustering
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-27 15:54:39 -08:00
Derek Collison
a9b8948abe Add in tracking for quorum in raft and do auto stepdown.
Also added in API responses when no leader is present for meta, streams and consumers.

Signed-off-by: Derek Collison <derek@nats.io>
2021-01-27 13:34:00 -08:00
Derek Collison
c0ae719629 Don't load entry for snapshot, fix data race
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-26 19:26:03 -08:00
Derek Collison
b4a804986a Bumped Beta Version
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-26 16:51:32 -08:00
Ivan Kozlovic
33694762b1 Merge pull request #1850 from nats-io/max_control_line
[CHANGED] Enforce max_control_line for client connections only
2021-01-26 16:25:28 -07:00
Derek Collison
fa972cf31f Merge pull request #1851 from nats-io/split_bug
Fix for split vote bug
2021-01-26 16:18:07 -07:00
Derek Collison
054319a662 Fix for split vote bug
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-26 14:59:13 -08:00
Ivan Kozlovic
b07e176b30 Fixed typo in new const name
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-01-26 15:55:00 -07:00
Matthias Hanel
dea9effa8d [added] support for StrictSigningKeyUsage and updated jwt library (#1845)
This will cause the server to not trust accounts/user signed by an
identity key

The boot strapping system account will assume the account is issued by
the operator.
If this is not desirable, the system account can be provided right away
as resolver_preload.

[fixes] crash when the system account uses signing keys and an update changes that key set.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-01-26 17:49:58 -05:00
Ivan Kozlovic
dce814009b [CHANGED] Enforce max_control_line for client connections only
Only check limit for CLIENT connection types, however, the check
is done for CLIENT in all conditions, not only in the case of a
split buffer as it was the case so far.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-01-26 15:33:39 -07:00
Derek Collison
3e8d295239 Make sure to not go backwards on applied or commit indexes
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-26 14:07:52 -08:00
Derek Collison
df0228f076 Change up for banner
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-26 14:06:50 -08:00
Ivan Kozlovic
9716aa8b4c Merge pull request #1846 from nats-io/ln_save_tls_name
[FIXED] LeafNode: save hostname that may be used during TLS handshake
2021-01-26 14:51:11 -07:00
Waldemar Quevedo
2a944423b2 Merge pull request #1847 from wallyqs/server-name-flag
Add --server_name flag to set server name
2021-01-26 13:41:12 -08:00
Ivan Kozlovic
af57f55738 Fixing some flappers (leafnode and mqtt)
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-01-26 14:23:49 -07:00
Waldemar Quevedo
dbbf4fdf96 Add --server_name flag to set server name
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2021-01-26 12:16:31 -08:00
Ivan Kozlovic
0fe9209b52 Merge pull request #1840 from angiglesias/allow-mqtt_bearer_token
[ADDED] Allow bearer token as mqtt authentication method
2021-01-26 12:14:03 -07:00
Ivan Kozlovic
6666f5aa43 [FIXED] LeafNode: save hostname that may be used during TLS handshake
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-01-26 12:10:57 -07:00
Derek Collison
7efb9a6456 Bump Beta Version
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-26 05:23:35 -08:00
Derek Collison
bcd38bba96 Make sure stepdown logic does not block system
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-25 19:20:10 -08:00
Derek Collison
fc829950bd Bump Beta Version
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-25 18:23:48 -08:00
Derek Collison
e40c3e6f55 Templates not supported currently in clustered mode
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-25 17:13:31 -08:00
Derek Collison
d278996272 LDM trigger to move raft leaders
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-25 16:52:19 -08:00
Derek Collison
7eb6d07bfc On stepdown still process appendEntry
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-25 14:32:24 -08:00
Derek Collison
7d8c3eaa6e Don't pre-vote, causes flapping on split vote
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-25 13:49:20 -08:00
Derek Collison
162bc1a0c4 Bump beta version
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-25 11:54:48 -08:00
Derek Collison
c7c86c7929 Attempt to fix flapper
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-25 10:25:47 -08:00
Derek Collison
5148bbf898 Fixes based on PR feedback, cleanup
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-25 10:04:21 -08:00
Ángel
07c3214473 Added tests for MQTT bearer token authentication
Signed-off-by: Ángel <angelo.fly1@gmail.com>
2021-01-25 18:44:28 +01:00
Ángel
4fd58efa84 Allow use MQTT Connection password field as a JWT to authenticate clients
Signed-off-by: Ángel <angelo.fly1@gmail.com>
2021-01-25 18:11:20 +01:00
Derek Collison
7b1e84c086 Fixed raft bug that would cause entries to be missed on restart with leader HB trigger.
Also added in creation times to stream and consumer assignments to make them consistent.

Signed-off-by: Derek Collison <derek@nats.io>
2021-01-25 08:47:37 -08:00
Derek Collison
117607ef11 Fix for race and test for issue R.I. was seeing in nightly. Also fixed flappers.
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-24 21:21:02 -08:00
Derek Collison
a72ddedb55 Fix for issue with stream info and R=1 and fix for a flapper
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-24 19:48:33 -08:00
Derek Collison
9c858d197a Added ability to properly restore consumers from a snapshot.
This made us add forwarding proposals functionality in the raft layer.
More general cleanup and bug fixes as well.

Signed-off-by: Derek Collison <derek@nats.io>
2021-01-24 19:30:34 -08:00
Derek Collison
cad0db2aec Cleanup the consumer assignments when consumers become inactive.
This involved extending our raft implementation to forward proposals to the current leader.

Signed-off-by: Derek Collison <derek@nats.io>
2021-01-23 13:44:10 -08:00
Derek Collison
d1d2d5b24e Fix for consumer names list in clustered mode
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-23 10:09:44 -08:00
Derek Collison
cb2433c2fc Fix for cluster info with R=1
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-23 10:04:43 -08:00
Derek Collison
277483b386 Change over last to active and a duration
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-22 12:34:21 -08:00
Derek Collison
da698ca888 Merge branch 'master' into jsc_limits 2021-01-22 12:13:28 -07:00
Derek Collison
a43a69a403 Fix for interest only, broken test
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-22 11:04:06 -08:00
Derek Collison
227901a56b More cleanup and stabilization for consumers and failing when sending messages.
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-22 10:09:30 -08:00
Phil Pennock
393b4ca83d Bump version's beta (#1834) 2021-01-22 12:31:25 -05:00