Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Optional support for carbon-aggregator #16

Merged
merged 6 commits into from
Jan 3, 2014
Merged

Optional support for carbon-aggregator #16

merged 6 commits into from
Jan 3, 2014

Conversation

dcarley
Copy link
Contributor

@dcarley dcarley commented Jan 2, 2014

Allow carbon-aggregator0 to be configured and enabled. This is used by
GOV.UK to calculate deploys and HTTP status code rates. Class docs should be
fairly self explanatory.

Also refactored tests and fixed a documentation typo.

/cc @rjw1 @KushalP @philandstuff

The docs refer to `carbon_conf_(source|content)` but the params are called
`carbon_(source|content)`. I prefer the former name, but that would break
backwards compat, so standardise on the latter.
Move two config related spec tests from `graphite_spec.rb` to
`graphite__config_spec.rb`, with other config related items.

Refactored that target spec to fit them into the correct context.
De-dupe tests for Graphite and Carbon installs. Test that Whisper is
installed with the correct version.
Move them to a separate spec file. Per the other sub-classes.
Allow carbon-aggregator[0] to be configured and enabled. This is used by
GOV.UK to calculate deploys and HTTP status code rates. Class docs should be
fairly self explanatory.

[0]: https://graphite.readthedocs.org/en/0.9.12/carbon-daemons.html#carbon-aggregator-py
@dcarley
Copy link
Contributor Author

dcarley commented Jan 2, 2014

Test failure for 1.8.7 is caused by travis-ci/travis-ci#1793. Not sure it's worth applying the workaround?

dcarley added a commit that referenced this pull request Jan 2, 2014
Install Graphite, Carbon, Whisper, and (nearly) all dependencies into a
virtualenv using the `stankevich/python` module. This retains the same
sandboxing that `--install-option`/`--prefix` was doing, but with the added
benefit of:

- Allowing the version param to upgrade and downgrade the packages without
  writing the `pip` logic ourselves.
- Isolating dependencies from the system's Python/pip paths.

Absolute binary paths are used to reference the virtualenv without needing
to `source bin/activate` each time. Cairo is shimmed into the virtualenv
from the system package because of the reasons described in the class doc.
I've rebased the dependencies against Graphite's `requirements.txt` to
reference specific versions and dropped:

- LDAP support: because it has compile dependencies and I'm not aware of
  anyone currently using this functionality from the module.
- pysqlite2: because Python >=2.6 has this builtin.

I'm using an earlier version of the `python` module because of the following
bug which causes the virtualenv to be recreated on every run:

- voxpupuli/puppet-python#46

Tests will be committed separately because they depend on refactoring
currently in unmerged PR #16.
This is the same dirty hack applied to carbon-cache in #13. Otherwise the
following happens, and variations of `expect` cause it to hang :(

```
root@graphite-1:~# start carbon-aggregator
carbon-aggregator start/running, process 23813
root@graphite-1:~# status carbon-aggregator
carbon-aggregator stop/waiting
root@graphite-1:~# cat /var/log/upstart/carbon-aggregator.log
Starting carbon-aggregator (instance a)
carbon-aggregator (instance a) is already running with pid 23491
carbon-aggregator (instance a) is already running with pid 23491
carbon-aggregator (instance a) is already running with pid 23491
carbon-aggregator (instance a) is already running with pid 23491
carbon-aggregator (instance a) is already running with pid 23491
carbon-aggregator (instance a) is already running with pid 23491
carbon-aggregator (instance a) is already running with pid 23491
carbon-aggregator (instance a) is already running with pid 23491
carbon-aggregator (instance a) is already running with pid 23491
carbon-aggregator (instance a) is already running with pid 23491
```
rjw1 added a commit that referenced this pull request Jan 3, 2014
Optional support for carbon-aggregator
@rjw1 rjw1 merged commit 2a31aa5 into master Jan 3, 2014
@rjw1 rjw1 deleted the carbon_aggregator branch January 3, 2014 10:02
dcarley added a commit that referenced this pull request Jan 3, 2014
Install Graphite, Carbon, Whisper, and (nearly) all dependencies into a
virtualenv using the `stankevich/python` module. This retains the same
sandboxing that `--install-option`/`--prefix` was doing, but with the added
benefit of:

- Allowing the version param to upgrade and downgrade the packages without
  writing the `pip` logic ourselves.
- Isolating dependencies from the system's Python/pip paths.

Absolute binary paths are used to reference the virtualenv without needing
to `source bin/activate` each time. Cairo is shimmed into the virtualenv
from the system package because of the reasons described in the class doc.
I've rebased the dependencies against Graphite's `requirements.txt` to
reference specific versions and dropped:

- LDAP support: because it has compile dependencies and I'm not aware of
  anyone currently using this functionality from the module.
- pysqlite2: because Python >=2.6 has this builtin.

I'm using an earlier version of the `python` module because of the following
bug which causes the virtualenv to be recreated on every run:

- voxpupuli/puppet-python#46

Tests will be committed separately because they depend on refactoring
currently in unmerged PR #16.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants