Derek Collison
4bde91e9bd
Fix a data race.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-20 07:31:55 -07:00
Derek Collison
8b50094fde
Merge pull request #2227 from nats-io/docker_js
...
Fixed issue that we would stage snapshot restores in temporary storage.
2021-05-20 06:56:31 -07:00
Derek Collison
a14f07f86c
Fix flapping test
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-19 19:09:49 -07:00
Derek Collison
9ccc843382
Removing peers should wait for RemovePeer entry replication.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-19 18:58:19 -07:00
Derek Collison
a27b0dd673
Move default file and dir perms
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-19 14:46:07 -07:00
Derek Collison
592066ed0b
Fixed issue that we would stage snapshot restore in temporary storage.
...
This did not work when using our default docker image which does not have /tmp by default.
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-19 11:36:20 -07:00
Derek Collison
bd01f202af
Under double import scenarios we could map to the wrong subject.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-19 05:59:24 -07:00
Derek Collison
ad32edfb59
If a consumer state has a redelivered that is not quite correct that should not be a corrupt state error.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-17 17:44:58 -07:00
Ivan Kozlovic
b6ca86c0c0
Release v2.2.4
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-05-12 17:08:15 -06:00
Ivan Kozlovic
89dec1f978
Merge pull request #2216 from nats-io/pdp/fix-jetstream-relocate
...
Error-checking & resilience for JetStream move
2021-05-12 16:16:24 -06:00
Ivan Kozlovic
a294517946
No need to fetch account if we detect that it is valid NKEY
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-05-12 15:57:26 -06:00
Derek Collison
df8835d2d0
Stupid spelling where I introduced this..
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-12 14:32:06 -07:00
Derek Collison
060f2ec127
Fix stream source lookup and add in optional External to StreamSourceInfo.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-12 12:32:56 -07:00
Phil Pennock
452bec8e42
Don't fix dir perms yet, punt to separate issue
2021-05-12 13:16:10 -04:00
Phil Pennock
408e009ebb
Error-checking, resilience & perms for JetStream move
...
Jetstream movement can fail, so return that error and abort start-up if there's
a failure in moving precious data, rather than serve without it.
Create the jetstream directory if needed.
Create directories for private data mode 0750 not 0755.
This does not handle a directory layout made with 2.2.3, but does support a
2.2.2 to 2.2.4 migration. The empty directories made under 2.2.3 will still
hinder the renames we do here.
2021-05-12 12:32:21 -04:00
Derek Collison
dd91bc8b64
Merge pull request #2206 from nats-io/sd_fix
...
[FIXED] A store directory on disk without 'jetstream' could appear to lose assets on restart.
2021-05-12 08:56:21 -07:00
Derek Collison
30191ada96
Merge pull request #2214 from nats-io/issue_2213
...
[FIXED] #2213
2021-05-12 08:45:30 -07:00
Ivan Kozlovic
bc9ac88032
Merge pull request #2211 from nats-io/fix_2207
...
[FIXED] Websocket: Origin should be checked only if present
2021-05-12 09:13:40 -06:00
Derek Collison
6e17b7a303
Fix for #2213
...
We do not want to report consumers that were created for the purpose of sources or mirrors.
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-12 07:51:53 -07:00
Derek Collison
908b5ec304
Fix for #2205
...
When a response was needed from a leafnode cluster back to a hub, we had rules to disallow.
That rule was a bit dated and since we have cluster origin for leafnode clusters and that
is checked before the message is actually sent we could remove the old rule.
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-12 06:49:11 -07:00
Ivan Kozlovic
854cc15ddb
Fixed typos and updates checkOrigin() doc
...
Also fixed two flappers
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-05-11 19:36:46 -06:00
Ivan Kozlovic
da91b06218
[FIXED] Websocket: Origin should be checked only if present
...
There are 2 options, same_origin and allowed_origins that should
apply only to webbrowsers that set the Origin http header. If
the header is not present, the server should not fail direct
clients using websocket protocol, or leafnodes.
From spec:
https://datatracker.ietf.org/doc/html/rfc6455#section-1.6
The WebSocket Protocol uses the origin model used by web browsers to
restrict which web pages can contact a WebSocket server when the
WebSocket Protocol is used from a web page. Naturally, when the
WebSocket Protocol is used by a dedicated client directly (i.e., not
from a web page through a web browser), the origin model is not
useful, as the client can provide any arbitrary origin string.
Resolves #2207
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-05-11 18:37:16 -06:00
Derek Collison
494ddeec5b
Fix for #2202
...
When using multiple source streams from either different accounts or domains, the stream name could be the same and would cause bad behavior.
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-11 13:12:10 -07:00
Derek Collison
51071c8aa9
Merge pull request #2201 from nats-io/bug_fixes
...
Fix for failing test
2021-05-11 07:54:51 -07:00
Derek Collison
58344c666a
Update based on feedback.
...
Only log when actually moving an account in case other files start polluting the directory.
When failing to look up an account and we have a resolver check to see if its a valid account name before attempting lookup.
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-11 07:54:10 -07:00
Ivan Kozlovic
9fee6c6997
Merge pull request #2203 from nats-io/fix_flappers
...
Fixed flappers
2021-05-11 08:47:48 -06:00
Derek Collison
bad9fba8ec
Fix for store directory on disk prior to 2.2.3 without the 'jetstream' directory.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-10 19:24:58 -07:00
Derek Collison
06fc2f3f06
Fix data race
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-10 17:29:24 -07:00
Derek Collison
bbb94467fb
Fix for failing test, we needed to account for consumers having filtered subjects configured but not really being filtered.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-10 17:01:31 -07:00
Matthias Hanel
f4251feb0f
[added] check for mirror stream return error when de dupe window is set
...
Signed-off-by: Matthias Hanel <mh@synadia.com >
2021-05-10 19:57:17 -04:00
Ivan Kozlovic
25bf470363
Fixed flappers
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-05-10 16:54:33 -06:00
Ivan Kozlovic
4ae9beddea
Merge pull request #2189 from ripienaar/export_clientopts
...
Export the clientOpts structure
2021-05-10 13:51:57 -06:00
Derek Collison
09c4f5841c
Bump version and skip test for now, will fix in followup PR.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-10 10:44:07 -07:00
Ivan Kozlovic
ebe31008ad
Release v2.2.3
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-05-07 17:11:59 -06:00
Ivan Kozlovic
593305dbf6
Merge pull request #2195 from nats-io/stream_name_validate
...
Extend stream/consumer name validation to include more characters
2021-05-07 17:06:56 -06:00
Matthias Hanel
4355e393ea
Merge pull request #2194 from nats-io/js-domains
...
[added] filter system requests by JS domain
2021-05-07 19:06:37 -04:00
Matthias Hanel
230128ed01
[added] filter system requests by JS domain
...
Signed-off-by: Matthias Hanel <mh@synadia.com >
2021-05-07 18:58:40 -04:00
Ivan Kozlovic
19e07f7b97
Extend stream/consumer name validation to include more characters
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-05-07 16:50:29 -06:00
Derek Collison
50bc1867bd
When dealing with filtered subjects do not assume the current state as others can.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-07 15:20:19 -07:00
Derek Collison
26b9295591
2.2.3-beta.8
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-07 14:21:13 -07:00
Derek Collison
9a517194a1
Merge pull request #2191 from nats-io/raft_catchup_snap
...
[FIXED] Raft groups could continually spin trying to catch up.
2021-05-07 14:20:37 -07:00
Derek Collison
4500f7889e
For WorkQueues that have direct we need to make sure they have received the message before deleting.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-07 14:13:36 -07:00
Derek Collison
bd9172fb61
With WorkQueue policy streams that are mirrored or sourced need to only delete if no regular consumers.
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-07 13:14:56 -07:00
Derek Collison
f74bb53c83
Remove debug
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-07 12:21:35 -07:00
Derek Collison
70a2521f95
For interest or workqueue streams with ephemerals we need to not reduce replication to 1.
...
We need the consumer state on the stream leader.
Also if we can't find the store yet for a consumer fallback to calculate needsAck.
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-07 12:07:27 -07:00
Derek Collison
95a9304ae7
Tweak timing
...
Signed-off-by: Derek Collison <derek@nats.io >
2021-05-07 12:07:27 -07:00
Ivan Kozlovic
3b15f98ed3
Merge pull request #2190 from ripienaar/domain_advisories
...
add domain in JS advisories
2021-05-07 11:52:15 -06:00
Ivan Kozlovic
b085738339
Merge pull request #2192 from nats-io/mqtt_domain
...
Don't need to store domain in mqttJSA structure
2021-05-07 11:47:32 -06:00
R.I.Pienaar
b5f846a719
add domain in JS advisories
...
Signed-off-by: R.I.Pienaar <rip@devco.net >
2021-05-07 19:35:46 +02:00
Ivan Kozlovic
7cd412d08d
Don't need to store domain in mqttJSA structure
...
At the time where we need the domain to construct the session hash,
we have access to server options. So use that instead of storing
the domain in the internal mqtt structure.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2021-05-07 11:29:46 -06:00