Commit graph

44 commits

Author SHA1 Message Date
Renán I. Del Valle
907430768c
Misc. fixes for tests (#16)
* Bumping up CI to go1.17 and enabling CI for PRs.

* Adding go.sum now that issues seem to have gone away.

* Bump up aurora to 0.25.0 and mesos to 1.9.0

* Fixing Mac tests. Adding extra time for killing thermos jobs.

* Reduce the thermos overhead for unit tests

Co-authored-by: lenhattan86 <lenhattan86@users.noreply.github.com>
2021-10-25 12:39:13 -07:00
Renán I. Del Valle
69ced895e2
Upgrade to Aurora 0.22.0 (#5)
* Upgrading to Thrift 0.13.1. This version is a fork of 0.13.0 with a patch on top of it to fix an issue where trying a realis call after the connection has been closed results in a panic.

* Upgrading compose set up to Mesos 1.6.2 and Aurora 0.22.0.

* Adding support for using different update strategies.

* Adding a monitor that is friendly with auto pause.

* Adding tests for new update strategies.
2020-05-05 20:55:25 -07:00
Renán I. Del Valle
02710e5434
Moving repository to aurora-scheduler organization. (#2)
gorealis v2 will now live in the aurora-scheduler organization
2020-02-19 11:40:40 -08:00
Renan DelValle
5d75dcc15e Adding MonitorJobUpdateQuery which serves as the basis for other monitors. 2019-09-25 17:20:30 -07:00
Renan DelValle
9a70711537 Making JobUpdate synchronous. MonitorJobUpdateStatus creates a local copy of job key in order to guard against side effects cuased by mutations to the JobKey being performed externally. 2019-09-25 17:20:30 -07:00
Renan DelValle
9584266b71 Changing MonitorJobUpdate to use MOnitorJobUpdateStatus under the hood. 2019-09-25 17:20:30 -07:00
Renan DelValle
6f20f5b62f Adding JobUpdateStatus monitor as well as renaming all monitor functions to be Monitor + <subject> 2019-09-25 17:20:30 -07:00
Renan DelValle
51597ecb32
Changing paths to refer to gorealis v2 in order for dependencies to be correct. 2018-12-27 10:09:22 -08:00
Renan DelValle
992e52eba2
Changing realis API to use new JobUpdate struct and to use concrete JobKey types. 2018-12-12 14:13:45 -08:00
Renan DelValle
76300782ba
Renaming RealisClient to Client to avoid stuttering. Moving monitors under Client. Making configuration object private. Deleted legacy code to generate configuration object. 2018-12-08 08:57:15 -08:00
Renan DelValle
c1be2fe62b
Monitors are now all pointer receivers for RealisClient. 2018-12-07 16:08:49 -08:00
Renan DelValle
54378b2d8a
Changing the signature for some API. Specifically, result objects that hold a single variable are now returning that variable instead of a result object. Tests have been refcatored to use new v2 API. All tests are currently passing. 2018-11-28 20:13:49 -08:00
Renan DelValle
59e3a7065e
Refactoring code to be compatible with Thrift 0.12.0 generated code. Tests are still not refactored. 2018-11-27 18:45:10 -08:00
Renan DelValle
3e4590dcc0
Changing monitors to use time.Duration to be more explicit in code and to have tighter control. 2018-11-22 14:03:51 -08:00
Renan DelValle
d747a48626
Simplifying API. Many API calls have gone from a tuple of two returns to a single return. 2018-11-22 12:23:18 -08:00
Renan DelValle
8a9a97c150
Removing unnecessary interface from Aurora Job. 2018-11-22 12:22:26 -08:00
Renan DelValle
1146736c2b
Refactoring variable names and variable types to saner versions. 2018-11-22 12:22:25 -08:00
Renan DelValle
a23bd1b2cc
Shedding interface because there is no good reason to have it. 2018-11-22 12:22:22 -08:00
Renan DelValle
4f5766b443
Misc. bug fixes and addition of debug logging (#61)
* Fixing possible race condition when passing backoff around as a pointer.

* Adding a debug logger that is turned off by default. If debug is turned on, but a logger has not been assigned, a default logger that will print to STDOUT will be created.

* Making Mutex a pointer so that there's no chance it can accidentally be copied.

* Removing a leftover helper function from before we changed how we configured the client.

* Minor changes to demonstrate how a logger can be used in conjunction to debug mode in the sample client.
2018-04-13 11:03:29 -07:00
Renan DelValle
1c426dd363
Changing the drain monitor to match the rest of the monitors using timer and ticker. Made a generic schedule status monitor that can be used with any of the default sets provided. (#49) 2018-01-07 13:30:02 -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
Sivaram Mothiki
72b746e431 use exponential back off func from realis lib (#39)
* use exponential back off func from realis lib

* remove exponential backoffs from monitors

* dont compare for retry errors
2017-11-04 15:06:26 -07:00
Renan DelValle
a1350c6d55 out with the old (address) in with the new (address) 2017-10-12 17:11:01 -07:00
Renan DelValle
1fd07b5007 Avoided going through the entire list of monitored hosts by keeping a set of hosts that had transistioned to a desired mode. 2017-10-04 15:56:59 -07:00
Renan DelValle
922e8d6b5a Changing HostMaintenance to return a map[string]bool where true indicates success, false indicates failure to transition to the desired state. 2017-10-02 17:24:01 -07:00
Renan DelValle
3111b358fc Host Maintenance monitor now returns a list of hosts that did enter the desired mode(s) instead of a boolean. This means the monitor can see a partial success. 2017-09-29 18:21:30 -07:00
Renan DelValle
430764f025 Added tests for draining. run go test with a aurora vagrant image running to test. 2017-09-28 17:49:15 -07:00
Renan DelValle
8334dde12f Sample client now blocks until all hosts entered desired state. Cleaned up host maintenance monitor. 2017-09-28 16:50:46 -07:00
Renan DelValle
dc6848f804 Host Maintenance monitor which allows to block until all hosts in a list have entered of the states in a provided set 2017-09-28 16:35:24 -07:00
Mothiki
4bc0a694ae use switch instead of if else conditions 2017-08-22 17:03:35 -07:00
Mothiki
dcab5e698f monitor job update returns on Rolle back and update fail 2017-08-22 16:55:20 -07:00
Mothiki
7e578f80bd check for staus failed and return error 2017-08-21 19:45:36 -07:00
Kumar Krishna
e57dc98d65 add resiliency for LeaderFromZK and other fixes . 2017-04-06 23:15:44 -07:00
Kumar Krishna
b10df0603e gorealis config refactoring 2017-03-30 18:17:21 -07:00
Kumar Krishna
3add32a585 gorealis resiliency 2017-03-20 22:34:45 -07:00
Kumar Krishna
d97e59b9e6 inital commit gorealis resiliency 2017-03-16 23:19:30 -07:00
Kumar Krishna
3b10c10dd1 update api change and remove os.exit 2016-11-14 23:16:36 -08: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
c83e5d268a Monitor Instances now returns a tuple so an error can be passed instead of exiting on error. Tuple is: Result of action, error if it exists. 2016-10-20 14:39:48 -04:00
Renan DelValle
3fd957fe5c Updating library for compatibility with Aurora 0.16.0 final. Thrift API differs from main Aurora one due to TaskUpdateQuery fields resulting in errors when serialized by thrift as non-optionals. 2016-09-29 20:45:24 -04:00
Renan DelValle
3a78e32e27 Changing location from where to get thrift bidnings to that it points to github location. Ran go fmt on the entire project. 2016-09-19 15:34:56 -04:00
Renan DelValle
494f733f4e Changing timeouts to be more reasonable in sample client 2016-08-26 19:19:37 -07:00
Renan DelValle
928fc42fc2 Updated thrift API to the latest in the Aurora respository.
Added new monitors for watching number of instances get to a certain count using polling.
Added new commands to sample client which give some statistics.
2016-08-26 16:35:31 -07:00
Renan DelValle
01b700554a Added the ability to monitor job updates.
Added the ability to kill and restart specific instances.
Fixed incorrect documentation on using-the-sample-client.
Added helper functions under the response package to extract fields from
aurora.Response.
2016-08-25 18:56:55 -07:00