Change in vdsm[master]: repoplot: Allow using on headless server
nsoffer at redhat.com
nsoffer at redhat.com
Tue Feb 23 19:16:24 UTC 2016
Nir Soffer has uploaded a new change for review.
Change subject: repoplot: Allow using on headless server
......................................................................
repoplot: Allow using on headless server
matplotlib uses gtk by default, failing on a headless server. Now we use
the "Agg" backend instead.
See http://matplotlib.org/faq/howto_faq.html#howto-webapp
Change-Id: Ic540f7ff109134f420998d7f04ee989d433f5370
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M contrib/repoplot
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/39/53939/1
diff --git a/contrib/repoplot b/contrib/repoplot
index d70cd55..81076cb 100755
--- a/contrib/repoplot
+++ b/contrib/repoplot
@@ -34,6 +34,11 @@
import sys
from collections import defaultdict
+# Use non-interactive backend so we can generate graphs on a headless server.
+# See http://matplotlib.org/faq/howto_faq.html#howto-webapp
+import matplotlib
+matplotlib.use("Agg")
+
import pandas
from matplotlib import pyplot
--
To view, visit https://gerrit.ovirt.org/53939
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic540f7ff109134f420998d7f04ee989d433f5370
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
More information about the vdsm-patches
mailing list