This patch makes sure that closeChan is closed as soon as the main loop
returns, so any channel operations are unblocked before we run shutdown.
This ensures that the server's goroutine can return before shutdown
completes and we don't panic by trying to serve the client after
shutdown returns.
This patch creates the cloudwatch rule that detects ec2 instance
state changes, and targets the rule to publish on our sns topic
which, in turn, pushes those event notifications to our endpoint.
This patch replaces the call to Server.ListenAndServe() with
Server.Serve(listener) in order to make sure the listener is up
and running before we subscribe to the topic in a future patch.
This solves an issue first observed with golang 1.8.
Creating an exec.Command with an empty string parameter (when no puppet.conf
file is specified) would lead to an error from Puppet, stating that an
unexpected argument was passed to "puppet mgmtgraph print".
The workaround is to not include *any* positional argument (not even the
empty string) when --puppet-conf is not used.
This patch adds the option to print the license with a cli flag. It
uses go-bindata to store the license file. The file is generated by
running `make bindata` and the result is stored in the bindata
directory.
Builds started failing due to go-libvirt-xml 6d97448. In that patch,
the DomainChannelTarget struct was changed from having a single type
field, to having an individual field for each virtualization type.
This patch updates the connection check in Init to reflect the changes
to go-libvirt-xml, so that builds no longer fail.
This does some cleanups and moves some things around for a better
experience. If you're an expert in this area, or are a new user who has
some feedback about their first impressions and experiences, please let
us know!
This is a build option in Golang that will strip the binary.
The binary becomes about 50% smaller.
Signed-off-by: Toshaan Bharvani <toshaan@vantosh.com>
Prior to this commit, running make would only rebuild mgmt when
main.go was changed. It means that make clean build was needed.
With this commit, any go file change in this directory will
trigger a new compilation.
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
Because travis builds only fetch a single branch (master) by default,
test-commit-message.sh only had access to commits in the master branch.
In order to fetch the correct branch for our build, we need to run
'git config remote.origin.fetch..' with the target branch's information
before executing git fetch on the repo in before_install.
Now git will always fetch the appropriate branch.
If we get an error in the Watch loop, it will send this on awsChan,
which will cause Watch to loop. However, in this scenario it will never
cause closeChan to close, and we will deadlock because we have a
waitGroup in a helper goroutine which is waiting on this channel to
close the context.
Normally this wouldn't be an issue, but since we have more than one
goroutine (with associated waitGroup) it is. It's also good practice to
close all the channels to help avoid this kind of bug.
This patch also moves the waitGroup Wait into a more logical place for
visibility.
This patch adds the option to specify URLs to advertise for clients and peers.
This will facilitate etcd communication through nat, where we want to listen
on a local IP, but expose a public IP to clients/peers.
This is an example of a race-free long-poll server and client. It uses a
redirection method to signal that the "Watch" is running.
Other race-free methods exist.