Commit graph

13 commits

Author SHA1 Message Date
lawwong1
8db625730f
Support Australis API to get aurora master nodes and mesos master nodes (#20) 2022-08-24 08:51:12 -07:00
lenhattan86
c3dbeba2bd
Adds ability to fetch Mesos Master leader (#7)
* Adds ability to fetch Mesos Master leader from Zookeeper
2020-11-15 16:44:21 -08:00
Renan DelValle
09628391cc Cleaning up error messages and some formatting. 2019-09-25 17:20:30 -07:00
Renan DelValle
3d62df1684
* Errors have been refactored.
* ZK retries have been cleaned up. We will now retry after every error
EXCEPT when we have a badly formed path.
* ZK library has been reworked with optional arguments pattern to not be
so intertwined with the cluster.json file.
* Timeout error has been re-implemented as RetryError. RetryError
behaves like a Timeout error but is used exclusively to add more context
privately. This allows us to have unit tests that check our retry
mechanism is actually retrying.
* Additional logging has been added to retry mechanisms as well as to
the Zookeeper library we use.
2018-03-03 14:08:04 -08:00
Renan DelValle
a43dc81ea8
Simplifying retry mechanism for Thrift Calls (#56)
* Deleting permament error as it doesn't make sense. Just return a plain old error and that will be considered permanent.

* Removing double closure at as it's unmaintainable and can be error prone. Separated back offs into a generic one and a thrift call specific one.

* ZK leader finder now returns a temporary error instead of constantly no leader found and quitting. It could be that the leader info is being propagated so it's worth trying another time.

* Adding more logging to the retry.

* Wrapping lock and unlock in an anonymous function so that we can use defer on unlock such that it is called in the case of a panic.
2018-02-15 15:16:39 -08:00
Renan DelValle
b2ffb73183
Introducing temporary errors. Refactored reestablish connection code … (#50)
* Introducing temporary errors. 

* Refactored reestablish connection code to use NewClient.

* Added reestablish connection test to end to end tests.
2018-01-16 14:35:01 -08:00
PRADYUMNA KAUSHIK
ff545e8aa6 Fixing semantic errors in docs/getting-started.md (#44)
* fixed semantics. Earlier mentioned that 'Pystachio does yet support...'. Changed now to mention 'Pystachio does not yet support...'

* fixed grammatical mistake.

* Ran gofmt on project.
2017-12-22 08:53:05 -08:00
Renan DelValle
e614e04f27
Code cleanup, added ability to attach logger, added CreateService api
* Code cleanup: Deleted multiple functions which have become stale. Removed cluster example as we replaced the need to create the Cluster object.

* Cleaned up ZK connection code by using the backoff function. Added a test to the end to end to test that we're getting the host correctly from ZK. Changed clusters test to be an outside package.

* Added LeaderFromZKURL test to end to end tests.

* Added logger to realisConfig so that users can attach their own Loggers to the client. Logger is an interface that shadows most popular logging libraries. Only Print, Println, and Printf are needed to be a realis.Logger type. Example in the client uses the std library log.

* Moved most fmt.Print* calls to be redirected to user provided logger. Logger by default is a no-op logger.

* Adding CreateService to realis interface. Uses the StartJobUpdate API to create services instead of the createJobs API.

* Bumping up version number inside client in anticipation of new release.
2017-11-30 12:02:50 -08:00
Renan DelValle
719a121ed5 Bug fix: #30 NewRealisClient method returning <nil> error when zookeeper leader not found 2017-08-02 16:43:18 -07:00
Kumar Krishna
e57dc98d65 add resiliency for LeaderFromZK and other fixes . 2017-04-06 23:15:44 -07:00
Renan DelValle
3bf2e8a831 Updating zookeeper dependency since logging problem has been solved in main repository. Go fmt run on project to tidy it up. 2016-11-02 20:41:43 -04:00
Renan DelValle
b740c1a61a Small bug fix. Can't close a connection that doesn't exist 2016-08-22 12:43:53 -07:00
Renan DelValle
0e26c33129 Initial support for getting the leader from Zookeeper.
Some tests included for making sure the JSON blob pulled from Zookeeper
is correct.

Updated client to be able to take Zookeeper json cluster config that is
currently being used in aurora (clusters.json usually located at
/etc/aurora/cluster.json).

Changed error messages to no longer have a period at the end as that was
throwing off printing of the error.

Modified samuel's ZK library slightly to stop verbose logging using a
NoOpLogger from stackoverflow.
2016-08-16 18:56:47 -07:00