Commit Graph

1435 Commits

Author SHA1 Message Date
Neven Miculinic
5344e1384e Added parser type safety 2019-02-18 17:36:54 +01:00
Derek Collison
c5510d616e Remove delay for global statsz, bump RC version
Signed-off-by: Derek Collison <derek@nats.io>
2019-02-12 15:17:29 -08:00
Derek Collison
4d932baa26 Update some comments [ci skip]
Signed-off-by: Derek Collison <derek@nats.io>
2019-02-11 19:32:22 -08:00
Derek Collison
c385834f96 Some cleanup on outbound and flush
Signed-off-by: Derek Collison <derek@nats.io>
2019-02-08 19:12:51 -08:00
Ivan Kozlovic
235e7f99dd Fixed use of flush budget for connections other than ROUTER
Need to be explicit about the connection type to apply the budget to.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-02-07 15:01:08 -07:00
Waldemar Quevedo
a733e6781a Merge pull request #896 from nats-io/tls-map-user-cn
Support using TLS cert subject to auth user
2019-02-06 20:57:31 -08:00
Derek Collison
007c98dc03 Support reload of max_control_line by updating connected clients
Signed-off-by: Derek Collison <derek@nats.io>
2019-02-06 14:33:34 -08:00
Waldemar Quevedo
7645d95c18 Support using TLS cert subject to auth user
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2019-02-06 12:36:03 -08:00
Derek Collison
af78552549 Move ints to proper sizes for all
Signed-off-by: Derek Collison <derek@nats.io>
2019-02-05 15:19:59 -08:00
Derek Collison
b8e7b9b68e Some Optimizations
1. Change outbound client structure to be smaller and more cache friendly.
2. Snapshot MaxControlLine into client structure (mcl) to avoid server opts lookup.

Signed-off-by: Derek Collison <derek@nats.io>
2019-02-04 17:07:49 -08:00
Ivan Kozlovic
42f45ce5b6 [FIXED] Possible delays in delivering messages
There is a possibility that a partial write results in data
not being sent in a timely fashion to a subscription.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-02-02 18:42:50 -07:00
Waldemar Quevedo
e4a4c98ad0 Fix logging public nkey on auth violation
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2019-02-01 17:20:04 -08:00
Ivan Kozlovic
2e9fe694d6 Fixed possible race when looking/registering an account
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-01-31 09:25:40 -07:00
Derek Collison
934b28de1c Don't allow overruns for message payloads, fixes #884
Signed-off-by: Derek Collison <derek@nats.io>
2019-01-30 18:31:32 -08:00
Andy Xie
79c6f9e884 enhance ut for server 2019-01-18 10:54:04 +08:00
Ivan Kozlovic
714b75d688 Bump version to 2.0.0-RC2
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-01-14 19:56:49 -07:00
Ivan Kozlovic
d654b18476 Fixed reload of boolean flags
PR #874 caused an issue in case logtime was actually not configured
and not specified in the command line. A reload would then remove
logtime.

Revisited the fix for that and included other boolean flags, such
as debug, trace, etc..

Related to #874

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-01-14 19:18:00 -07:00
Derek Collison
7d6b9144de Fix race, bump version to RC1
Signed-off-by: Derek Collison <derek@nats.io>
2019-01-11 10:58:26 -08:00
Derek Collison
a9735def02 Remove unused statistic
Signed-off-by: Derek Collison <derek@nats.io>
2019-01-10 18:04:20 -08:00
Derek Collison
e3d19ef698 Changes to prevent fan in scenarios from slow consumer state
Signed-off-by: Derek Collison <derek@nats.io>
2019-01-10 15:56:04 -08:00
Ivan Kozlovic
7ad4498a09 Gateways: Remove unused permissions options
Permissions were configured but not implemented. Removing for now.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-01-10 09:49:36 -07:00
Ivan Kozlovic
2186827c46 Merge pull request #874 from nats-io/fix_logtime_reload
[FIXED] Logtime reset to true on config reload
2019-01-10 09:31:06 -07:00
Ivan Kozlovic
c310489689 Merge pull request #872 from nats-io/fix_mem_usage_on_tls_failure
[FIXED] Memory usage for failed TLS connections
2019-01-10 09:16:16 -07:00
Ivan Kozlovic
d8817a37e6 [FIXED] Logtime reset to true on config reload
Resolves #789

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-01-09 19:51:37 -07:00
Ivan Kozlovic
ae239dc3b5 Fixed data race
Resolves #870

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-01-09 18:41:48 -07:00
Ivan Kozlovic
b075c00103 [FIXED] Memory usage for failed TLS connections
Moving some of the connection initialization post TLS handshake
to avoid temporary memory growth when getting repeated failed
connections to any of the client, route and gateway ports.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-01-09 15:50:23 -07:00
Ivan Kozlovic
7449e9ac53 Replace megacheck with staticcheck
Fixed issues reported by staticcheck

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-01-09 14:14:47 -07:00
Derek Collison
7978d8e667 Support for mapping user from TLS client certificate
Signed-off-by: Derek Collison <derek@nats.io>
2018-12-20 07:51:43 -08:00
Derek Collison
a59d9a8867 Fix for export updates moving from private to public not working
Signed-off-by: Derek Collison <derek@nats.io>
2018-12-19 15:14:58 -08:00
Derek Collison
cc5873cd72 Added start time to Statsz from server.
Added in more debug for imports processing.
Changed subs reporting for Statsz.

Signed-off-by: Derek Collison <derek@nats.io>
2018-12-19 13:19:00 -08:00
Ivan Kozlovic
a4fa06aaec Fixed TLS tests to work with new go-nats behavior
Since we no longer default to InsecureSkipVerify:true when
not specifying tls://, some tests needed updating.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-12-19 12:08:46 -07:00
Waldemar Quevedo
502d861466 Bump version
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-12-19 08:42:35 -08:00
Waldemar Quevedo
3cfc2fec29 Only consider as slow consumers clients that did CONNECT
Under some scenarios a client may hit the slow consumer
write deadline during the connecting stage, meaning that
it is possible to consider unhealthy clients could not
finish the TLS handshake as slow consumers.

With this change, we only consider as slow consumers
clients that did connect to the cluster without issues.

Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-12-18 23:17:57 -08:00
Derek Collison
0953016abe Bumped version
Signed-off-by: Derek Collison <derek@nats.io>
2018-12-13 20:39:23 -08:00
Ivan Kozlovic
7c220ba700 Support for service export with wildcards
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-12-13 21:22:01 -07:00
Derek Collison
c87702fd7c jwt lib update, bumped version
Signed-off-by: Derek Collison <derek@nats.io>
2018-12-12 20:43:07 -08:00
Ivan Kozlovic
519c3dab47 Add Gateway test for service import and interest only
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-12-11 14:44:02 -08:00
Ivan Kozlovic
1daa7d58ab Bump version
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-12-11 07:50:31 -08:00
Ivan Kozlovic
4719c618b3 Add some comments
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-12-11 07:12:33 -08:00
Ivan Kozlovic
4b70cdfc89 Fix Gateways with Service Imports
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-12-11 00:27:40 -08:00
Derek Collison
7fb2886098 Add total to account conn updates
Signed-off-by: Derek Collison <derek@nats.io>
2018-12-08 18:52:04 -08:00
Derek Collison
2ab23ca307 Make public for tooling
Signed-off-by: Derek Collison <derek@nats.io>
2018-12-08 18:33:23 -08:00
Ivan Kozlovic
efd891d2ae Fix performance degradation introduced by GW code
This impacted even non gateway traffic

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-12-08 17:44:32 -07:00
Derek Collison
a92ef0252c Should not send disconnect events on account $G.
Converted to authorization error events on different subject.
Add cluster name if gateways are configured and pass in INFO to clients.

Signed-off-by: Derek Collison <derek@nats.io>
2018-12-08 16:07:02 -08:00
Ivan Kozlovic
dd1b598121 Add more tracing for Gateway connect/ip
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-12-08 11:13:54 -07:00
Derek Collison
bb97ae7b6f Allow normal base64 sig for bare nkeys too
Signed-off-by: Derek Collison <derek@nats.io>
2018-12-07 22:52:16 -08:00
Ivan Kozlovic
6eaa1dc351 Resolve IP if gateway listen is 0.0.0.0 or ::
Otherwise, this may be sent to servers in the cluster and to other
gateways which may result in attempt to connect to self which
in case of TLS would produce error.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-12-07 17:28:21 -07:00
Derek Collison
4a0a0d2d7a Allow normal base64 sig as well
Signed-off-by: Derek Collison <derek@nats.io>
2018-12-07 16:17:09 -08:00
Derek Collison
9c667cbdf9 Set internal client to non-default, avoid race
Signed-off-by: Derek Collison <derek@nats.io>
2018-12-07 10:32:10 -08:00
Derek Collison
be0acfd50c Merge pull request #848 from nats-io/ping
Support server ping for statusz
2018-12-07 09:19:28 -08:00