Commit Graph

2023 Commits

Author SHA1 Message Date
Derek Collison
c00226af3e Merge pull request #1004 from nats-io/race
Fix for reload race on global account
2019-05-21 12:13:32 -07:00
Derek Collison
ecfd1a2c85 Max flapper less so
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-21 11:59:34 -07:00
Derek Collison
8a614b49e1 Fix for reload race on global account
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-21 11:37:15 -07:00
Ivan Kozlovic
19ef4e47a3 Merge pull request #1003 from nats-io/randomize_gw_urls
Better randomize solicited Gateway URLs
2019-05-21 10:23:34 -06:00
Ivan Kozlovic
1cdc3eb41f Better randomize solicited Gateway URLs
Shuffle the array created when iterating through the gateways URLs
map since map iteration may not be well randomized with small maps.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-05-21 09:28:59 -06:00
Ivan Kozlovic
0144e27afd Merge pull request #1001 from nats-io/connect_error_reports
Make the error report attempts configurable
2019-05-21 08:35:13 -06:00
Ivan Kozlovic
7272e4e317 Make the error report attempts configurable
This is a continuation of #1000. Added a configuration to specify
the number of attempts at which the repeated error is reported.
The algo is now to print only the 1st attempt and when current
attempt % <this config param> == 0.

Resolves #969

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-05-20 16:28:48 -06:00
Ivan Kozlovic
36fd47df5d Merge pull request #1000 from nats-io/reduce_connect_err_report_frequency
[UPDATED] Reduce report of failed connection attempts
2019-05-20 10:52:52 -06:00
Ivan Kozlovic
03930ba0e4 [UPDATED] Reduce report of failed connection attempts
This applies to routes, gateways and leaf node connections.
The failed attempts will be printed at the first, after the first
minute and then every hour.
The connect/error statements now include the attempt number.

Note that in debug mode, all attempts are traced, so you may get
double trace (one for debug, one for info/error).

Resolves #969

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-05-20 10:13:56 -06:00
Ivan Kozlovic
25cd64b891 Merge pull request #996 from nats-io/goget-mkpasswd
moving mkpasswd to its own directory to enable go get to install the tool
2019-05-16 15:56:29 -06:00
Alberto Ricart
164a9abcc2 Updated README.md 2019-05-16 16:34:44 -05:00
Alberto Ricart
9e2107c860 moving mkpasswd to its own directory to enable go get to install the tool. 2019-05-16 10:06:26 -05:00
Waldemar Quevedo
031276c22e Merge pull request #995 from nats-io/dockerfile-alpine-symlink
Add symlink to gnatsd on alpine image
2019-05-13 15:16:30 -05:00
Waldemar Quevedo
21d6875b6e Add symlink to gnatsd on alpine image
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2019-05-13 12:44:19 -07:00
Ivan Kozlovic
565efbbbc4 Merge pull request #994 from nats-io/fix_gw_test_race
Fixed gateway test race report
2019-05-13 12:32:34 -06:00
Waldemar Quevedo
edf0e39b62 Merge pull request #993 from nats-io/dockerfile-fixes
Fixes to alpine Dockerfile
2019-05-13 13:24:43 -05:00
Ivan Kozlovic
1eff7bc112 Fixed gateway test race report
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-05-13 11:49:29 -06:00
Waldemar Quevedo
616b840cac Fixes to alpine Dockerfile
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2019-05-13 12:29:47 -05:00
Derek Collison
a0c9907ec0 Merge pull request #991 from nats-io/client
Update for client rename
2019-05-10 15:33:48 -07:00
Derek Collison
d7140a0fd1 Update for client rename
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-10 15:11:30 -07:00
Derek Collison
da9120345c RC version bump [ci skip]
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-09 18:13:31 -07:00
Derek Collison
034a9fd1e4 Merge pull request #990 from nats-io/smap
Optimize updates for leaf node smaps.
2019-05-09 18:12:29 -07:00
Derek Collison
042e5a539a Optimize updates for leaf node smaps.
Previously we would walk all clients bound to an account to
collect the leaf nodes for updating of the subscription maps.

Signed-off-by: Derek Collison <derek@nats.io>
2019-05-09 17:25:17 -07:00
Ivan Kozlovic
19bb4863fb Merge pull request #989 from nats-io/fix_varz
[FIXED] Changes to Varz content and fixed race conditions
2019-05-09 16:06:06 -06:00
Ivan Kozlovic
c014211318 [FIXED] Changes to Varz content and fixed race conditions
----------------------------------------------------------------
Backward-incompatibility note:

Varz used to embed *Info and *Options which are other server objects.
However, Info is a struct that servers used to send protocols to other
servers or clients and its content must contain json tags since we
need to marshal those to be sent over. The problem is that it made
those fields now accessible to users calling Varz() and also visible
to the http /varz output. Some fields in Info were introduced in the
2.0 branch that clashed with json tag in Options, which made cluster{}
for instance disappear in the /varz output - because a Cluster string
in Info has the same json tag, and Cluster in Info is empty in some
cases.
For users that embed NATS and were using Server.Varz() directly,
without the use of the monitoring endpoint, they were then given
access (which was not the intent) to server internals (Info and Options).
Fields that were in Info or Options or directly in Varz that did not
clash with each other could be referenced directly, for instace, this
is you could access the server ID:

v, _ := s.Varz(nil)
fmt.Println(v.ID)

Another way would be:

fmt.Println(v.Info.ID)

Same goes for fields that were brought from embedding the Options:

fmt.Println(v.MaxConn)

or

fmt.Println(v.Options.MaxConn)

We have decided to explicitly define fields in Varz, which means
that if you previously accessed fields through v.Info or v.Options,
you will have to update your code to use the corresponding field
directly: v.ID or v.MaxConn for instance.

So fields were also duplicated between Info/Options and Varz itself
so depending on which one your application was accessing, you may
have to update your code.
---------------------------------------------------------------

Other issues that have been fixed is races that were introduced
by the fact that the creation of a Varz object (pointing to
some server data) was done under server lock, but marshaling not
being done under that lock caused races.

The fact that object returned to user through Server.Varz() also
had references to server internal objects had to be fixed by
returning deep copy of those internal objects.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-05-09 14:33:04 -06:00
Derek Collison
6584a9a828 lint updates
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-06 15:41:38 -07:00
Derek Collison
60978531ee gofmt -s update
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-06 15:15:11 -07:00
Derek Collison
3784bddd98 Merge pull request #985 from nats-io/rename
Changes for rename from gnatsd -> nats-server
2019-05-06 15:09:58 -07:00
Derek Collison
acfe372d63 Changes for rename from gnatsd -> nats-server
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-06 15:04:24 -07:00
Derek Collison
44b01299c4 Bump to RC11 [ci skip]
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-02 17:19:02 -07:00
Derek Collison
7842d38dc2 Merge pull request #983 from nats-io/remoteleaf
Make sure remotes send existing sub interest
2019-05-02 17:18:22 -07:00
Derek Collison
bed56ab9cc Make sure remotes send existing sub interest
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-02 17:05:02 -07:00
Derek Collison
7ebe283601 Bump to RC10 [ci skip]
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-02 15:46:04 -07:00
Derek Collison
dacf0a4e67 Merge pull request #980 from nats-io/leafupdates
Leafnode updates
2019-05-02 15:19:57 -07:00
Derek Collison
90211e5b39 Be safer on gw and sl access
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-02 15:14:47 -07:00
Ivan Kozlovic
74c71f9c47 Merge pull request #981 from nats-io/fix_config_reload_leafnode_issue
Fixed failed configuration reload due to present of leafnode with TLS
2019-05-02 16:07:32 -06:00
Ivan Kozlovic
5e01570ad4 Fixed failed configuration reload due to present of leafnode with TLS
We don't support reload of leafnode config yet, but we need to make
sure it does not fail the reload process if nothing has been changed.
(it would fail because TLSConfig internally do change in some cases)

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-05-02 15:49:56 -06:00
Ivan Kozlovic
220330d569 Merge pull request #979 from nats-io/fix_leafnode_tls_rootca
Fixed LeafNode failed to create TLS connection when CA needed
2019-05-02 15:35:14 -06:00
Derek Collison
5292ec1598 Various fixes, init smap for leafnodes with gateways too
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-02 14:22:51 -07:00
Ivan Kozlovic
434501c3ed Fixed LeafNode failed to create TLS connection when CA needed
If server solicits leaf node TLS connection and needs to verify
the server certificate, it did not have the root CAs set in its
config.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-05-02 15:06:08 -06:00
Derek Collison
be02d7609d Merge pull request #978 from nats-io/lproto
Make sure we use correct MSG prefix
2019-05-01 15:44:23 -07:00
Derek Collison
1c8d4b4b6e Make sure we are set to RMSG for send to Gateways
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-01 15:31:54 -07:00
Derek Collison
1d736ccc61 Make sure we use correct MSG prefix when mixing between leafnodes and routes.
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-01 15:08:20 -07:00
Ivan Kozlovic
628c373299 Merge pull request #976 from nats-io/fix_panic_with_leafnodes_and_gws
Fixed panic with leafnode and gateway when no interest registered
2019-05-01 14:13:05 -06:00
Ivan Kozlovic
dce9d672c1 Fixed panic with leafnode and gateway when no interest registered
Say there are 2 clusters, A and B. A client connects to A and
publishes messages on an account that B has no interest in.
Then a leaf node server connects to B (using same account than
the no-interest is for). Cluster B will ask cluster
A to switch to interest mode only for leaf node account. This
would cause a panic.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-05-01 13:40:17 -06:00
Ivan Kozlovic
f04fb3775d Merge pull request #975 from nats-io/pre_release_rc8
Pre-Release 2.0.0-RC8
2019-05-01 12:18:16 -06:00
Ivan Kozlovic
de46bf5470 Pre-Release 2.0.0-RC8
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-05-01 11:37:48 -06:00
Ivan Kozlovic
8153ba048f Merge pull request #974 from nats-io/leaf-json-tag
Update JSON tag used for leaf node option
2019-04-30 13:23:16 -06:00
Waldemar Quevedo
984a59a6b0 Update json tag used for leaf node option 2019-04-30 12:09:44 -07:00
Derek Collison
1a6c9819f3 Added account export/import benchmark
Signed-off-by: Derek Collison <derek@nats.io>
2019-04-26 12:03:00 -07:00