Commit Graph

1954 Commits

Author SHA1 Message Date
Derek Collison
da2dab92d1 Allow disabling of shared cache with new constuctor. Also share empty results.
Signed-off-by: Derek Collison <derek@nats.io>
2019-04-22 17:53:14 -07:00
Ivan Kozlovic
bc11c1c284 Merge pull request #963 from nats-io/start_go_routine_lead_node
Fixed invocations of startGoRoutine (continued)
2019-04-18 11:23:31 -06:00
Ivan Kozlovic
ac49f715c4 Fixed invocations of startGoRoutine (continued)
The leafnode start of go routines for readloop and writeloop were
missing from PR #961

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-04-18 10:31:23 -06:00
Ivan Kozlovic
f17c5142dd Merge pull request #961 from nats-io/fix_start_go_routine_calls
Fixed invocations of startGoRoutine
2019-04-18 09:59:39 -06:00
Ivan Kozlovic
bf07862140 Fixed invocations of startGoRoutine
Resolves #960

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-04-18 09:51:56 -06:00
Derek Collison
b1d0ec10c6 Merge pull request #959 from nats-io/add_leafnode_test
Test for leafnodes, service imports and clusters
2019-04-17 15:13:15 -07:00
Ivan Kozlovic
fbf84aca9b Merge pull request #958 from nats-io/reduce_gw_init_mem
Reduce startup memory for gateways
2019-04-17 15:38:32 -06:00
Derek Collison
bfef3bd5a6 Fix for service import processing across routes for leaf nodes
Signed-off-by: Derek Collison <derek@nats.io>
2019-04-17 14:37:09 -07:00
Ivan Kozlovic
d8098c134b Reduce startup memory for gateways
Similar to #956 but for gateways code.
Also fixing route test TestLargeClusterMem.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-04-17 15:18:46 -06:00
Ivan Kozlovic
8f35c6451f Merge pull request #957 from nats-io/fix_955
Fixed panic when server needs to send message to more than 8 routes
2019-04-17 13:40:46 -06:00
Ivan Kozlovic
288f00ff81 Fixed panic when server needs to send message to more than 8 routes
Resolves #955

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-04-17 13:02:41 -06:00
Derek Collison
0c8bf0ee8b Merge pull request #956 from nats-io/mem
Reduce startup memory for cluster
2019-04-17 11:21:50 -07:00
Derek Collison
f1d06d6c5b Reduce startup memory for cluster
Signed-off-by: Derek Collison <derek@nats.io>
2019-04-17 11:05:29 -07:00
Ivan Kozlovic
bda267ec2c Add LeafNode import/export test with routes
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-04-16 19:26:28 -06:00
Derek Collison
a4af582dfb Merge pull request #949 from nats-io/gw_doc
Gateways: adding documentation in README [ci skip]
2019-04-15 16:56:37 -05:00
Ivan Kozlovic
756414d833 Gateways: adding documentation in README [ci skip]
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-04-15 15:39:59 -06:00
Derek Collison
e2ee8127e6 Merge pull request #948 from nats-io/fix_readme_typo
[FIXED] small typo in README [ci skip]
2019-04-15 12:30:10 -05:00
Ivan Kozlovic
6eb06ea7b3 [FIXED] small typo in README [ci skip]
Resolves #947

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-04-15 11:24:04 -06:00
Ivan Kozlovic
1777e2d1e2 Merge pull request #943 from nats-io/add_tlsconfig_server_name_test
Added test gateway tlsConfig.ServerName
2019-04-15 11:22:09 -06:00
Ivan Kozlovic
4ea96337ed Added test gateway tlsConfig.ServerName
Checks that if not provided server fails to connect to remote
gateway. Once set to expected hostname ("localhost"), connection
works.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-04-12 11:21:57 -06:00
Ivan Kozlovic
172eca6110 Merge pull request #922 from danielsdeleo/dan/allow-explicit-server-name-in-gateway
Allow explicit server name in tls.Config
2019-04-12 11:20:55 -06:00
Derek Collison
a67fd1bc1a Merge pull request #938 from nats-io/gomod
Update to gomod with vendor directory, update vendored pkgs
2019-04-09 18:04:02 -07:00
Derek Collison
0f98b1506f Update to gomod with vendor directory, update vendored pkgs
Signed-off-by: Derek Collison <derek@nats.io>
2019-04-09 17:41:57 -07:00
Ivan Kozlovic
064b3441cc Merge pull request #937 from nats-io/add_warning_if_cluster_insecure
Add a warning if cluster's insecure setting is enabled
2019-04-09 18:18:31 -06:00
Ivan Kozlovic
4dd1b26cc5 Add a warning if cluster's insecure setting is enabled
For cluster, we allow to skip hostname verification from certificate.
We now print a warning when this option is enabled, both on startup
or if the property is enabled on config reload.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-04-09 17:37:53 -06:00
Ivan Kozlovic
58b21e392c Merge pull request #935 from nats-io/fix-mkpasswd
[FIXED] mkpasswd utility on Windows
2019-04-09 17:24:10 -06:00
Ivan Kozlovic
031267dfd6 Merge pull request #936 from nats-io/leafnode_get_random_ip
LeafNode: do hostname resolution and get random one from result
2019-04-09 17:07:15 -06:00
Colin Sullivan
44fc27f1d0 Fix mkpasswd on windows
Signed-off-by: Colin Sullivan <colin@synadia.com>
2019-04-09 16:41:37 -06:00
Ivan Kozlovic
515ca5e70f LeafNode: do hostname resolution and get random one from result
This is similar to what we do with Gateways.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-04-09 16:33:19 -06:00
Ivan Kozlovic
98161722dc Merge pull request #930 from nats-io/route_send_subs_go_routine_threshold
Conditional send of routed subs from a go routine
2019-04-08 14:03:41 -06:00
Ivan Kozlovic
a6aeed3a6b Move unlock/gosched/lock in flushOutbound
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-04-08 13:57:23 -06:00
Ivan Kozlovic
c191eadc41 Merge pull request #932 from nats-io/leafnode_advertise
LeafNode: support for advertise
2019-04-08 11:29:51 -06:00
Ivan Kozlovic
6b1918efb4 LeafNode: support for advertise
A server that creates a LeafNode connection to a remote cluster
will now be notified of all possible LeafNode URLs in that cluster.
The list is updated when nodes in the cluster come and go.

Also support for advertise address, similar to cluster, gateway, etc..

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-04-08 10:54:39 -06:00
Ivan Kozlovic
2a86112a30 Conditional send of routed subs from a go routine
When a route is established, it is possible that each server sends
its list of subscriptions to each other at the same time. Doing
it in place from the readLoop could then cause problems because
each side could reach a point where the outbound socket buffer
is full and no one is dequeuing data (since readLoop is doing
the send of the subs list).
We changed sending this list from a go routine. However, for small
number of subscriptions, it is not required and was causing some
of the tests to fail because of timing issues.

We will now send in place if the estimated size of all protocols
is below a give threshold (1MB).

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-03-26 17:21:33 -06:00
Derek Collison
9daf6427ea Merge pull request #928 from nats-io/leafnodes
Basic Leafnode support.
2019-03-26 10:18:31 -07:00
Derek Collison
25f51884a2 add route map updates back in
Signed-off-by: Derek Collison <derek@nats.io>
2019-03-26 09:50:53 -07:00
Derek Collison
19c4ccecb8 Better handling of inline info, bug fix for gw and leafnode interest ref count
Signed-off-by: Derek Collison <derek@nats.io>
2019-03-25 15:15:11 -07:00
Ivan Kozlovic
81eb065391 Ensure leafnode listen port set to -1 does not prevent config reload
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-03-25 15:04:52 -06:00
Ivan Kozlovic
540b9be8e5 Reworked gateway processing of RS+ and RS-
Invoke updateInterestForAccountOnGateway() as a defer after all
locks have been released.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-03-25 14:04:34 -06:00
Derek Collison
499f67ff28 Remove defaultPerms processing per PR comment
Signed-off-by: Derek Collison <derek@nats.io>
2019-03-25 12:10:17 -07:00
Derek Collison
92f9f7ed56 Fixes for comments
Signed-off-by: Derek Collison <derek@nats.io>
2019-03-25 11:48:22 -07:00
Derek Collison
bacb73a403 First pass at leaf nodes. Basic functionality working, including gateways.
What is not completed:
1. TLS
2. config to bind local account.
3. Info updates for solicitor to track topology changes like a client.
4. CONNECT sent after INFO for nonce authroization.
5. Authorization
6. Services and Streams tests.
7. config file parsing.

Signed-off-by: Derek Collison <derek@nats.io>
2019-03-25 08:54:47 -07:00
Derek Collison
2ea470a963 Merge pull request #925 from nats-io/add_oleg_maintainer
Add Oleg Shaldibin as maintainer [ci-skip]
2019-03-22 08:14:19 -07:00
ainsley
394bddb6f4 Add Oleg Shaldibin as maintainer 2019-03-22 09:39:43 -05:00
Ivan Kozlovic
b804870e12 Merge pull request #924 from nats-io/ignore_custom_auth_in_relaod
[FIXED] Allow use of custom auth with config reload
2019-03-21 10:46:01 -06:00
Ivan Kozlovic
65cc218cba [FIXED] Allow use of custom auth with config reload
Resolves #923

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-03-20 15:45:17 -06:00
danielsdeleo
8ba3abef6a Allow explicit server name in tls.Config
Signed-off-by: Daniel DeLeo <dan@chef.io>
2019-03-11 15:28:32 -07:00
Ivan Kozlovic
04deabf27d Merge pull request #921 from nats-io/cluster_tls_insecure
[ADDED] Cluster tls insecure configuration
2019-03-11 15:25:18 -06:00
Alexei Volkov
83aefdc714 [ADDED] Cluster tls insecure configuration
Based on @softkbot PR #913.
Removed the command line parameter, which then removes the need for Options.Cluster.TLSInsecure.
Added a test with config reload.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-03-11 14:48:22 -06:00
Waldemar Quevedo
c625970909 Merge pull request #919 from nats-io/travis-updates
Add Go 1.12 to Travis
2019-03-06 20:37:46 -08:00