Commit Graph

5125 Commits

Author SHA1 Message Date
Ivan Kozlovic
a06e11a5a3 Release v2.6.3
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-10-28 13:41:54 -06:00
Derek Collison
31cb06d018 Merge pull request #2655 from nats-io/st-race
Race around accessing storage type
2021-10-28 12:41:25 -07:00
Derek Collison
cf5322088d Race around accessing storage type
Signed-off-by: Derek Collison <derek@nats.io>
2021-10-28 12:36:01 -07:00
Ivan Kozlovic
c6b1d7f119 Merge pull request #2653 from nats-io/gw_gossip_urls
[FIXED] Gateway URLs gossip and `/varz` report issues
2021-10-28 12:51:50 -06:00
Derek Collison
22fb95fcc5 Merge pull request #2652 from nats-io/consumer-rdc
Fix for a bug that did not properly decode redelivered state for consumers from a filestore.
2021-10-28 11:28:21 -07:00
Ivan Kozlovic
5fc9e0e1cc [FIXED] Gateway URLs gossip and /varz report issues
- When detecting duplicate route, it was possible that a server
would lose track of the peer's gateway URL, which would prevent
it from gossiping that URL to inbound gateway connections
- When a server has gateways enabled and has as a remote its
own gateway, the monitoring endpoint `/varz` would include it
but without the "urls" array.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-10-28 12:05:30 -06:00
Derek Collison
003b6996f1 If AckWait less then restart check interval use AckWait
Signed-off-by: Derek Collison <derek@nats.io>
2021-10-28 11:00:06 -07:00
Derek Collison
3a14a984fc Fix for a bug that did not properly decode redelivered state for consumers from a filestore.
This also caused state abnormalities in a user's setup so added code to clean up bad state as needed.

Signed-off-by: Derek Collison <derek@nats.io>
2021-10-28 08:33:48 -07:00
Derek Collison
862c0c647d Merge pull request #2650 from nats-io/issue-2633
[FIXED] #2633
2021-10-27 15:34:05 -07:00
Derek Collison
0f7cdb00e8 Fix for #2633
Signed-off-by: Derek Collison <derek@nats.io>
2021-10-27 15:07:59 -07:00
Phil Pennock
03a4f2b268 Merge pull request #2649 from nats-io/pdp/tests-avoid-random-ports
Tests: avoid random ports
2021-10-27 15:14:29 -04:00
Phil Pennock
635c98a04b tests: hard-reject bad ports for JS clusters 2021-10-27 14:21:08 -04:00
Phil Pennock
7aacba4bda tests: don't allocate fixed ports from random range
When a socket is bound for IP stack protocols with port == 0, the kernel picks
a free port in a specific range and binds it; on Linux, the range can be seen
(and modified) with `sysctl net.ipv4.ip_local_port_range` or looking in
`/proc/sys/net/ipv4/ip_local_port_range`.  This defaults to 32768:60999.

When binding explicit ports (for tests), don't use a port number from that
range, or there will be flaky tests as periodically that port will already be
in use from another test.

This renumbers all the JS clustering tests I found binding in that range to be
beneath that range; I checked the code to ensure the new port wasn't already in
use.
2021-10-27 13:46:43 -04:00
Phil Pennock
fc6df0fbbc Redact URLs before logging or returning in error (#2643)
* Redact URLs before logging or returning in error

This does not affect strings which failed to parse, and in such a scenario
there's a mix of "which evil" to accept; we can't sanely find what should be
redacted in those cases, so we leave them alone for debugging.

The JWT library returns some errors for Operator URLs, but it rejects URLs
which contain userinfo, so there can't be passwords in those and they're safe.

Fixes #2597

* Test the URL redaction auxiliary functions

* End-to-end tests for secrets in debug/trace

Create internal/testhelper and move DummyLogger there, so it can be used from
the test/ sub-dir too.

Let DummyLogger optionally accumulate all log messages, not just retain the
last-seen message.

Confirm no passwords logged by TestLeafNodeBasicAuthFailover.

Change TestNoPasswordsFromConnectTrace to check all trace messages, not just the
most recent.

Validate existing trace redaction in TestRouteToSelf.

* Test for password in solicited route reconnect debug
2021-10-27 12:44:59 -04:00
Derek Collison
7dc5014941 Bump version
Signed-off-by: Derek Collison <derek@nats.io>
2021-10-27 09:20:31 -07:00
Derek Collison
ad04a3b7b1 Merge pull request #2648 from nats-io/issue-2642
[FIXED] #2642
2021-10-27 09:06:04 -07:00
Derek Collison
d4b0b38a8f Fix for #2642
There was a bug that would erase the sync subject for upper level catchup for streams.
Raft layer repair was ok but if that was compacted it gets kicked up to the upper layers which would fail.
Users would see "Catchup stalled" messages repeatedly and consumers that had their leaders attached to that replica would also stop working.

Changes were put in to repair the corrupt state after the fact as well, regardless of presence of fix.

Signed-off-by: Derek Collison <derek@nats.io>
2021-10-26 20:09:00 -07:00
Ivan Kozlovic
5929195470 Merge pull request #2647 from nats-io/gw_varz_urls_not_updated
[FIXED] Monitoring: /varz gateway URLs not always updated
2021-10-26 14:40:54 -06:00
Ivan Kozlovic
694e9016b6 Fixed flapper
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-10-26 13:36:58 -06:00
Ivan Kozlovic
0bd38bd424 [FIXED] Monitoring: /varz gateway URLs not always updated
When servers leave a cluster and their gateway URLs was not in
the remote cluster's configuration, it is possible that their
gateway URL do not disappear from the list of URLs in the `/varz`
monitoring endpoint.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-10-26 13:11:06 -06:00
Derek Collison
1441d25977 Merge pull request #2646 from nats-io/kv-compact
KV compact optimizations
2021-10-26 09:51:44 -07:00
Derek Collison
cc4f802e09 Optimize compaction under heavy KV use
Signed-off-by: Derek Collison <derek@nats.io>
2021-10-26 08:39:22 -07:00
Derek Collison
ab91da8f9b Upgrade Go client
Signed-off-by: Derek Collison <derek@nats.io>
2021-10-25 17:13:05 -07:00
Derek Collison
4ba1ab27bd Merge pull request #2645 from nats-io/issue-2644
Fix for #2644
2021-10-25 13:56:28 -07:00
Derek Collison
678469b40b Fix for #2644
Signed-off-by: Derek Collison <derek@nats.io>
2021-10-25 13:12:37 -07:00
Matthias Hanel
81ccce9422 Merge pull request #2638 from nats-io/tmr-leak
Fixed memory leak caused by retained client and conn of timer
2021-10-20 12:12:23 -04:00
Matthias Hanel
4728820fd9 Merge pull request #2639 from nats-io/reset-tmr
fix timer not being stopped prior to reset
2021-10-20 12:12:16 -04:00
Matthias Hanel
1c508220d8 Review comment
Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-10-19 18:03:59 -04:00
Matthias Hanel
c4a3a4c95e fix timer not being stopped prior to reset
Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-10-19 16:56:20 -04:00
Matthias Hanel
8f64b99912 Fixed memory leak caused by retained client and conn of timer
by closing the timer.
This is a follow up to #2630

Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-10-19 15:58:22 -04:00
Derek Collison
5ce7cfa9a6 Merge pull request #2637 from DavidSimner/patch-1
Fix #2630
2021-10-19 08:01:32 -07:00
David Simner
31814aa169 Update test 2021-10-19 12:39:08 +02:00
David Simner
78991445f4 Fix #2630 2021-10-19 11:15:47 +02:00
Waldemar Quevedo
ed97718f68 Merge pull request #2632 from nats-io/ocsp-tls-check
Fix for #2628 #2629 issues
2021-10-18 18:39:06 -07:00
Waldemar Quevedo
040258dc41 Fix for #2628 #2629 issues
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2021-10-18 17:53:56 -07:00
Derek Collison
3fbf9ddcbc Merge pull request #2623 from nats-io/fix-2622
[FIXED] #2622
2021-10-14 10:30:21 -07:00
Derek Collison
391594367f Use %q when trimming msg payload under trace
Signed-off-by: Derek Collison <derek@nats.io>
2021-10-14 09:38:00 -07:00
Derek Collison
06168083c7 Fix for #2622.
We were not escaping the top level iterator across message blocks when calculating when to break due to keep > 0.

Signed-off-by: Derek Collison <derek@nats.io>
2021-10-14 09:25:21 -07:00
Ivan Kozlovic
f7c3ac5e51 Merge pull request #2620 from nats-io/release_2_6_2
Release v2.6.2
2021-10-12 16:02:20 -06:00
Ivan Kozlovic
831c8254e3 Release v2.6.2
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-10-12 15:19:17 -06:00
Derek Collison
adf50f261f Merge pull request #2618 from nats-io/js-config
Honor JetStream server settings of 0.
2021-10-12 14:17:28 -07:00
Derek Collison
c9f615933a Honor JetStream server settings of 0.
Signed-off-by: Derek Collison <derek@nats.io>
2021-10-12 14:16:47 -07:00
Ivan Kozlovic
433a3e7c2b Merge pull request #2619 from nats-io/fix_js_race
Fixed data race in setSourceConsumer
2021-10-12 15:13:55 -06:00
Ivan Kozlovic
cd23c70ad8 Fixed data race in setSourceConsumer
Call to mset.unsubscribe() need to use the version that uses
locking when invoked from the subscription callback or from the
go routine when the 10secs have elapsed.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-10-12 14:25:46 -06:00
Ivan Kozlovic
fe0836ac44 Merge pull request #2613 from nats-io/ws_compression
[FIXED] Websocket: issue with compression and Safari
2021-10-12 13:14:04 -06:00
Ivan Kozlovic
9c2c1c61c2 Updates based on code review
- Updated the detection of Safari browser
- Replaced "" with _EMPTY_

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-10-12 11:17:58 -06:00
Derek Collison
28709c653d Bump version
Signed-off-by: Derek Collison <derek@nats.io>
2021-10-12 08:47:41 -07:00
Derek Collison
cbbab295ec Merge pull request #2616 from nats-io/fix_2611
[FIXED] #2611
2021-10-12 08:46:42 -07:00
Derek Collison
f8a8367ed2 Merge pull request #2615 from nats-io/raft-meta
Improvements to meta raft layer around snapshots and recovery.
2021-10-12 08:46:27 -07:00
Derek Collison
8cf09e9627 Merge pull request #2617 from nats-io/issue-2607
[FIXED] Issue #2607
2021-10-12 08:14:48 -07:00