Git Product home page Git Product logo

puppet-graphite's Issues

Pacakge python-zope-filesystem is not needed

I get the following error when trying to use this module on a RHEL system:
Package python-zope-filesystem-1-5.el6.x86_64 is obsoleted by python-zope-interface-3.7.0-2.el6.x86_64 which is already installed

So, I guess you can remove the dependency on package python-zope-filesystem from your graphite::params class.

Puppet 3.7, RHEL 6.5: Error: No such file or directory - /opt/graphite/webapp/graphite/local_settings.py20141107-27378-dcxps8.lock

Hi, I've added mysql backend config and get this error on agent run (puppet 3.7, rhel 6.5):

Warning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations
   (at /usr/lib/ruby/site_ruby/1.8/puppet/settings.rb:1134:in `issue_deprecation_warning')
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for eng-sensu-poc.dev.ca1.foo.co
Warning: The package type's allow_virtual parameter will be changing its default value from false to true in a future release. If you do not want to allow virtual packages, please explicitly set allow_virtual to false.
   (at /usr/lib/ruby/site_ruby/1.8/puppet/type/package.rb:430:in `default')
Info: Applying configuration version '1415375783'
Notice: /Stage[main]/Mcollective::Server::Config::Factsource::Yaml/Cron[refresh-mcollective-metadata]/environment: environment changed 'PATH=/opt/puppet/bin:/usr/bin:/sbin:/bin:/usr/sbin' to 'PATH=/opt/puppet/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin'
Notice: /Stage[main]/Graphite::Config/File[/opt/graphite/webapp/graphite/local_settings.py]/content:
--- /opt/graphite/webapp/graphite/local_settings.py 2014-11-06 22:03:09.696135041 -0500
+++ /tmp/puppet-file20141107-27378-14zw8vi-0    2014-11-07 10:58:36.076978915 -0500
@@ -153,12 +153,12 @@

 DATABASES = {
    'default': {
-        'ENGINE': 'django.db.backends.sqlite3',
-        'NAME': '/opt/graphite/storage/graphite.db',
-        'USER': '',
-        'PASSWORD': '',
-        'HOST': '',
-        'PORT': '',
+        'ENGINE': 'django.db.backends.mysql',
+        'NAME': 'graphite',
+        'USER': 'graphite',
+        'PASSWORD': 'xxxxx',
+        'HOST': 'localhost',
+        'PORT': '3306',
     }
 }


Info: Computing checksum on file /opt/graphite/webapp/graphite/local_settings.py
Info: FileBucket got a duplicate file {md5}89d396679a60c1008ae3f2393885ba95
Info: /Stage[main]/Graphite::Config/File[/opt/graphite/webapp/graphite/local_settings.py]: Filebucketed /opt/graphite/webapp/graphite/local_settings.py to puppet with sum 89d396679a60c1008ae3f2393885ba95
Error: No such file or directory - /opt/graphite/webapp/graphite/local_settings.py20141107-27378-dcxps8.lock
Error: /Stage[main]/Graphite::Config/File[/opt/graphite/webapp/graphite/local_settings.py]/content: change from {md5}89d396679a60c1008ae3f2393885ba95 to {md5}00ce4cfacfea126534bd64f827ad6d37 failed: No such file or directory - /opt/graphite/webapp/graphite/local_settings.py20141107-27378-dcxps8.lock
Notice: /Stage[main]/Graphite::Config/Exec[Initial django db creation]: Dependency File[/opt/graphite/webapp/graphite/local_settings.py] has failures: true
Warning: /Stage[main]/Graphite::Config/Exec[Initial django db creation]: Skipping because of failed dependencies
Notice: /Stage[main]/Graphite::Config/Exec[Chown graphite for web user]: Dependency File[/opt/graphite/webapp/graphite/local_settings.py] has failures: true
Warning: /Stage[main]/Graphite::Config/Exec[Chown graphite for web user]: Skipping because of failed dependencies
Notice: /Stage[main]/Graphite/Anchor[graphite::end]: Dependency File[/opt/graphite/webapp/graphite/local_settings.py] has failures: true
Warning: /Stage[main]/Graphite/Anchor[graphite::end]: Skipping because of failed dependencies
Notice: Finished catalog run in 54.60 seconds

missing python-psycopg2

Hi all

Great module btw! You might want to consider adding 'python-psycopg2' to $graphitepkgs array in params.pp

Thanks

Chris

Duplicate [ ] in the memcache hosts list

In hiera, we specify the memcache hosts list as:

graphite::gr_memcache_hosts: "['10.70.6.9:11211', '10.70.6.177:11211', '10.70.6.129:11211', '10.70.7.207:11211', '10.70.7.175:11211', '10.70.7.161:11211']"

In the erb, this gets processed as:
MEMCACHE_HOSTS = ['<%= scope.lookupvar('graphite::gr_memcache_hosts').join("','") %>']

This then surrounds our list with extra [ ]

The issue here is that the processing of this list is different to that of cluster_servers. In the erb, that is processed as:

CLUSTER_SERVERS = <%= scope.lookupvar('graphite::gr_cluster_servers') %>

Should these be managed in a standard way? (I have fixed this in a fork and will happily send a PR if you want to manage the lists in a similar way)

Paul

epel rename of django-tagging package?

I got catalog failure in a test VM and it looks like EPEL may have changed the name of the django-tagging package:

Error: Could not update: Could not find package django-tagging
Error: /Stage[main]/Graphite::Install/Package[django-tagging]/ensure: change from absent to 0.3.1 failed: Could not update: Could not find package django-tagging
yum install -y django-tagging
...
Package django-tagging-0.3.1-3.el6.noarch is obsoleted by python-django-tagging-0.3.1-7.el6.noarch which is already installed
[root@localhost ~]# yum info python-django-tagging django-tagging
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: mirrors.usc.edu
 * epel: mirror.metrocast.net
 * extras: mirror.oss.ou.edu
 * updates: centos.mirror.constant.com
Installed Packages
Name        : python-django-tagging
Arch        : noarch
Version     : 0.3.1
Release     : 7.el6
Size        : 229 k
Repo        : installed
From repo   : epel
Summary     : A generic tagging application for Django projects
URL         : http://code.google.com/p/django-tagging/
License     : MIT
Description : A generic tagging application for Django projects, which allows
            : association of a number of tags with any Model instance and makes
            : retrieval of tags simple.

Available Packages
Name        : django-tagging
Arch        : noarch
Version     : 0.3.1
Release     : 3.el6
Size        : 58 k
Repo        : epel
Summary     : A generic tagging application for Django projects
URL         : http://code.google.com/p/django-tagging/
License     : MIT
Description : A generic tagging application for Django projects, which allows
            : association of a number of tags with any Model instance and makes
            : retrieval of tags simple.

Puppet warning on $gr_storage_schemas default value

The default configuration in init.pp for $gr_storage_schemas generates the following warning:

Warning: Unrecognised escape sequence '\.' in file /tmp/vagrant-puppet/modules-0/graphite/manifests/init.pp at line 98

I recommend using simple quoted strings instead to wrap the patterns.

Having a real hard time installing graphite on centos 6.5.

This is the error we're seeing.

Error: Could not update: Execution of '/usr/bin/pip-python install -q twisted==11.1.0' returned 1: Command /usr/bin/python -c "import setuptools;file='/tmp/pip-build-root/twisted/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-e3n5qe-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build-root/twisted
Storing complete log in /root/.pip/pip.log

Error: /Stage[main]/Graphite::Install/Package[twisted]/ensure: change from absent to 11.1.0 failed: Could not update: Execution of '/usr/bin/pip-python install -q twisted==11.1.0' returned 1: Command /usr/bin/python -c "import setuptools;file='/tmp/pip-build-root/twisted/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-e3n5qe-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build-root/twisted
Storing complete log in /root/.pip/pip.log

Using this in my node definition.

class { 'graphite':
require => [Yumrepo['rpmforge'], Yumrepo['epel']],
}

Also, this only happens on an initial puppet run. If I run puppet a second time everything installs without issue.

fqdn in local_settings.py template?

In the latest 0.9.11 refactoring code, the graphite::config class uses a dynamic template for local_settings.py:

graphite/opt/graphite/webapp/graphite/local_settings.py_${::fqdn}.erb

I don't really understand that design decision?

config.js content keeps changing?

Hi.

I'm having an issue where every time I run "puppet agent -t" on the node where this module is installed, Puppet always thinks the content of the config.js file changes, so it re-writes it, and bounces httpd. I can run it two times immediately, and get this output every time:

Info: Caching catalog for n6.example.com
Info: Applying configuration version '1398300771'
Notice: /Stage[main]/Kibana3::Install/Vcsrepo[/opt/kibana3]/revision: revision changed '3a485aaed852b489997842034bc690b58b0af4ae' to 'v3.0.0'
Info: /Stage[main]/Kibana3::Install/Vcsrepo[/opt/kibana3]: Scheduling refresh of Class[Apache::Service]
Notice: /Stage[main]/Kibana3::Config/File[/opt/kibana3/src/config.js]/content:
--- /opt/kibana3/src/config.js 2014-04-24 00:53:04.051464340 +0000
+++ /tmp/puppet-file20140424-6085-rs1p47 2014-04-24 00:53:05.715464340 +0000
[snip]

Any ideas why that might be happening?

carbon-cache init script restart method

When carbon-cache has a kill signal sent to it, it will spend some time trying to flush out any pending metrics to disk. The current restart method in the init script has it just sleeping for 3 seconds, and then trying to start back up again, often resulting in the process just eventually dying, but then not starting back up.

It would be better to have the stop method wait for the pid file to disappear before it returned that the stop was successful

some centos 7 dependencies not found in EPEL

In trying to install graphite on CentOS 7.0.1406, I found that a couple of the packages that the puppet-graphite module was looking for were not available via EPEL. The packages were Django14 and python-sqlite2. For Django, I found a python-django package. I didn't find immediately anything which appeared to be comparable for sqlite2 on python. Not sure if the functionality was absorbed into one of the other django packages for newer versions?

I found that if I modified manifests/params.pp to use python-django instead of Django14 and not use python-sqlite2 at all that I was able to get graphite to install. I had to also manually apply the changes from graphite master on graphite-project/graphite-web@fc3f018 in order for my installed grafana UI to extract data from the graphite backend. Everything did appear to be working fine after doing this.

It may make sense to update params.pp to cover CentOS 7.0.1406 installation. If there is another repo besides EPEL that would satisfy these dependencies, I'd be interested in knowing what that is. Thanks!

use upstream web server modules like puppetlabs/apache

many modules are now depending on upstream httpd configuration modules instead of reinventing the wheel. this makes it easier to use multiple modules together and avoid duplicate package declarations. it would be nice to have here :)

I'm not sure what the "preferred" solution for ngnix is, but puppetlabs/apache seems to be dominating the ecosystem for apache management.

question about graphitepkgs

Hi,
Why is $graphite::params::graphitepkgs for redhat so big?

These are the packages I am unsure about:

  • git
  • python-zope-filesystem + python-zope-interface
  • python-ldap
  • python-crypto
  • pyOpenSSL
  • gcc
  • gcc-c++
  • zlib-static
  • MySQL-python

Why are these needed? I like your module, but these requirements look a bit strange.

Regards.

Problem with graphite and Django 1.6

Django 1.6 fails with Graphite as reported in graphite-project/graphite-web@fc3f018#diff-e383725a971fca0685db19bfe7c65b32

I have make a workaround in the node manifest:

  # Fix graphite for Django 1.6
  if $::osfamily == "Debian" {
    exec { "fix_graphite_django1.6":
      command => '/usr/bin/find /opt/graphite/webapp/graphite -iname "urls.py" -exec /bin/sed -i s/"from django.conf.urls.defaults import \*"/"from django.conf.urls import \*"/ {} \;',
      onlyif => "/bin/grep -r 'from django.conf.urls.defaults import' /opt/graphite/webapp/graphite",
      require => Class['graphite'],
    }
  }

Dependency issue for "Chown graphite for apache" exec

There seems to be an issue with Exec[Chown graphite for apache] running before the Package[httpd] is installed:

Notice: /Stage[main]/Graphite::Config/Exec[Chown graphite for apache]/returns: chown: invalid user: `apache:apache'
Error: /Stage[main]/Graphite::Config/Exec[Chown graphite for apache]: Failed to call refresh: chown -R apache:apache /opt/graphite/storage/ returned 1 instead of one of [0]
Error: /Stage[main]/Graphite::Config/Exec[Chown graphite for apache]: chown -R apache:apache /opt/graphite/storage/ returned 1 instead of one of [0]

I intend to check this out tomorrow but maybe with your knowledge of the module you'll have a solution faster ;)

Setup multiple carbon-caches with a relay

I've been looking for a way to setup multiple carbon caches with a relay in front of them. I see that you can setup the relay to point to multiple destinations, but there doesn't appear to be a way to setup multiple caches on the one node.

                      ----- carbon-cache--
node--relay--<                                > whisper
                      ----- carbon-cache--

Is this kind of setup possible to do with this module? I don't think it is, because you'd (probably) need to have an array of hashes for defining the carbon caches.. but you also might be able to get away with having a user provided template that takes care of the configuration themselves.

Thanks for the very useful module - the last time I tried to setup a graphite installation, it took a very long time in comparison.

Carbon service error on CentOS 6.4

This module is great, and was using this module successfully until this week, when it looks like something changed upstream in the carbon / twisted / daemonize. Here is the specific error when running on a CentOS 6.4, using just the default parameters.

sudo service carbon-cache start

Traceback (most recent call last):
File "/opt/graphite/bin/carbon-cache.py", line 28, in
from carbon.util import run_twistd_plugin
File "/opt/graphite/lib/carbon/util.py", line 21, in
from twisted.scripts._twistd_unix import daemonize
ImportError: cannot import name daemonize

There seems to be a bunch of people online who have noticed this same symptom since last week, here is one for reference:

http://stackoverflow.com/questions/19894708/cant-start-carbon-12-04-python-error-importerror-cannot-import-name-daem

Not sure if this can/should be resolved upstream or if there's anything in this puppet module's default params that can be tweaked, but posting this issue to raise awareness in case other people are wondering why their module stopped working.

carbon.conf.erb

There are a lot of duplicate stanzas in carbon.conf.erb such as the following:

# Set this to True to enable whitelisting and blacklisting of metrics in
# CONF_DIR/whitelist and CONF_DIR/blacklist. If the whitelist is missing or
# empty, all metrics will pass through
# USE_WHITELIST = False

This specific example shows up three times. Is there a reason for this? I'm new to Puppet so perhaps I'm just ignorant. Let me know and I'd be happy to clean up the redundancy and submit a PR.

gcc package dependency Duplicate declaration: Package[gcc] is already declared in file

Do you know if there is any way to override the inclusion of 'gcc' package? I have another module that provides Package['gcc'] and it's causing the issue below:

puppet agent -t
Warning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations
   (at /usr/lib/ruby/site_ruby/1.8/puppet/settings.rb:1134:in `issue_deprecation_warning')
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Package[gcc] is already declared in file /etc/puppetmaster/environments/production/modules/graphite/manifests/install.pp:57; cannot redeclare at /etc/puppetmaster/environments/production/modules/gcc/manifests/init.pp:19 on node eng-sensu-poc.dev.ca1.foo.co
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Latest puppetforge release on OEL 6.5 - missing /opt/graphite/bin/carbon-cache.py

Just pulled the module and installed on new host, but it seems it didn't install the carbon-cache before trying to init the service. will dig around and see if something is out of order.

Jan 23 12:44:03 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Install::Redhat/Package[python-ldap]/ensure) created
Jan 23 12:45:54 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Install::Redhat/Exec[Install txamqp]/returns) executed successfully
Jan 23 12:45:57 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Install::Redhat/Exec[Install django-tagging]/returns) executed successfully
Jan 23 12:46:23 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Install::Redhat/Exec[Install twisted]/returns) executed successfully
Jan 23 12:46:24 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Install::Redhat/Exec[Install webapp 0.9.12]) Triggered 'refresh' from 1 events
Jan 23 12:46:24 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Install::Redhat/Exec[Install webapp 0.9.12]) Scheduling refresh of Exec[Initial django db creation]
Jan 23 12:46:25 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Install::Redhat/Exec[Install whisper 0.9.12]) Triggered 'refresh' from 1 events
Jan 23 12:46:25 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Config/File[/opt/graphite/conf/storage-schemas.conf]/ensure) defined content as '{md5}c9e2cc2b133ffe704015d91d4876817e'
Jan 23 12:46:25 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Config/File[/opt/graphite/conf/storage-schemas.conf]) Scheduling refresh of Service[carbon-cache]
Jan 23 12:46:25 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Config/File[/opt/graphite/conf/carbon.conf]/ensure) defined content as '{md5}7ba1909d0ad4db336bf9623d60c73801'
Jan 23 12:46:25 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Config/File[/opt/graphite/conf/carbon.conf]) Scheduling refresh of Service[carbon-cache]
Jan 23 12:46:25 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Config/File[/opt/graphite/conf/storage-aggregation.conf]/ensure) defined content as '{md5}9a9a9319750430659ba6b0c938c9655b'
Jan 23 12:46:25 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Config/File[/opt/graphite/webapp/graphite/local_settings.py]/ensure) defined content as '{md5}47c672cf6ab93084fb2ea665745fd25c'
Jan 23 12:46:27 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Config/Exec[Initial django db creation]) Triggered 'refresh' from 1 events
Jan 23 12:46:27 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Config/Exec[Initial django db creation]) Scheduling refresh of Exec[Chown graphite for web user]
Jan 23 12:46:27 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Config/File[/opt/graphite/bin/carbon-logrotate.sh]/ensure) defined content as '{md5}7c13f336dd820daada4d1dd2b1b8fb9c'
Jan 23 12:46:27 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Config/Cron[Rotate carbon logs]/ensure) created
Jan 23 12:46:27 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Config/File[/etc/init.d/carbon-cache]/ensure) defined content as '{md5}90dcc40af47f8a5a9d08e8b5ff0ad1e4'
Jan 23 12:46:27 graphite puppet-agent[4045]: Could not start Service[carbon-cache]: Execution of '/sbin/service carbon-cache start' returned 2:
Jan 23 12:46:27 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Config/Service[carbon-cache]/ensure) change from stopped to running failed: Could not start Service[carbon-cache]: Execution of '/sbin/service carbon-cache start' returned 2:
Jan 23 12:46:27 graphite puppet-agent[4045]: Could not start Service[carbon-cache]: Execution of '/sbin/service carbon-cache start' returned 2:
Jan 23 12:46:27 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Config/Service[carbon-cache]/ensure) change from stopped to running failed: Could not start Service[carbon-cache]: Execution of '/sbin/service carbon-cache start' returned 2:
Jan 23 12:46:28 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Config/Service[carbon-cache]/enable) enable changed 'false' to 'true'
Jan 23 12:46:28 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Config/Service[carbon-cache]) Triggered 'refresh' from 2 events
Jan 23 12:46:28 graphite puppet-agent[4045]: (/Stage[main]/Graphite::Config/Anchor[graphite::config::end]) Dependency Service[carbon-cache] has failures: true

Installation question please

Hi Daniel,

Question for you. I've installed your module twice now with no issues. Once on a CentOS VM, once on CentOS in EC2, and most recently on a physical CentOS server. The puppet install runs fine with no errors. I have no custom variables assigned. The problem is when I access the URL, all I get is a directory listing of "/".

There are no errors in /etc/httpd/error_log.

Neither of these files are present, which was a little weird:
ErrorLog /opt/graphite/storage/error.log
CustomLog /opt/graphite/storage/access.log

/opt/graphite/webapp is set as the DocumentRoot, and has this content:
root@bdprodm04:[55]:/opt/graphite/webapp> ls -l
total 12
drwxr-xr-x 6 root root 4096 Oct 3 15:34 content
drwxr-xr-x 15 root root 4096 Oct 3 15:35 graphite
drwxr-xr-x 2 root root 4096 Oct 3 15:34 graphite_web-0.9.12-py2.6.egg-info

The content directory looks right as well:
root@bdprodm04:[59]:/opt/graphite/webapp/content> ls -l
total 16
drwxr-xr-x 4 root root 4096 Oct 3 15:34 css
drwxr-xr-x 2 root root 4096 Oct 3 15:34 html
drwxr-xr-x 2 root root 4096 Oct 3 15:34 img
drwxr-xr-x 6 root root 4096 Oct 3 15:34 js

It's probably something easy, but for the life of me I have not been able to figure out what the problem is.

Would you have any ideas of what might be going on?

Thank you so much for your time!
Chris Neal

Disable carbon cache

If I want a relay tier without the cache daemons running is there a way to do this?

installation issue

hi!

im trying to install it with puppet masterless

what is the right command to execute the install?
puppet apply -e "include graphite"
err: State got corrupted
err: State got corrupted

on centos 6.5 x64

gunicorn fails to start workers for some reason?

Currently configured with:

  class { '::graphite':
    gr_web_server => 'nginx',
  }

Everything looks started, but the child pid's for gunicorn only last a split second. When tailing /var/log/gunicorn/graphite.log I get the below:

2014-03-18 05:25:46 [6054] [INFO] Booting worker with pid: 6054
2014-03-18 05:25:46 [6051] [INFO] Worker exiting (pid: 6051)
2014-03-18 05:25:46 [6055] [INFO] Booting worker with pid: 6055
2014-03-18 05:25:46 [6052] [INFO] Worker exiting (pid: 6052)
2014-03-18 05:25:46 [6053] [INFO] Worker exiting (pid: 6053)
2014-03-18 05:25:46 [6056] [INFO] Booting worker with pid: 6056
2014-03-18 05:25:46 [6057] [INFO] Booting worker with pid: 6057
2014-03-18 05:25:46 [6054] [INFO] Worker exiting (pid: 6054)
2014-03-18 05:25:46 [6056] [INFO] Worker exiting (pid: 6056)
2014-03-18 05:25:46 [6058] [INFO] Booting worker with pid: 6058
2014-03-18 05:25:46 [6055] [INFO] Worker exiting (pid: 6055)
2014-03-18 05:25:46 [6059] [INFO] Booting worker with pid: 6059
2014-03-18 05:25:46 [6060] [INFO] Booting worker with pid: 6060
2014-03-18 05:25:46 [6057] [INFO] Worker exiting (pid: 6057)
2014-03-18 05:25:46 [6058] [INFO] Worker exiting (pid: 6058)
2014-03-18 05:25:46 [6061] [INFO] Booting worker with pid: 6061
2014-03-18 05:25:46 [6062] [INFO] Booting worker with pid: 6062
2014-03-18 05:25:46 [6059] [INFO] Worker exiting (pid: 6059)
2014-03-18 05:25:46 [6060] [INFO] Worker exiting (pid: 6060)
2014-03-18 05:25:46 [6062] [INFO] Worker exiting (pid: 6062)
2014-03-18 05:25:46 [6063] [INFO] Booting worker with pid: 6063
2014-03-18 05:25:46 [6064] [INFO] Booting worker with pid: 6064
2014-03-18 05:25:46 [6061] [INFO] Worker exiting (pid: 6061)
2014-03-18 05:25:46 [6065] [INFO] Booting worker with pid: 6065
2014-03-18 05:25:47 [6066] [INFO] Booting worker with pid: 6066
2014-03-18 05:25:47 [6063] [INFO] Worker exiting (pid: 6063)

I then tried starting gunicorn using the params I could see in the ps output, omitting --daemon and --log-file and saw the below:

/usr/bin/python /usr/bin/gunicorn_django --pid /var/run/gunicorn/graphite.pid --name graphite --user www-data --group www-data --bind=unix:/var/run/graphite.sock --workers=2

2014-03-18 05:24:53 [4750] [INFO] Booting worker with pid: 4750
2014-03-18 05:24:53 [4749] [INFO] Booting worker with pid: 4749
Settings file '/root/settings.py' not found in current folder.
2014-03-18 05:24:54 [4749] [INFO] Worker exiting (pid: 4749)
Settings file '/root/settings.py' not found in current folder.
2014-03-18 05:24:54 [4750] [INFO] Worker exiting (pid: 4750)
2014-03-18 05:24:54 [4753] [INFO] Booting worker with pid: 4753
2014-03-18 05:24:54 [4754] [INFO] Booting worker with pid: 4754
Settings file '/root/settings.py' not found in current folder.

If I cd into /opt/graphite/webapp/graphite/ and run the same command, it works fine.

I suspect somewhere in either /etc/init.d/gunicorn or /usr/share/gunicorn/initscript-helper.py there needs to be a working directory change or something possibly?

New init scripts break Ubuntu compatability

Looks like you are using some specific RH features of the new init scripts which unfortunately breaks compatibility with Ubuntu/Debian

Specifically sourcing /etc/rc.d/init.d/functions and the calls to rh_status

Django-Tagging question

Hi

When the module tries to run on my ubuntu 12.04 box, it tries to install django-tagging package but cannot find pip.

Should the module therefore require Python as a dependency in the Modulefile?

Paul

puppet error on fresh system installation of this module (relates to txamqp install)

just did a fresh EC2 instance creation, and ran the latest version of this module (after my last PR was added), getting the below error for txamqp on initial puppet run:

2014-03-19 07:49:05 +0000 /Stage[main]/Graphite::Install::Debian/Package[python-sqlite]/ensure (notice): ensure changed 'purged' to 'present'
2014-03-19 07:49:07 +0000 /Stage[main]/Graphite::Install::Debian/Package[python-pip]/ensure (notice): ensure changed 'purged' to 'present'
2014-03-19 07:49:08 +0000 /Stage[main]/Graphite::Install::Debian/Package[python-memcache]/ensure (notice): ensure changed 'purged' to 'present'
2014-03-19 07:49:14 +0000 Puppet (err): Execution of '/usr/bin/pip install -q txamqp' returned 1: Command /usr/bin/python -c "import setuptools;__file__='/usr/src/build/Twisted/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-uVXZHK-record/install-record.txt failed with error code 1
Storing complete log in /root/.pip/pip.log
2014-03-19 07:49:14 +0000 /Stage[main]/Graphite::Install::Debian/Package[txamqp]/ensure (err): change from absent to present failed: Execution of '/usr/bin/pip install -q txamqp' returned 1: Command /usr/bin/python -c "import setuptools;__file__='/usr/src/build/Twisted/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-uVXZHK-record/install-record.txt failed with error code 1
Storing complete log in /root/.pip/pip.log
2014-03-19 07:49:22 +0000 /Stage[main]/Graphite::Install::Debian/Package[python-django]/ensure (notice): ensure changed 'purged' to 'present'
2014-03-19 07:49:24 +0000 /Stage[main]/Graphite::Install::Debian/Package[python-django-tagging]/ensure (notice): ensure changed 'purged' to 'present'
2014-03-19 07:49:29 +0000 /Stage[main]/Graphite::Install::Debian/Package[python-twisted]/ensure (notice): ensure changed 'purged' to 'present'

next puppet run seems to succeed fine.

any ideas?

Errors with gr_web_site => 'none'

I'm on CentOS but suspect the same issue will occur with Debian or any system that does not have Apache installed.

I am trying a very basic use:

class {'graphite':
  gr_web_server => 'none'
}

which causes:

Error: Could not set 'file' on ensure: Could not find user apache at 103:/usr/share/puppet/modules/graphite/manifests/config.pp
Error: Could not set 'file' on ensure: Could not find user apache at 103:/usr/share/puppet/modules/graphite/manifests/config.pp
Wrapped exception:
Could not find user apache
Error: /Stage[main]/Graphite::Config/File[/opt/graphite/webapp/graphite/local_settings.py]/ensure: change from absent to file failed: Could not set 'file' on ensure: Could not find user apache at 103:/usr/share/puppet/modules/graphite/manifests/config.pp

I would expect that with 'none', no file permission changing should be attempted at all. Am I missing something? Or should a number of the commands in config.pp be wrapped in an if( $web_server_package_require != '') ?

Question - Uninstallation

Hi,

I was trying to install a grafana module on a server that was built with your module. At some point I tried to adjust the apache vhost settings in puppet and that ended very badly. Now the module will not successfully complete a puppet run on this server.

I would like to know if it is possible to completely uninstall this module? I believe that if I uninstall it and reinstall it, the configuration may be corrected and would like to try this before wiping the server completely and starting over.

Enable Mod Headers

We have the settings in hiera that include:

graphite::gr_web_cors_allow_from_all: true

On every puppet run, we get the following

screen shot 2014-06-25 at 15 46 50

This seems to be due to the following

  if $::graphite::gr_web_cors_allow_from_all {
    exec { 'enable mod_headers':
      command => 'a2enmod headers',
      require => Package[$::graphite::params::apache_wsgi_pkg]
    }
  }

There is no unless command on the exec. Is this a known issue?

Adding upstream dependency of stankevich/puppet-python

Hi echocat devs, I have a couple questions about your project. I'm planning a pull request for our group so we can use your graphite module. However, We'd like to remove some of the dependencies on Epel by using python virtualenv and changing manifests/install.pp logic.

Would you be willing to accept a new puppet module dependency?

  • currently the built in Pip provider for package doesn't support virtualenv.
  • this would require hooks into the init scripts and the graphite web wsgi script
  • new install method would need to be used
  • https://github.com/stankevich/puppet-python

issues after going from 5.1.1 to 5.3.4

We've had some issues after using 5.3.4 in our environment. It looks liek the local_settings.py file adds some additional brackets and a trailing comma. Also, which maybe a side effect, the graphite.db django file is not being created.

mod_python is installed after httpd restart

Thank you for your work!

Config.pp has:

    package {
        "${::graphite::params::apache_pkg}":        ensure => installed;
        "${::graphite::params::apache_python_pkg}": ensure => installed;
    }

I believe the apache_python_pkg package resource is missing a:

notify  => Service["${::graphite::params::apache_service_name}"]

This will fix mod_python being installed -after- apache is installed & configured, thus graphite not being accessible.

What do you think?

Redhat exec is applied on every run

Notice: /Stage[main]/Graphite::Install::Redhat/Exec[Install txamqp]/returns: executed successfully
Notice: /Stage[main]/Graphite::Install::Redhat/Exec[Install django-tagging]/returns: executed successfully
Notice: /Stage[main]/Graphite::Install::Redhat/Exec[Install twisted]/returns: executed successfully

These 3 execs are applied on every run after graphite installs.

Switching from apache to nginx webserver kills our cluster

We wanted to switch our cluster from apache to nginx as nginx runs wsgi faster than apache

When we changed the web_server from apache to nginx, we got a cluster failure. The switch in the web_server doesn't take into account that other processes may be bound to a port:

e.g.

https://github.com/echocat/puppet-graphite/blob/master/manifests/config.pp#L21

in this case statement, the apache2 config doesnt ensure there is no nginx service running and vice-versa

I have fixed this in a local branch. Are you interested in having this feed back to the main repo?

Thanks

Paul

Issues with Redeclaring Packages. Dublicates #48

I'm having issues with redeclared packages:

Error: Duplicate declaration: Package[gcc] is already declared in file /etc/puppet/modules/rbenv/manifests/deps/redhat.pp:11; cannot redeclare at /etc/puppet/modules/graphite/manifests/install/redhat.pp:26 on node foo.local

This will occur if you have another module somewhere with the package declared.

The normal course of action is to do:

if ! defined(Package['gcc']) {
    package { 'gcc': ensure => installed }
  }

So puppet won't bomb-out on the re-declaration. Not sure what the cleanest way of doing that for an array of packages would be? I'll have a look into it ๐Ÿ‘

Yum package "Django" cannot be found in EPEL

Hey there, I'm wondering if you know where the Yum package "Django" can be found?

I checked on the latest EPEL repo and only "Django14" is available. Since the module uses "Django" I had to manually override the package and replaced by a pip-installed Django 1.3.7 version, so it works but is cumbersome.

Initial Django DB Creation fails

Hi,

I'm running the script on Ubuntu 12.04 with puppet server @ version 2.6.4 and puppet client @ 0.25.4. Client is a completely clean VM.

This is my error log:

Sep 2 12:43:06 puppetclient puppetd[12214]: (/Stage[main]/Graphite::Config/Package[apache2]) Scheduling refresh of Exec[Chown graphite for apache]
Sep 2 12:43:06 puppetclient puppetd[12214]: (/Stage[main]/Graphite::Config/File[/opt/graphite/webapp/graphite/local_settings.py]/ensure) content changed '{md5}b32a2da0dae6bf44ff69f9bfeaf02762' to 'unknown checksum'
Sep 2 12:43:06 puppetclient puppetd[12214]: (/Stage[main]/Graphite::Config/Exec[Initial django db creation]) Triggering 'refresh' from 1 dependencies
Sep 2 12:43:06 puppetclient puppetd[12214]: (/Stage[main]/Graphite::Config/Exec[Initial django db creation]) Failed to call refresh on Exec[Initial django db creation]: python manage.py syncdb --noinput returned 1 instead of one of [0] at /etc/sokrati/config/puppetMaster/modules/graphite/manifests/config.pp:61
Sep 2 12:43:06 puppetclient puppetd[12214]: (/Stage[main]/Graphite::Config/Exec[Initial django db creation]) Scheduling refresh of Exec[Chown graphite for apache]
Sep 2 12:43:06 puppetclient puppetd[12214]: (/Stage[main]/Graphite::Config/Exec[Chown graphite for apache]) Triggering 'refresh' from 2 dependencies
Sep 2 12:43:12 puppetclient puppetd[12214]: (/Stage[main]/Graphite::Config/Package[libapache2-mod-python]/ensure) ensure changed 'purged' to 'present'
Sep 2 12:43:12 puppetclient puppetd[12214]: (/Stage[main]/Graphite::Config/Exec[Disable default apache site]/returns) executed successfully
Sep 2 12:43:12 puppetclient puppetd[12214]: (/Stage[main]/Graphite::Config/Exec[Disable default apache site]) Scheduling refresh of Service[apache2]
Sep 2 12:43:12 puppetclient puppetd[12214]: (Filebucket[/var/lib/puppet/clientbucket]) Adding /etc/apache2/ports.conf(38b31d20326f3640a8dfbe1ff5d1c4ad)
Sep 2 12:43:12 puppetclient puppetd[12214]: (/Stage[main]/Graphite::Config/File[/etc/apache2/ports.conf]) Filebucketed /etc/apache2/ports.conf to puppet with sum 38b31d20326f3640a8dfbe1ff5d1c4ad
Sep 2 12:43:12 puppetclient puppetd[12214]: (/Stage[main]/Graphite::Config/File[/etc/apache2/ports.conf]/content) content changed '{md5}38b31d20326f3640a8dfbe1ff5d1c4ad' to 'unknown checksum'
Sep 2 12:43:12 puppetclient puppetd[12214]: (/Stage[main]/Graphite::Config/File[/etc/apache2/ports.conf]/owner) owner changed 'root' to 'www-data'
Sep 2 12:43:12 puppetclient puppetd[12214]: (/Stage[main]/Graphite::Config/File[/etc/apache2/ports.conf]/group) group changed 'root' to 'www-data'
Sep 2 12:43:12 puppetclient puppetd[12214]: (/Stage[main]/Graphite::Config/File[/etc/apache2/sites-available/graphite.conf]/ensure) content changed '{md5}2e629df6d71e135f4c94917fca31d0b5' to 'unknown checksum'
Sep 2 12:43:12 puppetclient puppetd[12214]: (/Stage[main]/Graphite::Config/File[/etc/apache2/sites-enabled/graphite.conf]/ensure) created
Sep 2 12:43:12 puppetclient puppetd[12214]: (/Stage[main]/Graphite::Config/File[/etc/apache2/sites-enabled/graphite.conf]) Scheduling refresh of Service[apache2]
Sep 2 12:43:12 puppetclient puppetd[12214]: (/Stage[main]/Graphite::Config/Service[apache2]) Triggering 'refresh' from 2 dependencies
Sep 2 12:43:13 puppetclient puppetd[12214]: (/Stage[main]/Graphite::Config/File[/opt/graphite/bin/carbon-logrotate.sh]/ensure) content changed '{md5}7c13f336dd820daada4d1dd2b1b8fb9c' to 'unknown checksum'
Sep 2 12:43:13 puppetclient puppetd[12214]: (/Stage[main]/Graphite::Config/Cron[Rotate carbon logs]/ensure) created
Sep 2 12:43:13 puppetclient crontab[13436]: (root) REPLACE (root)

This error prevents me from starting graphite. If i manually run the 'python manage.py syncdb --noinput' it executes successfully and graphite starts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.