Commit Graph

1746 Commits

Author SHA1 Message Date
Derek Collison
c1ffd48638 Add account details to subsz.
Also allow ability to filter based on account.

Signed-off-by: Derek Collison <derek@nats.io>
2020-06-05 05:53:01 -07:00
Derek Collison
c969e7e424 Do proper ubsubscribe when shutting off restore endpoint
Signed-off-by: Derek Collison <derek@nats.io>
2020-06-04 08:58:14 -07:00
Derek Collison
f7f40f16a5 Bumped version
Signed-off-by: Derek Collison <derek@nats.io>
2020-06-04 07:15:14 -07:00
Derek Collison
f07533c823 Merge pull request #1448 from nats-io/restore
Snapshot restore now works across leafnodes.
2020-06-04 07:13:12 -07:00
Derek Collison
164f44ed18 Require reply subjects for restore chunks
Signed-off-by: Derek Collison <derek@nats.io>
2020-06-04 06:56:07 -07:00
Derek Collison
012d517ba1 Better error handling and reporting for failures
Signed-off-by: Derek Collison <derek@nats.io>
2020-06-04 06:17:50 -07:00
Derek Collison
660ea3c807 Snapshot restore now works across leafnodes.
This also introduces the ability to have flow control inbound for restoring a stream.
If the system detects a reply subject it will respond with a nil payload.
For the last EOF message if a reply is present it will respond with a stream info response or error.

Signed-off-by: Derek Collison <derek@nats.io>
2020-06-03 20:00:59 -07:00
Ivan Kozlovic
5fe60d3084 Removed double connection close trace
In master, this this what happens when a connection is closed
and server runs with `-D`
```
[95023] 2020/06/03 14:55:28.395532 [DBG] 127.0.0.1:54077 - cid:2 - Client connection created
[95023] 2020/06/03 14:55:29.164118 [DBG] 127.0.0.1:54077 - cid:2 - Client connection closed: Client Closed
[95023] 2020/06/03 14:55:29.164191 [DBG] 127.0.0.1:54077 - cid:2 - Client connection closed
```
Notice the trace of connection closed with the reason, and then
the bare connection closed statement.

This double trace was introduced by mistake during the JS branch
work (dd116fcfd4 (diff-853eb184ac73cf9597d7833f6b89e9c9R3547))

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-06-03 15:00:34 -06:00
Ivan Kozlovic
30bc47b87a Merge pull request #1446 from nats-io/ldm_websocket
LameDuckMode takes into account websocket accept loop
2020-06-02 18:30:03 -06:00
Ivan Kozlovic
98ea70a590 LameDuckMode takes into account websocket accept loop
This is related to #1408.
Make sure that we close the websocket "accept loop" if configured
before proceeding with the lame duck mode.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-06-02 17:49:38 -06:00
Matthias Hanel
0a3e89c64a Incorporating comments
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-06-02 18:38:17 -04:00
Matthias Hanel
cf6fcda75c Added default_permissions to accounts and account jwt
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-06-02 16:06:01 -04:00
Phil Pennock
939bc01423 Bump version for server to beta.13 2020-06-02 15:21:34 -04:00
Matthias Hanel
d5180025f5 Fix flapper by making the channel buffered
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-06-02 13:31:41 -04:00
Ivan Kozlovic
1e149f4041 Merge pull request #1440 from nats-io/jwt2
Update imports for jwt/v2
2020-06-02 11:10:21 -06:00
Matthias Hanel
2d61507bb7 Moving nats.go unit test and updating go modules
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-06-02 12:44:00 -04:00
Derek Collison
afc7fc367b Remove hdrs for now, find better way to deliver in client
Signed-off-by: Derek Collison <derek@nats.io>
2020-06-02 07:10:23 -07:00
Derek Collison
8e9462dea4 Make arg order same for Snapshot
Signed-off-by: Derek Collison <derek@nats.io>
2020-06-02 06:24:46 -07:00
Derek Collison
0d2ca9ba54 Fix race, can't clear direct memory since shared
Signed-off-by: Derek Collison <derek@nats.io>
2020-06-02 06:19:04 -07:00
R.I.Pienaar
920dd4269a fix argument order in snapshots
Signed-off-by: R.I.Pienaar <rip@devco.net>
2020-06-02 13:51:50 +02:00
R.I.Pienaar
c57b86128d publish audit advisories to the correct subject
Signed-off-by: R.I.Pienaar <rip@devco.net>
2020-06-02 12:40:03 +02:00
R.I.Pienaar
3fc5c9284a send stream advisories using a helper 2020-06-02 08:48:11 +02:00
Derek Collison
b5dfb984e9 Fixes for race detections under GHA
Signed-off-by: Derek Collison <derek@nats.io>
2020-06-01 18:34:18 -07:00
Derek Collison
07ef71ff98 Avoid parsing large sizes for messages
Signed-off-by: Derek Collison <derek@nats.io>
2020-06-01 16:54:41 -07:00
Matthias Hanel
547afa47d6 Pulling in updated jwtv2 and using server version stored in operator
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-06-01 18:08:50 -04:00
aricart
e7590f3065 jwt2 testbed 2020-06-01 18:00:13 -04:00
Derek Collison
05e38ae527 Merge branch 'master' into sys-acc 2020-06-01 11:53:14 -07:00
Derek Collison
5f130128ce Read INFO used bufio.Reader
Signed-off-by: Derek Collison <derek@nats.io>
2020-06-01 11:46:18 -07:00
Derek Collison
5271be49ee Fix race for snapshots
Signed-off-by: Derek Collison <derek@nats.io>
2020-06-01 09:21:22 -07:00
Ivan Kozlovic
c27f717ef6 [FIXED] Log file size limit not honored after re-open signal
When the logfile_size_limit option is specified, the logfile will
be automatically rotated. However, if user still sends the re-open
signal (SIGUSR1), the log file will then no longer apply the
size limit.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-06-01 09:17:32 -06:00
Derek Collison
4d62a7237d Allow redelivery for AckAll policy, general upgrades to pending beahviors. Fixes #1436
Signed-off-by: Derek Collison <derek@nats.io>
2020-05-31 07:50:50 -07:00
Derek Collison
e584d4efee Merge pull request #1435 from nats-io/js-hdrs
First pass header support for JetStream
2020-05-31 06:01:01 -07:00
Derek Collison
dbde2479c2 Add in headers to consumer delivered messages
Signed-off-by: Derek Collison <derek@nats.io>
2020-05-30 15:03:54 -07:00
Derek Collison
9156fa6c03 Merge pull request #1432 from nats-io/snapshot-check
Allow snapshots to optionally check all message checksums
2020-05-30 12:53:40 -07:00
Derek Collison
8e407f8db4 Do snapshot setup in go routine as well for checkMsgs
Signed-off-by: Derek Collison <derek@nats.io>
2020-05-30 11:28:43 -07:00
Derek Collison
eca04c6fce First pass header support for JetStream
Signed-off-by: Derek Collison <derek@nats.io>
2020-05-30 10:04:23 -07:00
Derek Collison
2bd7553c71 System Account on by default.
Most of the changes are to turn it off for tests that were watching subscriptions and such.

Signed-off-by: Derek Collison <derek@nats.io>
2020-05-29 17:56:45 -07:00
Ivan Kozlovic
44e78a1fb6 Fixed some tests
- A race test may have consumed a lot of fds going in TIME_WAIT
that could cause some issues for other tests
- Missing defer filestore.Stop() that would leave flushLoop()
routines
- A defer for the from server in a LeafNode test
- Rework [Re]ConnectErrorReports that was failing often for me
locally (probably due to exhaustion of fds - too many TIME_WAIT).

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-05-29 17:47:08 -06:00
Derek Collison
e12907ffa6 Allow snapshots to optionally check all message checksums
Signed-off-by: Derek Collison <derek@nats.io>
2020-05-29 09:57:33 -07:00
Derek Collison
0a206b4c64 Snapshot performance tweaks
Signed-off-by: Derek Collison <derek@nats.io>
2020-05-29 08:07:31 -07:00
Derek Collison
10e49ca1c4 Fix more flappers
Signed-off-by: Derek Collison <derek@nats.io>
2020-05-28 14:19:11 -07:00
Derek Collison
f6a9d3bc3c Merge pull request #1429 from kingkorf/master
First check bcrypt '$' prefix before performing rexeg on password
2020-05-28 14:18:03 -07:00
Jacob
c1848a997c First check $ prefix 2020-05-28 22:54:20 +02:00
Ivan Kozlovic
b0e43b6aa9 Fix flappers
- TestResponsePermissions: ensure subscription for service is
registered by server before sending requests.
- TestReloadDoesNotWipeAccountsWithOperatorMode: wait for subject
propagation.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-05-28 13:41:02 -06:00
Derek Collison
f859edaf4f Merge pull request #1428 from nats-io/dl
Avoid deadlock by releasing consumer lock.
2020-05-28 12:36:14 -07:00
Derek Collison
8c9a30b8a1 Avoid deadlock by releasing consumer lock
Signed-off-by: Derek Collison <derek@nats.io>
2020-05-28 12:30:12 -07:00
Derek Collison
5bae878719 Merge pull request #1426 from nats-io/max-conns
Close connections when a remote update exceeds maximum
2020-05-28 11:36:49 -07:00
Derek Collison
12e353e3ac Close connections when a remote update exceeds maximum
Signed-off-by: Derek Collison <derek@nats.io>
2020-05-28 11:09:00 -07:00
Ivan Kozlovic
5d949bf1ea Merge pull request #1424 from nats-io/fix_1421
[FIXED] Possible removal of interest on queue subs with leaf nodes
2020-05-28 11:16:28 -06:00
Derek Collison
11ca6a0bfe Add in snapshot modtime, use PAX format
Signed-off-by: Derek Collison <derek@nats.io>
2020-05-28 10:02:33 -07:00