Commit Graph

1066 Commits

Author SHA1 Message Date
Derek Collison
eae0834669 lower bcrypt costs for race tests, raise timeouts 2017-04-20 13:20:45 -07:00
Derek Collison
76de921f65 Cleanup for Auth 2017-04-20 12:41:48 -07:00
Derek Collison
e35c4204fc Merge pull request #471 from nats-io/fix_issue_470
[FIXED] Release on linux amd64 is the only one dynamically linked
2017-04-07 12:01:35 -07:00
Ivan Kozlovic
67a4a37616 [FIXED] Release on linux amd64 is the only one dynamically linked
We are using the tool from https://github.com/mitchellh/gox
for cross compilation. When we issue a new release, we create a
tag and trigger Travis build which will then invoke the script and
upload the files to GH.

We were affected by https://github.com/mitchellh/gox/issues/55

Invoking the script on a Linux amd64 would produce this:

file pkg/gnatsd-linux-amd64/gnatsd
pkg/gnatsd-linux-amd64/gnatsd: ELF 64-bit LSB executable, x86-64,
version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, stripped

With the fix, you'll get this:

file pkg/gnatsd-linux-amd64/gnatsd
pkg/gnatsd-linux-amd64/gnatsd: ELF 64-bit LSB executable, x86-64,
version 1 (SYSV), statically linked, stripped

Resolves #470
2017-04-07 12:51:59 -06:00
Derek Collison
64dcdd6a7e Merge pull request #465 from nats-io/add_token_config_support
[ADDED] Support for token in configuration file
2017-03-30 11:22:52 -07:00
Ivan Kozlovic
0cf8455a3a [ADDED] Support for token in configuration file
So far, it was only possible to use token from the command line.

Resolves #464
2017-03-30 11:23:07 -06:00
Derek Collison
91f4997795 Merge pull request #461 from nats-io/improve_code_coverage
Increase code coverage
2017-03-24 14:19:06 -07:00
Ivan Kozlovic
474cacad90 Increase code coverage
- Two files were showing poor code coverage affecting the overall
total.
- Fix to a route test that would fail on Windows.

Resolves #460
2017-03-24 11:58:58 -06:00
Derek Collison
b11ba5b118 Merge pull request #456 from wallyqs/gometalinter-checks
Fixes to a couple of `gometalinter` checks
2017-03-24 09:35:09 -07:00
Derek Collison
e1abaa5152 Merge pull request #459 from nats-io/fix_ping_to_tls_conn
[FIXED] Server not sending PINGs to TLS connections (clients or routes)
2017-03-24 09:30:47 -07:00
Ivan Kozlovic
a0245fc0c8 [FIXED] Server not sending PINGs to TSL connections (clients or routes)
- Removed unnecessary cast check to (*net.TCPConn). When the timer
fires, the connection is already established. Replaced with check
that connection has not been closed.
- Add PING test that checks that pings are sent to TLS connections.
- Changed Go version to 1.7.5 in travis.
- Removed test package from code coverage.
2017-03-24 09:49:42 -06:00
Waldemar Quevedo
ed05c357fc Remove unused type 2017-03-23 20:41:47 -07:00
Waldemar Quevedo
8926fa0ff1 Fix unconvert checks in server 2017-03-23 20:41:38 -07:00
Derek Collison
42a539f1c1 Merge pull request #454 from nats-io/add-spc-readme
Readme fixups
2017-03-22 22:32:26 -07:00
Derek Collison
2e7682a43c Merge pull request #455 from nats-io/fix_gosimple_error
Fix gosimple report
2017-03-22 22:31:57 -07:00
Ivan Kozlovic
a804516540 Fix gosimple report 2017-03-22 22:52:33 -06:00
Waldemar Quevedo
19e6216cbc Remove -DV from non debugging sections in readme 2017-03-22 19:08:37 -07:00
Waldemar Quevedo
a4fc1b648b Fixups to readme
Add missing space before title
2017-03-22 16:54:18 -07:00
Larry McQueary
902fb62166 Add ROADMAP.md (#448)
* Add initial ROADMAP.md
2017-03-10 13:25:36 -07:00
Peter Miron
4fa3b94645 Merge pull request #445 from nats-io/fix-monitoring-data-races
Use atomic.Load to access fields used in /varz and /subsz requests.
2017-03-03 14:44:28 -05:00
Colin Sullivan
efbd423e96 Updates based on comments. 2017-03-01 20:46:47 -07:00
Colin Sullivan
3f8a0d8b4a Use atomic.Load to access fields used in /varz and /subsz requests.
* Includes a unit test that checks all endpoints for data races.
2017-03-01 16:13:20 -07:00
Larry McQueary
9dd2f7cb65 [ADDED] Add issue and PR templates [CI SKIP] (#443)
* [ADDED] Add issue and PR templates [CI SKIP]
2017-02-26 14:13:32 -07:00
Colin Sullivan
80490020b2 Merge pull request #440 from nats-io/travis-go18
Update Travis to use Go 1.8
2017-02-22 16:06:49 -07:00
Colin Sullivan
c9d90734c5 Fix staticcheck error found moving to go 1.8 2017-02-21 15:30:15 -07:00
Colin Sullivan
0464583235 Update travis to use the Go 1.8 release. 2017-02-21 15:01:52 -07:00
Derek Collison
37ce250199 Merge pull request #431 from nats-io/fix_staticcheck_error
Fix staticcheck report
2017-02-02 14:48:28 -05:00
Ivan Kozlovic
3316f4bece Fix staticcheck report
Removed `os.Exit()` from function assigned to `flag.Usage`.
2017-02-02 11:50:56 -07:00
Peter Miron
4a82610a38 Updated to use MIT-specific license image. 2017-02-02 12:39:06 -05:00
Derek Collison
33afedcc70 Merge pull request #427 from nats-io/update_test
Update client connect to route port test
2017-01-27 19:18:42 -05:00
Ivan Kozlovic
1c5a34ea42 Update client connect to route port test
With the following client fix: https://github.com/nats-io/go-nats/pull/260
the client should always be able to connect after the initial
failure.
2017-01-27 09:59:29 -07:00
Derek Collison
fdf1a24d78 Merge pull request #424 from nats-io/reject_client_connecting_to_route
[ADDED] Reject clients connecting to route's listen port
2017-01-26 09:50:02 -08:00
Derek Collison
8217ef8058 Merge pull request #426 from nats-io/add_gosimple
Added gosimple
2017-01-26 09:45:30 -08:00
Ivan Kozlovic
1fb9f211ca Added gosimple
- Get gosimple package
- Updated staticcheck's URL
- Moved build and above checks in `before_script` section to fail fast
- Fixed reports from gosimple
2017-01-25 13:30:11 -07:00
Ivan Kozlovic
c925e1c9bf Restored behavior after c.parse() error 2017-01-25 09:15:47 -07:00
Ivan Kozlovic
7c59ce3dba [ADDED] Reject clients connecting to route's listen port
This happens sometimes, and the latest occurence was today:
https://github.com/nats-io/java-nats/issues/96

When it happens, there is no error but subscribers would not receive
anything, etc...

This PR uses the fact that clients set the field Lang in the CONNECT
protocol that ROUTEs do not. I have checked that all Apcera supported
clients do set Lang in the CONNECT protocol.
If we plan to add Lang for routes, we need to find another field or
use a new one, in which case that would work only for new clients
(that would need to be updated).

With this change, when the server accepts a connection on the route
port and detects that this protocol field is present, it now closes
the client connection.

The nice thing is that newer clients, when incorrectly connecting
to the route port, get from the route's INFO the list of client URLs,
which means that on the initial connect error, they are able to
subsequently connect to the proper client port, so it is transparent
to the user (which may or may not be a good thing). However, it is not
guaranteed because if the client is not setting NoRandomize to true,
the client URL is added but the array shuffled, so it is possible that
the client library does not find the correct port in the connect loop.
2017-01-24 19:46:46 -07:00
Derek Collison
0d45f49d90 Merge pull request #423 from nats-io/fix_staticcheck_errors
Fixed errors found by staticcheck
2017-01-24 18:44:20 -08:00
Ivan Kozlovic
27bfed541c Fixed errors found by staticcheck
Staticcheck has probably been updated and is finding new errors.
They have been fixed.

Also, moved the run of staticcheck before running the test suite,
so if it fails, it fails sooner ;-).
2017-01-24 19:34:17 -07:00
Derek Collison
63d6ef9546 Merge pull request #421 from nats-io/make_write_deadline_configurable
[ADDED] Make Write deadline configurable
2017-01-18 21:40:30 -07:00
Ivan Kozlovic
95d0152449 [ADDED] Make Write deadline configurable
We use a hardcoded value of 2 seconds for Write deadline when
writing data to client's socket.
This PR makes that value configurable.

Question is should we push the setting down to the client's object
to avoid indirection such as client.srv.opts.WriteDeadline?
2017-01-18 20:33:44 -07:00
Derek Collison
bfc521a244 Merge pull request #419 from nats-io/remove_max_pending_size
Removed last references to max_pending_size [ci skip]
2017-01-18 14:01:47 -08:00
Ivan Kozlovic
f1c513d7bf Removed last references to max_pending_size [ci skip] 2017-01-18 14:38:34 -07:00
Derek Collison
2c4ffbf7a1 Merge pull request #418 from nats-io/update-vendoring
Add golang.org/x/sys/windows to vendored files
2017-01-17 12:52:39 -08:00
Colin Sullivan
f5ce5d5172 Add golang.org/x/sys/windows to the vendored files 2017-01-17 11:40:25 -07:00
Derek Collison
e402ddda6f Merge pull request #417 from nats-io/win-container-test-fixes
Unit Test updates for a windows container environment.
2017-01-09 09:57:50 -08:00
Colin Sullivan
6e9e491c79 Updates for running in a windows container environment.
* Fixes unit tests running in windows containers with the default configuration.
2017-01-09 10:07:24 -07:00
Derek Collison
85a3032b4d Merge pull request #416 from nats-io/longer-test-client-timeout
Increase the internal test client dial timeout
2017-01-07 07:59:30 -08:00
Colin Sullivan
31dc3a7e11 Increase the client dial timeout.
* Windows and stressed machines require more time to connect; this was causing flappers.
2017-01-06 15:35:41 -07:00
Derek Collison
c275ec7185 Merge pull request #415 from nats-io/tls-add-chacha-default
Add the ChaCha20 ciphers to the default cipher list.
2017-01-05 15:27:52 -08:00
Colin Sullivan
c9a28b9fc0 Reorder based on comments. 2017-01-05 16:13:44 -07:00