Commit Graph

2334 Commits

Author SHA1 Message Date
James Shubin
c57946e29b Fix dependency issue
* Fix Process() object calling
* Add PokeParent() to poke upwards
* Break linear exec chains :(

This was the issue where in a graph f1 -> f2, if you were to rm f2 &&
cat f2, then f2 would not come back because we didn't poke upwards to
refresh the timestamp. Unfortunately this adds another bug which we
solve in a later patch.
2016-01-12 04:20:47 -05:00
James Shubin
48eddc3721 Catch a different form of etcd disconnect 2016-01-10 04:09:28 -05:00
James Shubin
8ea8ef8d0e Simplify converge checker
Not sure why I didn't write it this way before...
2016-01-10 02:40:31 -05:00
James Shubin
1c49bbc487 Clean up the distributed example for clarity 2016-01-10 02:30:05 -05:00
James Shubin
ebc1c60063 The noop type is not useful in this example 2016-01-10 01:42:42 -05:00
James Shubin
590394b2be Clean up better 2016-01-10 01:42:25 -05:00
James Shubin
97664c3b13 Fix effective off-by-one error in dependency processing
Graph vertices have initial values of 0 for their timestamps, which led
to the need of a >= comparison instead.
2016-01-09 22:16:37 -05:00
James Shubin
ea7fd76f93 Add exec type and fix up a few other things
* Add exec type
* Switch erroneous use of fmt to log instead
* Check for edge existence for safety before using
* Avoid recalling etcd channel maker
* Clean up logging output
2016-01-09 21:50:21 -05:00
James Shubin
45ff3b6aa4 Merge type comparison into a single function call 2016-01-08 04:13:42 -05:00
James Shubin
d769309cc0 Hello 2016! 2016-01-08 02:43:38 -05:00
James Shubin
d2bcfdc7aa Fix go vet error 2016-01-07 00:52:42 -05:00
James Shubin
72525d30b1 Refactor etcd into object and add exit timers
This refactors my etcd use into a struct (object) wrapper, which makes
it easier to add an exit on converged timer.
2016-01-06 19:40:09 -05:00
James Shubin
95489b9c07 Add information on which libraries are being used 2016-01-05 03:14:22 -05:00
James Shubin
0bbfd1d071 Add missing stringer dependency
This is used during the `go generate` pre-processor.
2016-01-05 03:03:30 -05:00
James Shubin
904ace8027 Fix up go vet errors and integrate with ci 2016-01-04 21:02:22 -05:00
James Shubin
d8cbeb56f9 Support N distributed agents
This is the third main feature of this system. The code needs a bunch of
polish, but it actually all works :)

I've tested this briefly with N <= 3.

Currently you have to build your own etcd cluster. It's quite easy, just
run `etcd` and it will be ready. I usually run it in a throw away /tmp/
dir so that I can blow away the stored data easily.
2016-01-04 21:00:13 -05:00
James Shubin
72a8027b7f Update README 2015-12-29 01:45:26 -05:00
James Shubin
39f7c305f1 Ira deserves to be mentioned in the THANKS list 2015-12-29 01:23:48 -05:00
James Shubin
1ba6be2957 Add graphviz generation and visualization
This requires graphviz to be installed on your machine. If you run the
command with sudo, it will create the files with the original user
ownership to make it easier to remove them without root.
2015-12-29 01:04:03 -05:00
James Shubin
6b4fa21074 Mega patch
This is still a dirty prototype, so please excuse the mess. Please
excuse the fact that this is a mega patch. Once things settle down this
won't happen any more.

Some of the changes squashed into here include:
* Merge vertex loop with type loop
(The file watcher seems to cache events anyways)
* Improve pgraph library
* Add indegree, outdegree, and topological sort with tests
* Add reverse function for vertex list
* Tons of additional cleanup!

Amazingly, on my first successful compile, this seemed to run!

A special thanks to Ira Cooper who helped me talk through some of the
algorithmic decisions and for his help in finding better ones!
2015-12-21 03:27:25 -05:00
James Shubin
0ea6f30ef2 Reorganize testing for developer efficiency 2015-10-12 19:26:58 -04:00
James Shubin
4f6605b3d1 Don't format or check omv.yaml syntax
Different versions of ruby format differently, so don't do this check
since it will invariably fail for someone. If there is a general
deterministic fix, please let me know :)
2015-10-10 18:14:05 -04:00
James Shubin
e44da9578e Add equals sign to pass in variables
This is something that is required in future go versions.
2015-10-06 23:56:45 -04:00
James Shubin
dd3759ae38 Update gofmt test to allow version 1.5 2015-10-06 20:34:56 -04:00
James Shubin
3e4709d9da Add tag script 2015-10-02 11:05:19 -04:00
James Shubin
66e030a175 Add more shields! 2015-09-29 03:47:58 -04:00
James Shubin
451fb35f93 Add missing watch event for files
If a file was supposed to exist in a directory, and it didn't exist yet,
when it gets created, we should notice, and cause an event so that we
wake up and actually see about then creating that file!
2015-09-26 03:28:05 -04:00
James Shubin
8dbca80853 Add omv support 2015-09-26 00:25:41 -04:00
James Shubin
6150c2ccb9 Small grep flag fix so command is idempotent 2015-09-25 12:38:24 -04:00
James Shubin
2708223ab5 Put all the deps in one script 2015-09-25 12:29:36 -04:00
James Shubin
327c5fb6fb Fix small typo 2015-09-25 12:25:52 -04:00
James Shubin
f789cf1403 Add travis-ci integration 2015-09-25 02:21:36 -04:00
James Shubin
19a909001b Add better reporting of errors in yaml formatting test 2015-09-25 02:06:14 -04:00
James Shubin
25ad05cce3 Initial public commit of mgmt
This is a prototype that i'm attempting to "release early". Expect a lot
of changes! It is intended to be a config management tool that will:

* be event based
* execute actions in parallel
* function as a distributed system

There are a bunch more design ideas going into this, please stay tuned!
0.0.1
2015-09-25 01:16:03 -04:00