Commit Graph

907 Commits

Author SHA1 Message Date
Derek Collison
b46d3fbcd9 Merge pull request #794 from nats-io/deny_perms
Fix for #792
2018-11-07 10:54:32 -08:00
Derek Collison
42b5e664c6 Cleanup reload logic on subs
Signed-off-by: Derek Collison <derek@nats.io>
2018-11-07 09:57:26 -08:00
Derek Collison
5077025801 Make assiging global account consistent
Signed-off-by: Derek Collison <derek@nats.io>
2018-11-07 09:52:29 -08:00
Derek Collison
a442f6cde4 Collect remove subs on first check
Signed-off-by: Derek Collison <derek@nats.io>
2018-11-07 09:25:32 -08:00
Derek Collison
3dde5b5a93 megacheck fix
Signed-off-by: Derek Collison <derek@nats.io>
2018-11-06 20:06:18 -08:00
Derek Collison
b2ec5b3a98 Added more tests, e.g. reload
Signed-off-by: Derek Collison <derek@nats.io>
2018-11-06 19:58:42 -08:00
Derek Collison
1ce1a434b0 Fix for #792
Allow deny clauses for subscriptions to still allow wildcard subscriptions but do not deliver the messages themselves.

Signed-off-by: Derek Collison <derek@nats.io>
2018-11-06 15:00:21 -08:00
Waldemar Quevedo
61d1ec53fa Allow conf vars within account block
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-11-02 14:42:29 -07:00
Derek Collison
2e579b8220 Remove double allocation
Signed-off-by: Derek Collison <derek@nats.io>
2018-11-01 13:53:44 -07:00
Derek Collison
57904107b2 Added L1 cache to routes
Signed-off-by: Derek Collison <derek@nats.io>
2018-11-01 13:31:12 -07:00
Derek Collison
ea5a6d9589 Updates for comments, some golint fixes
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-31 20:28:44 -07:00
Derek Collison
4058948185 Updates based on feedback
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-29 13:51:21 -07:00
Derek Collison
ec3115ad21 Fix double trace
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-25 09:30:13 -07:00
Derek Collison
47963303f8 First pass at new cluster design
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-24 21:29:29 -07:00
Ivan Kozlovic
9a1cb08394 Updates based on comments
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-10-24 11:05:14 -06:00
Ivan Kozlovic
d35bb56d11 Added support for Accounts reload
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-10-23 14:58:53 -06:00
Ivan Kozlovic
c173d55e2e Update based on comments
Start the lame duck mode in a go routine in the signal handler
because I think we want to be able to shutdown the server while
in that mode.

Kept the closing as a loop in the lameDuckMode() function (did
not use a timer).

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-10-22 16:27:30 -06:00
Ivan Kozlovic
0067c3bb04 Added support for lame duck mode
When receiving SIGUSR2 signal (or -sl ldm) the server stops
accepting new clients, closes routes connections and spread the
closing of client connections based on a config lame duck duration
(default is 30sec). This will help preventing a storm of client
reconnect when a server needs to be shutdown.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-10-19 19:07:37 -06:00
Waldemar Quevedo
e819f15ca4 Collecting all config errors then flush before exit
Show warnings on server startup

Removes notions around `pedantic` checks and instead
just reports the warnings in case there were any, or
the collection of errors that may have been found
in the configuration file.

Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-10-16 13:29:29 -07:00
Waldemar Quevedo
ed1af40996 Add source to config errors
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-10-16 13:29:29 -07:00
Waldemar Quevedo
fdd1536a8a Always parse config file with checks enabled
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-10-16 13:29:29 -07:00
Waldemar Quevedo
a0fe8fd0a5 Fixes to remove traced password
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-10-12 17:00:41 -07:00
Derek Collison
05bfeddbce Fix comment
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-08 11:24:14 -07:00
Derek Collison
ce95e5a84b Cleanup of shadowed subscriptions, fixes #772
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-08 09:53:41 -07:00
Derek Collison
3438468c95 ring buffer test
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-06 14:06:14 -07:00
Derek Collison
21ee7ed81a Fixes #770
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-06 14:04:14 -07:00
Derek Collison
b014db8502 Updates based on comments
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-04 12:50:12 -07:00
Derek Collison
0d1d51a3bb Support for global/reserved accounts
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-04 12:12:34 -07:00
Derek Collison
86c604932c Merge pull request #760 from nats-io/config-report-pos
Report position of configuration errors
2018-10-03 15:23:06 -07:00
Waldemar Quevedo
18a62cdb60 Change style of reporting errors with line and pos
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-10-03 14:52:57 -07:00
Ivan Kozlovic
eab4af02a3 Fixed accounts users loading
Resolves #764

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-10-03 13:28:18 -06:00
Derek Collison
e78828ce4c Changed name to better pruning vs prune running
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-03 08:38:24 -07:00
Derek Collison
364f3fe388 use time.Minute
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-02 14:39:47 -07:00
Derek Collison
069732c768 Add max and ttl for reponse maps
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-02 14:14:10 -07:00
Waldemar Quevedo
181b07ebc1 Config reporting with line and error position
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-10-02 11:38:15 -07:00
Derek Collison
dc745f02be Remove helper
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-01 08:47:35 -07:00
Derek Collison
14cdda8cd4 Updates from comments
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-30 09:36:32 -07:00
Derek Collison
9f8330bcc9 Added import and export parsing for configs
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-29 13:04:19 +02:00
Derek Collison
ae21fa22b7 API changes to match config for account mappings
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-29 13:04:19 +02:00
Derek Collison
c4bcbf6275 Map anonymous reply subjects
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-29 13:04:19 +02:00
Derek Collison
f6cb706c68 First pass req/reply across accounts
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-29 13:04:19 +02:00
Derek Collison
620e1d7364 Basic account mapping via import and export
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-29 13:04:19 +02:00
Derek Collison
1cbfbfa071 Basic account support
Signed-off-by: Derek Collison <derek@nats.io>
2018-09-29 13:04:19 +02:00
Ivan Kozlovic
d5ceade750 Merge pull request #753 from nats-io/route_perms_reload
[ADDED] Support for route permissions config reload
2018-09-27 10:08:55 -06:00
Ivan Kozlovic
4cd3453392 Set buf size limit to 50% of max_pending
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-09-27 09:43:56 -06:00
Ivan Kozlovic
2a1811b600 Fixed flappers
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-09-26 15:58:48 -06:00
Ivan Kozlovic
e7f5cc82f0 Updates
- Use stack buffers
- Ensure that buffer size is no greater than 90% of max_pending
- Added test with low max_pending

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-09-26 12:19:14 -06:00
Ivan Kozlovic
178aab096d Updates based on comments
- Removed un-needed lock/unlock
- Buffer SUBs/UNSUBs protocols and ensure flushing when buffer
  gets to a certain size (otherwise route would get disconnected
  with high number of subscriptions)

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-09-24 16:06:34 -06:00
Ivan Kozlovic
178766d6c9 [ADDED] Support for route permissions config reload
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-09-18 18:28:40 -06:00
Ivan Kozlovic
a065d13228 Merge pull request #752 from wallyqs/redacted-pass-regex-fix
Fix regex matching group for removing password
2018-09-16 10:42:42 -06:00