Commit Graph

4549 Commits

Author SHA1 Message Date
R.I.Pienaar
82eb6b6d5e Merge pull request #2255 from ripienaar/error_updates
Minor updates to error data
2021-05-28 16:30:16 +02:00
R.I.Pienaar
7088510188 Minor updates to error data
Signed-off-by: R.I.Pienaar <rip@devco.net>
2021-05-28 15:52:22 +02:00
Waldemar Quevedo
f89d06190c Merge pull request #2240 from nats-io/ocsp-caching
OCSP Stapling
2021-05-26 15:21:14 -07:00
Waldemar Quevedo
d78a91836b ocsp: Add caching staples to disk to store dir
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2021-05-26 15:04:05 -07:00
R.I.Pienaar
6600947266 Merge pull request #2168 from ripienaar/richer_api_errors
richer api errors proposal
2021-05-26 18:12:06 +02:00
R.I.Pienaar
639d07bca4 typo fix, report highest number
Signed-off-by: R.I.Pienaar <rip@devco.net>
2021-05-26 17:30:31 +02:00
R.I.Pienaar
ee9d10f40b restore old error constants for backwards compat
Signed-off-by: R.I.Pienaar <rip@devco.net>
2021-05-26 08:04:50 +02:00
R.I.Pienaar
0d391b02eb richer api errors proposal
Signed-off-by: R.I.Pienaar <rip@devco.net>
2021-05-26 08:04:50 +02:00
Ivan Kozlovic
cf433ae007 Merge pull request #2250 from nats-io/release_2_2_6
Release v2.2.6
v2.2.6
2021-05-24 15:55:26 -06:00
Ivan Kozlovic
1c00f77bc5 Release v2.2.6
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-05-24 15:42:15 -06:00
Matthias Hanel
b1dee292e6 [changed] pinned certs to check the server connected to as well (#2247)
* [changed] pinned certs to check the server connected to as well

on reload clients with removed pinned certs will be disconnected.
The check happens only on tls handshake now.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-05-24 17:28:32 -04:00
Derek Collison
f5c3da32ff Merge pull request #2249 from nats-io/varz-js
Fix for varz JetStream usage showing total account usage vs server usage.
2021-05-24 14:11:10 -07:00
Derek Collison
0d6b022780 Fix for varz JetStream usage showing total account usage vs server usage.
Signed-off-by: Derek Collison <derek@nats.io>
2021-05-24 14:05:42 -07:00
Matthias Hanel
252558caaa Merge pull request #2248 from nats-io/js-mappings
[fixed] deletion of js mappings on account jwt update
2021-05-24 16:53:42 -04:00
Matthias Hanel
748b7c32f4 [fixed] deletion of js mappings on account jwt update
fixed by moving setting of the mappings into a common function that is
also called when the jwt is updated

Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-05-24 16:44:14 -04:00
Jaime Piña
b2e1ff7a7c Add OCSP support
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2021-05-24 10:52:27 -07:00
Jaime Piña
0072107110 Vendor ocsp dep 2021-05-24 10:52:27 -07:00
Derek Collison
9d867889ca Merge pull request #2246 from nats-io/wq-retention
Fix for #2243. We were not allowing replicated acks processing for work queues.
2021-05-24 10:01:04 -07:00
Derek Collison
8888ab51f4 Fix for #2243. We were not allowing replicated acks processing for workqueues properly, only interest retention.
Signed-off-by: Derek Collison <derek@nats.io>
2021-05-24 09:53:31 -07:00
Derek Collison
11539ecdd7 Merge pull request #2245 from nats-io/msgid
[FIXED] #2242.
2021-05-24 09:29:43 -07:00
Derek Collison
8f2457fd30 Merge branch 'master' into msgid 2021-05-24 09:22:35 -07:00
Derek Collison
308355a2fd Fix for #2242.
When we had a duplicate detected in R>1 mode we set the skip sequence indicator but were not using that when dealing with underlying store.

Signed-off-by: Derek Collison <derek@nats.io>
2021-05-24 08:21:41 -07:00
Derek Collison
d4a0b87235 Merge pull request #2241 from nats-io/corrupt
Fix for corrupting a message when extending an existing header.
2021-05-24 08:08:45 -07:00
Derek Collison
a52697170c Fix for corrupting a message when extending an existing header.
We had a report of corrupt message payloads when going across leafnodes between streams that were sourced from one another.
We were incorrectly using the underlying buffer when a header already existed.

Signed-off-by: Derek Collison <derek@nats.io>
2021-05-23 11:28:48 -07:00
Ivan Kozlovic
b7e1f66bea Merge pull request #2238 from nats-io/release_2_2_5
Release v2.2.5
v2.2.5
2021-05-20 16:33:12 -06:00
Ivan Kozlovic
087b7f92db Release v2.2.5
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-05-20 16:17:39 -06:00
Matthias Hanel
89476279b4 Merge pull request #2237 from nats-io/error-on-bad-api-prefix
[fixed] issue with invalid api prefix for source/mirror
2021-05-20 18:17:01 -04:00
Matthias Hanel
b93f5975e8 [fixed] issue with invalid api prefix for source/mirror
addressed by failing

Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-05-20 18:01:49 -04:00
Ivan Kozlovic
b5ea80dd75 Merge pull request #2236 from nats-io/fix_2226
[FIXED] MQTT: session fails if the number servers below cluster size
2021-05-20 15:21:19 -06:00
Matthias Hanel
6f6f22e9a7 [added] pinned_cert option to tls block hex(sha256(spki)) (#2233)
* [added] pinned_cert option to tls block hex(sha256(spki))

When read form config, the values are automatically lower cased.
The check when seeing the values programmatically requires 
lower case to avoid having to alter the map at this point.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-05-20 17:00:09 -04:00
Ivan Kozlovic
69e9c6cddd [FIXED] MQTT: session fails if the number servers below cluster size
Say with a cluster of 3, all MQTT assets are created with a replicas
of 3. However, when a server is shutdown, then any new MQTT client
will fail to connect because we try to create a session stream
with R(3), which leads to insufficient resources.

The longer term solution should be for the server to allow the
creation of an asset with a R() value that is bigger than the
current number of running servers as long as there is quorum.

For now, we will reduce the R() value for the sessions if we get
an "insufficient resources" error.

Note that the other assets still will use the compute R() based
on cluster size. So the first time that a client on a given
account is started, we will still need to have R() == cluster size
(at least for R(3)).

Partially resolves #2226

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-05-20 13:51:37 -06:00
Derek Collison
7936faf00e Merge pull request #2230 from nats-io/mapped
Mapped cross account test
2021-05-20 11:32:33 -07:00
Ivan Kozlovic
c1542ac9bb Merge pull request #2224 from BlizzTom/http-req-stats-panic-fix
[FIXED] Always initialize httpReqStats
2021-05-20 09:43:12 -06:00
Derek Collison
a4b10cd64c Merge pull request #2234 from nats-io/data-race-unsubscribe
Fix a data race.
2021-05-20 07:41:17 -07:00
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
afec045b61 Merge pull request #2231 from nats-io/remove-peer
Changed remove peer logic to wait for RemovePeer entry to be replicated.
2021-05-20 06:55:58 -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
6e6edd0b47 Mapped cross account test
Signed-off-by: Derek Collison <derek@nats.io>
2021-05-19 15:58:27 -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
64593db99c Merge pull request #2225 from nats-io/double_import
Under double import scenarios we could possibly map to the wrong subject.
2021-05-19 08:50:59 -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
Tom Anderson
3ed10f4dde [Fixed] Always initialize httpReqStats
If you attempt to use the server http handlers it would panic unless you explicity called StartMonitoring

This isn't ideal to have a secondary http server running for those that are embedding nats and only want to host the http handlers on a pre-existing http server

Talked with @kozlovic via Slack about this
2021-05-18 17:06:42 -07:00
Derek Collison
49b62624d1 Merge pull request #2223 from nats-io/bad_consumer_state
Bad redelivered values on consumer state should not panic.
2021-05-18 09:26:52 -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
a5876b02de Merge pull request #2177 from nats-io/headers-adr
clarified client operations to promote cross-client compatibility
2021-05-13 12:50:49 -06:00
Alberto Ricart
62c19d07ad Clarified client operations to promote cross-client compatibility
- Changed to be case-sensitive by default
- Removed all references to the Go implementation
- Clarified how append in a case-insensitive context should behave

[ci skip]

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-05-13 12:22:52 -06:00
Ivan Kozlovic
924b314a79 Merge pull request #2219 from nats-io/release_2_2_4
Release v2.2.4
v2.2.4
2021-05-12 17:33:11 -06:00