Ottomata has submitted this change and it was merged.

Change subject: Set MPLCONFIGDIR env var for Matplotlib
......................................................................


Set MPLCONFIGDIR env var for Matplotlib

matplotlib attempts to write configuration data to MPLCONFIGDIR, which is
currently unset. This change adds it as a class parameter and instructs Puppet
to ensure the directory exist. Also chmods both graphs and notebook dir to
0775.

Change-Id: Ib34147cf8befd8bfcd81a57c2b211942d37cd286
---
M modules/eventlogging/manifests/notebook.pp
M modules/eventlogging/templates/notebook.conf.erb
2 files changed, 12 insertions(+), 3 deletions(-)

Approvals:
  Ottomata: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/eventlogging/manifests/notebook.pp 
b/modules/eventlogging/manifests/notebook.pp
index c28161a..9d1488f 100644
--- a/modules/eventlogging/manifests/notebook.pp
+++ b/modules/eventlogging/manifests/notebook.pp
@@ -33,6 +33,7 @@
        $ipython_dir = '/var/lib/ipython',
        $ipython_profile = 'nbserver',
        $ipython_user = 'ipython',
+       $graph_dir = '/var/lib/ipython/graphs',
        $notebook_dir = '/var/lib/ipython/notebooks',
        $notebook_ip = '*',
        $notebook_port = 8888,
@@ -59,7 +60,15 @@
                ensure  => directory,
                owner   => $ipython_user,
                group   => $ipython_user,
-               mode    => '0664',
+               mode    => '0775',
+               require => Systemuser[$ipython_user],
+       }
+
+       file { $graph_dir:
+               ensure  => directory,
+               owner   => $ipython_user,
+               group   => $ipython_user,
+               mode    => '0775',
                require => Systemuser[$ipython_user],
        }
 
@@ -82,7 +91,7 @@
 
        file { '/etc/supervisor/conf.d/notebook.conf':
                content => template('eventlogging/notebook.conf.erb'),
-               require => [ Package['ipython-notebook'], File[$notebook_dir] ],
+               require => [ Package['ipython-notebook'], File[$notebook_dir], 
File[$graph_dir] ],
                notify  => Service['supervisor'],
                mode    => '0444',
        }
diff --git a/modules/eventlogging/templates/notebook.conf.erb 
b/modules/eventlogging/templates/notebook.conf.erb
index 89ddff2..e90b128 100644
--- a/modules/eventlogging/templates/notebook.conf.erb
+++ b/modules/eventlogging/templates/notebook.conf.erb
@@ -8,4 +8,4 @@
 redirect_stderr = true
 stdout_logfile = /var/log/supervisor/%(program_name)s.log
 stderr_logfile = NONE
-environment = IPYTHONDIR=<%= ipython_dir %>
+environment = IPYTHONDIR=<%= ipython_dir %>,MPLCONFIGDIR=<%= graph_dir %>

-- 
To view, visit https://gerrit.wikimedia.org/r/59981
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib34147cf8befd8bfcd81a57c2b211942d37cd286
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to