Commit Graph

1271 Commits

Author SHA1 Message Date
Sergey Sarbash
1ea25001a2 DOC: added a clarification about a token usage (#563)
* DOC: added a clarification about a token usage

* Minor edits, correction and example

- minor language edits
- corrected name of `util/mkpasswd.go` for all prior references to `util/mkpassword.go`
- gave example output from `util/mkpasswd.go` with comments referencing where to use pass vs bcrypt hash.
2017-08-28 11:13:45 -04:00
Ivan Kozlovic
4246f83c74 Merge pull request #567 from nats-io/add_arm_build
[ADDED] ARM64v8 Build
2017-08-25 14:51:58 -06:00
Ivan Kozlovic
3179575b15 Exclude megacheck for Go 1.9 for now 2017-08-25 09:59:11 -06:00
Ivan Kozlovic
049675088d [ADDED] ARM64v8 Release build
- Add linux/arm64 to cross compile script
- Update .travis.yml to push builds on Go 1.8.x version
- Update Dockerfile to Go 1.8.3
- Change Dockerfile.win64 to actually build all the builds that
  we would want to provide a Docker image for
2017-08-25 09:20:31 -06:00
Peter Miron
f2854ee461 increased tls timeout to get test passing on arm. (#566)
* increased tls timeout to get test passing on arm.

* fixed timeout to appropriate integer.
2017-08-24 19:36:07 -07:00
Ivan Kozlovic
10fd640aa4 Merge pull request #561 from nats-io/fix_issue_558
[FIXED] Use of `*` and `>` in subjects as literals
2017-08-24 20:26:12 -06:00
Ivan Kozlovic
2de6622fd0 Update MIT License Copyright data [ci skip] 2017-08-24 09:23:33 -06:00
Ivan Kozlovic
0cc49ece4a Improve matchLiteral further and add some more tests 2017-08-17 13:00:09 -06:00
Ivan Kozlovic
42b27d2710 Improve matchLiteral performance and simplify if conditions 2017-08-16 17:43:33 -06:00
Ivan Kozlovic
30eeac27e9 add matchLiteral benchmark 2017-08-16 16:28:24 -06:00
Ivan Kozlovic
515779ae0b [FIXED] Use of * and > in subjects as literals
The issue was that a subject such as `foo.bar,*,>` would be
inserted to the cache as is, but when trying to remove from the
cache, calling matchLiteral() with the above subject in the cache
against the same subject would return false. This is because
matchLiteral would treat those characters as wildcards token.

Note that the sublist itself splits subjects on the `.` separator
and seem not bothered by such subject (would have `foo` and `bar,*,>`
tokens). Also, note that IsValidSubject() and IsValidLiteralSubject()
properly checked that the characters `*` and `>` are treated
as wildcards only if they are tokens on their own.

Resolves #558
2017-08-16 12:12:18 -06:00
Peter Miron
050049c2c7 Merge pull request #556 from nats-io/doc-string-escape
Document string escape behavior [ci skip]
2017-08-16 12:16:36 -04:00
Peter Miron
5f8188f40a Update README.md
updated per Ivan's recommendation.
2017-08-16 12:15:25 -04:00
Tyler Treat
0497d59279 Merge pull request #559 from nats-io/update-office-hours
Update office hours schedule [ci skip]
2017-08-14 11:40:17 -05:00
Colin Sullivan
6099eb9c36 Update office hours schedule [ci skip] 2017-08-14 10:35:10 -06:00
Ivan Kozlovic
8fe9ef27c7 Merge pull request #557 from nats-io/add_megacheck
Added megacheck
2017-08-14 09:47:27 -06:00
Ivan Kozlovic
20926a6176 Added megacheck
This tool combines staticcheck, gosimple and unused.
Fixed reports from unused.
2017-08-11 17:28:18 -06:00
Colin Sullivan
dd59ba184f Document string escape behavior [ci skip] 2017-08-10 15:19:14 -06:00
Ivan Kozlovic
396d9f9d76 Merge pull request #552 from nogoegst/default-options-func
Use DefaultOptions as function that produces new Options on every call
2017-08-07 20:56:36 -06:00
Tyler Treat
f2be329857 Merge pull request #554 from nats-io/office-hours
Add a community section and office hours [ci skip]
2017-08-07 12:45:55 -05:00
Colin Sullivan
393bbb7c03 Add a community section and office hours. 2017-08-04 13:21:32 -06:00
Ivan Markin
c3455e7874 Use GetDefaultOptions from go-nats instead of deprecated DefaultOptions 2017-07-31 20:20:36 +00:00
Ivan Kozlovic
3ee7f3b3b1 Merge pull request #551 from ingosus/zombie_sub
[FIXED] Subscriptions not closed in the cluster when using auto unsubscribe
2017-07-21 08:28:43 -06:00
ingosus
5145723164 Fix subscriptions zombie at autounsubscribe on cluster 2017-07-21 12:42:41 +03:00
Ivan Kozlovic
4ccbd2e3ba Merge pull request #548 from nats-io/new_release
Release 1.0.2
v1.0.2
2017-07-19 13:33:25 -06:00
Ivan Kozlovic
102b9ed3d4 Release 1.0.2
Essentially patch for Windows Docker Images.
2017-07-19 13:21:27 -06:00
Ivan Kozlovic
75ad27c073 Merge pull request #545 from nats-io/improve_config_reload_coverage
Improved Config Reload test coverage
2017-07-19 12:15:29 -06:00
Ivan Kozlovic
9ff62e21a9 Fix typos 2017-07-19 11:59:05 -06:00
Ivan Kozlovic
1fa136b21a Improved Config Reload test coverage
- Move the kill of a server in a cluster test to ensure that
  list of routes to remove is not empty.
- Change write_deadline reload value to 3s to make it different
  from default value
- Add test for option that does not support hot-swapping
2017-07-19 11:59:05 -06:00
Ivan Kozlovic
c1e295957d Merge pull request #547 from nats-io/fix_duplicate_route_handling
[FIXED] Handling of duplicate routes
2017-07-19 11:58:10 -06:00
Ivan Kozlovic
2befd973cc Fixed DATA RACE and ensure route is not created/accepted on shutdown
- Created a setter for the closed flag.
- Check if route is closed under lock and set a boolean if so,
  so we don't check c.route outside of c's mutex.
- Ensure that we do not create a route on shutdown, which would
  leave a connection hanging (was seen in some config reload tests).
2017-07-19 10:42:18 -06:00
Ivan Kozlovic
69891d37ac Fix import ordering 2017-07-19 09:02:25 -06:00
Ivan Kozlovic
d26bef4edf Merge pull request #544 from nats-io/fix_win_docker
[FIXED] Windows Docker Images
2017-07-18 19:18:00 -06:00
Ivan Kozlovic
9cddf0fcdf [FIXED] Windows Docker Image
The use of the `svc` API prevented the NATS Server to run as
a container on both nanoserver and windowsservercore Docker images.
An attempt was made to replace svc.Debug with normal server.Start()
if detected to be interactive, however, that did not work. The
fact of detecting if interactive or not already requires connecting
to the service controller apparently.
This change looks up for an environment variable (NATS_DOCKERIZED)
and if set to "1", will not make use of the `svc` package.
This environment variable will be set in the Docker image (in
nats-docker/windows/nanoserver/Dockerfile and windowsservercore/Dockerfile).

Resolves #543
2017-07-18 19:00:17 -06:00
Ivan Kozlovic
0e2882d741 [FIXED] Handling of duplicate routes
When A connects to B and B connects to A (either based on static
configuration - explicit routes, or because of auto-discovery -
implicit routes), it is possible that each server initially
registers the route from the opposite TCP connection. It will
then result in each server dropping the connection.

We were previously setting a retry flag in the first accepted route
based on the name of servers, which means that regardless of
duplicate detection, the server with the "smaller" server name would
try to reconnect when the route connection was closed. For instance,
suppose that server B connects to server A, when B disconnects, A
would try to reconnect once to B. This became problematic in the
case of configuration reload, because removing the route from B to
A would still result in a route created from A to B.

Also, when a route attempts a reconnect, a random delay is added
to avoid repeated failure cycles that may occur in case where
A connects to B and B to A.
2017-07-18 18:25:56 -06:00
Ivan Kozlovic
9a44c20890 Merge pull request #541 from nats-io/prepare_for_new_release
Prepare for next release
v1.0.0
2017-07-12 10:34:12 -06:00
Ivan Kozlovic
009362dd65 Prepare for next release 2017-07-12 09:57:32 -06:00
Ivan Kozlovic
56649b3273 [FIXED] Possible data race in routez when route disconnects (#540)
* [FIXED] Possible data race in routez when route disconnects

Resolves #539
2017-07-11 16:11:22 -06:00
Ivan Kozlovic
1ca5e57b2d Merge pull request #538 from nats-io/use_loopback
Use loopback for some config reload tests
2017-07-11 11:48:11 -06:00
Ivan Kozlovic
edc1d74c0c Use loopback for some config reload tests 2017-07-11 11:38:32 -06:00
Ivan Kozlovic
00321097e4 Merge pull request #537 from nats-io/bump_check_cluster_timeout
Bumped timeout for checkClusterFormed and use stackFatalf()
2017-07-11 10:28:56 -06:00
Ivan Kozlovic
6755617914 Bumped timeout for checkClusterFormed and use stackFatalf() 2017-07-11 10:19:34 -06:00
Tyler Treat
d0a2661c32 Merge pull request #536 from nats-io/fix_symlink_garbage
Handle symlinks better
2017-07-11 11:12:34 -05:00
Tyler Treat
136355f28e Merge branch 'master' of github.com:nats-io/gnatsd into fix_symlink_garbage 2017-07-11 10:39:43 -05:00
Tyler Treat
10c70cb570 Handle symlinks better
It's hard to implement a bulletproof solution for cleaning up the
symlinks created by config reload tests on failure since, for example,
there is nothing we can do when log.Fatal is called. Instead, prevent
the existence of a symlink from failing the tests if there is one
hanging around. Generally, these symlinks will not be left unless
os.Exit was called (as is the case with log.Fatal).
2017-07-11 10:35:29 -05:00
Ivan Kozlovic
8a1ac81620 Merge pull request #535 from nats-io/config_reload_cluster_tests
Fixed some config reload cluster tests
2017-07-11 09:14:56 -06:00
Ivan Kozlovic
28d4420a2c Fixed some config reload cluster tests
Use checkClusterFormed() to minimize risk of test failures due
to the subscription not being registered through the cluster.
2017-07-11 09:06:00 -06:00
Tyler Treat
f246c09411 Merge pull request #533 from nats-io/fix_comment
Fix error in test comment
2017-07-10 19:38:48 -05:00
Tyler Treat
dea34307f1 Merge branch 'master' of github.com:nats-io/gnatsd into fix_comment 2017-07-10 19:00:49 -05:00
Ivan Kozlovic
8f52f53a90 Merge pull request #532 from nats-io/fix_windows
Fix "error opening file" errors in tests for Windows
2017-07-10 17:26:15 -06:00