Skip to content
This repository was archived by the owner on Mar 8, 2023. It is now read-only.

Conversation

arymkus
Copy link
Contributor

@arymkus arymkus commented May 21, 2017

PR to incorporate previously published patch which generates proper config for carbon-cache instances.
See #329 for more details.

@arymkus
Copy link
Contributor Author

arymkus commented May 28, 2017

@dwerder BTW, I'll have some spare time next week and can fix linter-related warnings.
Please reply if you want me to do it (in scope of this PR or can create new).

@dwerder
Copy link
Member

dwerder commented May 29, 2017

That would be nice.

@arymkus
Copy link
Contributor Author

arymkus commented May 31, 2017

Done.

@dwerder
Copy link
Member

dwerder commented Jun 1, 2017

my only question is, why you want to set the pidfile in the carbon.conf, because it is already set in each init file. And the path is: scope.lookupvar('graphite::storage_dir_REAL')

https://github.com/echocat/puppet-graphite/blob/master/templates/etc/init.d/RedHat/carbon-cache.erb#L25

@arymkus
Copy link
Contributor Author

arymkus commented Jun 2, 2017

Because carbon itself has ignored the higher scope's PATH variable in it's config and still stored it's .pid files in /var/run/... (or wherever the dafault path is) but the properly generated systemd's unit files contained new path to .pid files.
So the final behavior was - systemd starts carbon (and it was running well) but wasn't able to read actual carbon's .pid file and marked the service as failed. That was leading to manifest's failure.

LOCAL_DATA_DIR = <%= scope.lookupvar('graphite::local_data_dir_REAL') %>/

<% unless [:undef, nil].include? scope.lookupvar('graphite::gr_storage_dir') -%>
PID_DIR = <%= scope.lookupvar('graphite::gr_storage_dir') %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has to be scope.lookupvar('graphite::storage_dir_REAL') to match the init scripts.

@arymkus
Copy link
Contributor Author

arymkus commented Jun 4, 2017

in case of either storage_dir or whisper_dir param used - carbon creates its .pid files in correct place.
And only with local_data_dir carbon ignored proper location.
I've tested my fix and it works.

@arymkus
Copy link
Contributor Author

arymkus commented Jun 10, 2017

ping

@dwerder dwerder merged commit 4b4dd4e into echocat:develop Jun 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants