Peter Miron
5e640f099d
clean up of log files. removed FatalError function to make sure I'm minimizing changes to actual server.
2017-06-11 16:20:04 -04:00
Peter Miron
da1cb9abb2
missed go fmt'ing.
2017-06-10 10:39:09 -04:00
Peter Miron
d1f38f38a2
changes to support random ports for clusters and profiler.
2017-06-10 10:35:01 -04:00
Peter Miron
70778e9ec5
updated to exclude fmt'ing on /vendor/
2017-06-08 11:41:20 -04:00
Peter Miron
f2a9cc8cb0
fixed go fmt'ing
2017-06-08 11:37:23 -04:00
Peter Miron
2fff19d39d
updated .travis.yml to fail if not go fmt'd
2017-06-08 11:34:33 -04:00
Peter Miron
43a3f1ef1d
cleaned up naming to MonitorAddr instead of HttpPort (as it could be either Http or Https). added test for nil to improve coverage.
2017-06-08 10:46:55 -04:00
Peter Miron
41aa44cd8d
Added ability to use random ports to limit unit test port contention.
2017-06-08 10:19:56 -04:00
Derek Collison
5a1ab910f7
Merge pull request #506 from nats-io/tls_reload
...
Implement config reload support for TLS
2017-06-08 06:01:47 -07:00
Tyler Treat
4c33177bd3
Bump up TLS timeout in test configs
2017-06-07 18:05:28 -05:00
Tyler Treat
648b7367c0
Fix data race
2017-06-07 17:40:17 -05:00
Tyler Treat
30db4be965
Ensure old connection still works in TLS reload test
2017-06-07 17:03:33 -05:00
Tyler Treat
d172ca5801
Add unit tests around TLS config reload
2017-06-07 16:34:39 -05:00
Tyler Treat
b7211f6dc8
Improve readability of TLSVerify assignment
2017-06-07 14:58:30 -05:00
Derek Collison
a309994d1a
Merge pull request #505 from nats-io/cross_compile_ci
...
Cross compile CI
2017-06-07 11:38:39 -07:00
Tyler Treat
b70e2c2fc2
Implement config reload support for TLS
...
Allows reloading TLS config. This includes enabling/disabling TLS,
rotating keys/certs, enabling/disabling client verification, etc.
2017-06-07 12:25:56 -05:00
Tyler Treat
710b992037
Fix 1.6 build
2017-06-07 09:51:46 -05:00
Tyler Treat
2d324e6e31
Return non-zero exit code on failure
2017-06-07 09:44:49 -05:00
Tyler Treat
9a527bfda6
Do cross-compile in before script
2017-06-07 09:29:08 -05:00
Tyler Treat
9f31d972d2
Merge pull request #504 from stephenjannin/master
...
fix windows build
2017-06-07 09:05:32 -05:00
Stephen JANNIN
7db8a49468
fix windows build
2017-06-07 15:43:11 +02:00
Derek Collison
04f46e55f8
Merge pull request #503 from nats-io/debug_reload
...
Implement config reload support for debug
2017-06-06 13:12:50 -07:00
Tyler Treat
687a20be1c
Implement config reload support for debug
...
Add config reload support for `debug` option.
2017-06-06 11:30:06 -05:00
Derek Collison
2b7ab35e74
Merge pull request #499 from nats-io/config_reload
...
Config reload [WIP]
2017-06-06 08:11:56 -07:00
Tyler Treat
4f28bf7630
Remove use of getOpts() in log.go
2017-06-06 08:51:34 -05:00
Tyler Treat
1e799110af
Undelete bench_results.txt
2017-06-05 17:49:39 -05:00
Tyler Treat
cc30af8ede
Address code review feedback
2017-06-05 17:43:42 -05:00
Tyler Treat
b03bdd06a9
Merge branch 'config_reload' of github.com:nats-io/gnatsd into config_reload
2017-06-05 13:58:13 -05:00
Tyler Treat
ea030833f7
Delete bench results file
2017-06-05 13:52:34 -05:00
Tyler Treat
c468abd15f
Merge branch 'master' of github.com:nats-io/gnatsd into config_reload
2017-06-05 13:41:04 -05:00
Derek Collison
cba3170c1e
Merge pull request #502 from nats-io/fix_test_race
...
[FIXED] Intermittent failing test
2017-06-05 10:15:55 -07:00
Tyler Treat
d2fd0b7190
Reduce AuthTimeout in test
2017-06-05 09:51:05 -05:00
Derek Collison
4e1b382795
Merge pull request #501 from nats-io/logging_refactor
...
Remove global logger
2017-06-02 11:37:11 -05:00
Tyler Treat
cef5a703ea
Add Development section to README
...
Add a note clarifying symlink behavior on Windows for developers.
2017-06-01 17:08:54 -05:00
Tyler Treat
0bda6da60e
[FIXED] Intermittent failing test
...
Added the sleep back in to TestAuthorizationTimeout which got removed in #493 .
This was causing the test to fail intermittently, though it would
usually pass on Travis CI or with the -race flag since these slowed it
down enough.
2017-06-01 16:38:02 -05:00
Tyler Treat
677ff0aae0
Rename opts to diffOpts in diffOptions for clarity
2017-06-01 14:22:41 -05:00
Tyler Treat
e109c3fa65
Remove SIGHUP handling
...
Do not expose config reloading yet until we are ready.
2017-06-01 14:11:16 -05:00
Tyler Treat
c8280aaee4
Get rid of defer in Server.getOpts()
...
Defer adds a bit of overhead which can affect fast-paths.
2017-06-01 11:50:28 -05:00
Tyler Treat
28160f1de2
Remove global logger
...
gnatsd currently uses a global logger. This can cause some problems
(especially around the config-reload work), but global variables are
also just an anti-pattern in general. The current behavior is
particularly surprising because the global logger is configured through
calls to the Server.
This addresses issue #500 by removing the global logger and making it a
field on Server.
2017-05-31 16:06:31 -05:00
Tyler Treat
43ee0ce6df
Fix unit tests
2017-05-31 12:52:20 -05:00
Tyler Treat
b95dd5dfd0
Add tests around config reload
2017-05-30 21:09:35 -05:00
Tyler Treat
9902c3da84
First pass at implementing config reload
2017-05-30 16:18:36 -05:00
Derek Collison
d6069447d2
Merge pull request #498 from nats-io/stop_http_server_on_shutdown
...
[FIXED] Ensure Shutdown() always stops http server
2017-05-25 19:38:21 -05:00
Ivan Kozlovic
773b25af85
[FIXED] Shutdown stops http server when started manually
...
In case one creates a server instance with New() and then starts
the http server manually (s.StartHTTPMonitoring()), calling
s.Shutdown() would not stop the http server because Shutdown()
would return without doing anything if `running` was not true.
This boolean was set to true only in `s.Start()`.
Also added StartMonitoring() to perform the options check and
selectively start http or https server to replace individual calls.
This is useful for NATS Streaming server that will now be able
to call s.StartMonitoring() without having to duplicate code
about options checks and http server code.
This is related to PR #481
2017-05-25 17:01:35 -06:00
Derek Collison
1acdd2379c
Merge pull request #497 from nats-io/fix_specify_http_and_https_ports
...
[FIXED] Specifying HTTP and HTTPs ports produces unexpected behavior
2017-05-24 23:58:56 -05:00
Ivan Kozlovic
513c0a0971
[FIXED] Specifying HTTP and HTTPs ports produces unexpected behavior
...
The server will now print a Fatal error if user tries to configure
both HTTP and HTTPs ports.
Resolves #495
2017-05-24 13:06:04 -06:00
Ivan Kozlovic
4cef2dddd0
Merge pull request #492 from nats-io/fix_negative_offset_limit_panic
...
[FIXED] Check for negative Offset and/or Limit when processing Connz
2017-05-18 14:07:27 -06:00
Tyler Treat
0415221fe1
Merge pull request #493 from nats-io/auth_timeout_tls_fix
...
[FIXED] Authorization Timeout and TLS
2017-05-18 10:25:18 -05:00
Tyler Treat
fa50a2c145
[FIXED] Authorization Timeout and TLS
...
When TLS and authorization is enabled, the authorization timeout can
fire during the TLS handshake, causing the server to write the
authorization timeout error string into the client socket, injecting
what becomes bad data into the TLS handshake. This creates misleading
errors on the client such as tls: oversized record received with length
21024.
This moves the authorization timeout scheduling to after the TLS
handshake to avoid the race. This should be safe since TLS has its own
handshake timeout. Added a unit test that fails with the old behavior
and passes with the new. LMK if you can think of a better way to test
this.
Fixes #432
2017-05-17 14:38:02 -05:00
Ivan Kozlovic
a87050c546
[FIXED] Check for negative Offset and/or Limit when processing Connz
...
Ensure that if the offset is negative, it is set to 0. If the limit
is negative, it is set to the default value.
Resolves #491
2017-05-17 12:05:54 -06:00