Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
slapos
Commits
190b2e94
Commit
190b2e94
authored
Dec 13, 2014
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into erp5-cluster
parents
8e7b502c
fd2c4d47
Changes
33
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
490 additions
and
133 deletions
+490
-133
component/binutils/buildout.cfg
component/binutils/buildout.cfg
+0
-16
component/dbus/buildout.cfg
component/dbus/buildout.cfg
+2
-2
component/gcc/buildout.cfg
component/gcc/buildout.cfg
+0
-2
component/ghostscript/buildout.cfg
component/ghostscript/buildout.cfg
+0
-1
component/graphviz/buildout.cfg
component/graphviz/buildout.cfg
+2
-7
component/gtk-2/buildout.cfg
component/gtk-2/buildout.cfg
+1
-2
component/gtkmm/buildout.cfg
component/gtkmm/buildout.cfg
+1
-3
component/inkscape/buildout.cfg
component/inkscape/buildout.cfg
+0
-1
component/jasper/CVE-2014-9029.patch
component/jasper/CVE-2014-9029.patch
+36
-0
component/jasper/buildout.cfg
component/jasper/buildout.cfg
+1
-0
component/libdmtx/buildout.cfg
component/libdmtx/buildout.cfg
+0
-1
component/librsvg/buildout.cfg
component/librsvg/buildout.cfg
+3
-5
component/make/buildout.cfg
component/make/buildout.cfg
+2
-3
component/nginx/buildout.cfg
component/nginx/buildout.cfg
+2
-2
component/numpy/buildout.cfg
component/numpy/buildout.cfg
+0
-2
component/poppler/buildout.cfg
component/poppler/buildout.cfg
+0
-2
component/python-2.7/buildout.cfg
component/python-2.7/buildout.cfg
+1
-0
component/python-2.7/fix_compiler_module_issue_20613.patch
component/python-2.7/fix_compiler_module_issue_20613.patch
+378
-0
software/apache-frontend/common.cfg
software/apache-frontend/common.cfg
+0
-2
software/apache-frontend/software.cfg
software/apache-frontend/software.cfg
+1
-1
software/erp5testnode/software.cfg
software/erp5testnode/software.cfg
+1
-1
software/html5ide/software.cfg
software/html5ide/software.cfg
+1
-1
software/monitor/software.cfg
software/monitor/software.cfg
+1
-1
software/nginx-push-stream/software.cfg
software/nginx-push-stream/software.cfg
+1
-1
software/powerdns/software.cfg
software/powerdns/software.cfg
+1
-1
software/seleniumrunner/software.cfg
software/seleniumrunner/software.cfg
+1
-1
software/slapos-in-partition/software.cfg
software/slapos-in-partition/software.cfg
+1
-1
software/slapos-testing/software.cfg
software/slapos-testing/software.cfg
+1
-1
software/test-slave-instance-deployment/software.cfg
software/test-slave-instance-deployment/software.cfg
+1
-1
stack/cloudooo.cfg
stack/cloudooo.cfg
+1
-1
stack/monitor/buildout.cfg
stack/monitor/buildout.cfg
+1
-1
stack/monitor/monitor.py.in
stack/monitor/monitor.py.in
+47
-68
stack/slapos.cfg
stack/slapos.cfg
+2
-2
No files found.
component/binutils/buildout.cfg
deleted
100644 → 0
View file @
8e7b502c
[buildout]
parts =
binutils
extends =
../bison/buildout.cfg
../zlib/buildout.cfg
[binutils]
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/binutils/binutils-2.21.1.tar.bz2
md5sum = bde820eac53fa3a8d8696667418557ad
environment =
PATH=${bison:location}/bin:%(PATH)s
CPPFLAGS=-I${zlib:location}/include
LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
component/dbus/buildout.cfg
View file @
190b2e94
...
@@ -10,8 +10,8 @@ parts =
...
@@ -10,8 +10,8 @@ parts =
[dbus]
[dbus]
recipe = slapos.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://dbus.freedesktop.org/releases/dbus/dbus-1.8.1
0
.tar.gz
url = http://dbus.freedesktop.org/releases/dbus/dbus-1.8.1
2
.tar.gz
md5sum =
6be5ef99ae784de9d04589eb067fe038
md5sum =
0ca23fc84c09cb3d29b9c27811ff4475
location = ${buildout:parts-directory}/${:_buildout_section_name_}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
configure-options =
configure-options =
--disable-static
--disable-static
...
...
component/gcc/buildout.cfg
View file @
190b2e94
...
@@ -2,10 +2,8 @@
...
@@ -2,10 +2,8 @@
# Mostly required to support languages different than C or C++
# Mostly required to support languages different than C or C++
[buildout]
[buildout]
extends =
extends =
../m4/buildout.cfg
../gmp/buildout.cfg
../gmp/buildout.cfg
../xz-utils/buildout.cfg
../xz-utils/buildout.cfg
../zip/buildout.cfg
parts =
parts =
gcc
gcc
...
...
component/ghostscript/buildout.cfg
View file @
190b2e94
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
extends =
extends =
../fontconfig/buildout.cfg
../fontconfig/buildout.cfg
../freetype/buildout.cfg
../freetype/buildout.cfg
../libjpeg/buildout.cfg
../libtiff/buildout.cfg
../libtiff/buildout.cfg
../libxml2/buildout.cfg
../libxml2/buildout.cfg
../pkgconfig/buildout.cfg
../pkgconfig/buildout.cfg
...
...
component/graphviz/buildout.cfg
View file @
190b2e94
...
@@ -6,19 +6,14 @@ parts =
...
@@ -6,19 +6,14 @@ parts =
graphviz
graphviz
extends =
extends =
../bzip2/buildout.cfg
../bzip2/buildout.cfg
../fontconfig/buildout.cfg
../freetype/buildout.cfg
../libpng/buildout.cfg
../glib/buildout.cfg
../gtk-2/buildout.cfg
../gtk-2/buildout.cfg
../pkgconfig/buildout.cfg
../pkgconfig/buildout.cfg
../xorg/buildout.cfg
../zlib/buildout.cfg
../zlib/buildout.cfg
[graphviz]
[graphviz]
recipe = slapos.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.3
6
.0.tar.gz
url = http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.3
8
.0.tar.gz
md5sum =
1f41664dba0c93109ac8b71216bf2b57
md5sum =
5b6a829b2ac94efcd5fa3c223ed6d3ae
pkg_config_depends = ${pango:location}/lib/pkgconfig:${pango:pkg_config_depends}
pkg_config_depends = ${pango:location}/lib/pkgconfig:${pango:pkg_config_depends}
configure-options =
configure-options =
--with-included-ltdl
--with-included-ltdl
...
...
component/gtk-2/buildout.cfg
View file @
190b2e94
[buildout]
[buildout]
extends =
extends =
../autoconf/buildout.cfg
../autoconf/buildout.cfg
../libtool/buildout.cfg
../automake/buildout.cfg
../automake/buildout.cfg
../bzip2/buildout.cfg
../bzip2/buildout.cfg
../fontconfig/buildout.cfg
../fontconfig/buildout.cfg
...
@@ -12,7 +11,7 @@ extends =
...
@@ -12,7 +11,7 @@ extends =
../libjpeg/buildout.cfg
../libjpeg/buildout.cfg
../libpng/buildout.cfg
../libpng/buildout.cfg
../libtiff/buildout.cfg
../libtiff/buildout.cfg
../lib
xml2
/buildout.cfg
../lib
tool
/buildout.cfg
../perl/buildout.cfg
../perl/buildout.cfg
../pkgconfig/buildout.cfg
../pkgconfig/buildout.cfg
../xorg/buildout.cfg
../xorg/buildout.cfg
...
...
component/gtkmm/buildout.cfg
View file @
190b2e94
[buildout]
[buildout]
extends =
extends =
../bzip2/buildout.cfg
../bzip2/buildout.cfg
../fontconfig/buildout.cfg
../freetype/buildout.cfg
../freetype/buildout.cfg
../glibmm/buildout.cfg
../glibmm/buildout.cfg
../gtk-2/buildout.cfg
../gtk-2/buildout.cfg
../libpng/buildout.cfg
../libxml2/buildout.cfg
../perl/buildout.cfg
../perl/buildout.cfg
../xorg/buildout.cfg
../xorg/buildout.cfg
../xz-utils/buildout.cfg
../xz-utils/buildout.cfg
../zlib/buildout.cfg
../zlib/buildout.cfg
parts =
parts =
gtkmm
gtkmm
...
...
component/inkscape/buildout.cfg
View file @
190b2e94
...
@@ -5,7 +5,6 @@ extends =
...
@@ -5,7 +5,6 @@ extends =
../bzip2/buildout.cfg
../bzip2/buildout.cfg
../freetype/buildout.cfg
../freetype/buildout.cfg
../garbage-collector/buildout.cfg
../garbage-collector/buildout.cfg
../gcc/buildout.cfg
../gettext/buildout.cfg
../gettext/buildout.cfg
../glibmm/buildout.cfg
../glibmm/buildout.cfg
../gtk-2/buildout.cfg
../gtk-2/buildout.cfg
...
...
component/jasper/CVE-2014-9029.patch
0 → 100644
View file @
190b2e94
Description: CVE-2014-9029: Heap overflows in libjasper
Origin: vendor
Forwarded: no
Author: Tomas Hoger <thoger@redhat.com>
Reviewed-by: Salvatore Bonaccorso <carnil@debian.org>
Last-Update: 2014-11-28
--- a/src/libjasper/jpc/jpc_dec.c
+++ b/src/libjasper/jpc/jpc_dec.c
@@ -1280,7 +1280,7 @@
static int jpc_dec_process_coc(jpc_dec_t
jpc_coc_t *coc = &ms->parms.coc;
jpc_dec_tile_t *tile;
- if (JAS_CAST(int, coc->compno) > dec->numcomps) {
+ if (JAS_CAST(int, coc->compno) >= dec->numcomps) {
jas_eprintf("invalid component number in COC marker segment\n");
return -1;
}
@@ -1306,7 +1306,7 @@
static int jpc_dec_process_rgn(jpc_dec_t
jpc_rgn_t *rgn = &ms->parms.rgn;
jpc_dec_tile_t *tile;
- if (JAS_CAST(int, rgn->compno) > dec->numcomps) {
+ if (JAS_CAST(int, rgn->compno) >= dec->numcomps) {
jas_eprintf("invalid component number in RGN marker segment\n");
return -1;
}
@@ -1355,7 +1355,7 @@
static int jpc_dec_process_qcc(jpc_dec_t
jpc_qcc_t *qcc = &ms->parms.qcc;
jpc_dec_tile_t *tile;
- if (JAS_CAST(int, qcc->compno) > dec->numcomps) {
+ if (JAS_CAST(int, qcc->compno) >= dec->numcomps) {
jas_eprintf("invalid component number in QCC marker segment\n");
return -1;
}
component/jasper/buildout.cfg
View file @
190b2e94
...
@@ -13,6 +13,7 @@ patches =
...
@@ -13,6 +13,7 @@ patches =
${:_profile_base_location_}/misc-fixes.patch#1202be8418907dfe58f819f7b47da24f
${:_profile_base_location_}/misc-fixes.patch#1202be8418907dfe58f819f7b47da24f
${:_profile_base_location_}/fix-filename-buffer-overflow.patch#38403f9c82a18547beca16c9c6f4ce7a
${:_profile_base_location_}/fix-filename-buffer-overflow.patch#38403f9c82a18547beca16c9c6f4ce7a
${:_profile_base_location_}/CVE-2011-4516-and-CVE-2011-4517.patch#a9676718ed016f66a3c76acf764c9e72
${:_profile_base_location_}/CVE-2011-4516-and-CVE-2011-4517.patch#a9676718ed016f66a3c76acf764c9e72
${:_profile_base_location_}/CVE-2014-9029.patch#d69195cf17878f024cc0b580045ec314
# jasper configure script is not executable by default
# jasper configure script is not executable by default
configure-command =
configure-command =
/bin/sh ./configure --prefix=${buildout:parts-directory}/${:_buildout_section_name_} --disable-static --enable-shared --disable-opengl
/bin/sh ./configure --prefix=${buildout:parts-directory}/${:_buildout_section_name_} --disable-static --enable-shared --disable-opengl
...
...
component/libdmtx/buildout.cfg
View file @
190b2e94
...
@@ -6,7 +6,6 @@ extends =
...
@@ -6,7 +6,6 @@ extends =
../bzip2/buildout.cfg
../bzip2/buildout.cfg
../imagemagick/buildout.cfg
../imagemagick/buildout.cfg
../jbigkit/buildout.cfg
../jbigkit/buildout.cfg
../libpng/buildout.cfg
../zlib/buildout.cfg
../zlib/buildout.cfg
parts =
parts =
libdmtx
libdmtx
...
...
component/librsvg/buildout.cfg
View file @
190b2e94
...
@@ -2,13 +2,11 @@
...
@@ -2,13 +2,11 @@
parts = librsvg
parts = librsvg
extends =
extends =
../bzip2/buildout.cfg
../bzip2/buildout.cfg
../pkgconfig/buildout.cfg
../libpng/buildout.cfg
../libxml2/buildout.cfg
../zlib/buildout.cfg
../gtk-2/buildout.cfg
../gtk-2/buildout.cfg
../xorg/buildout.cfg
../libxml2/buildout.cfg
../pkgconfig/buildout.cfg
../xz-utils/buildout.cfg
../xz-utils/buildout.cfg
../zlib/buildout.cfg
[libcroco]
[libcroco]
recipe = slapos.recipe.cmmi
recipe = slapos.recipe.cmmi
...
...
component/make/buildout.cfg
View file @
190b2e94
[buildout]
[buildout]
extends =
parts =
../autoconf/buildout.cfg
make
../automake/buildout.cfg
[make]
[make]
# make 3.82 breaks too many things. Stick with 3.81.
# make 3.82 breaks too many things. Stick with 3.81.
...
...
component/nginx/buildout.cfg
View file @
190b2e94
...
@@ -11,8 +11,8 @@ parts = nginx-output
...
@@ -11,8 +11,8 @@ parts = nginx-output
[nginx-common]
[nginx-common]
recipe = slapos.recipe.cmmi
recipe = slapos.recipe.cmmi
url = http://nginx.org/download/nginx-1.7.
7
.tar.gz
url = http://nginx.org/download/nginx-1.7.
8
.tar.gz
md5sum =
3beaa25fc87ff2a75ab1b46174dc5ebf
md5sum =
fd5ab813fc1853cd8efe580ead577c3e
[nginx]
[nginx]
<= nginx-common
<= nginx-common
...
...
component/numpy/buildout.cfg
View file @
190b2e94
...
@@ -4,8 +4,6 @@ extends =
...
@@ -4,8 +4,6 @@ extends =
../gcc/buildout.cfg
../gcc/buildout.cfg
../libatlas/buildout.cfg
../libatlas/buildout.cfg
version = versions
[numpy-env]
[numpy-env]
PATH = ${gcc-fortran:location}/bin:%(PATH)s
PATH = ${gcc-fortran:location}/bin:%(PATH)s
BLAS = ${libatlas:location}/lib/libcblas.a
BLAS = ${libatlas:location}/lib/libcblas.a
...
...
component/poppler/buildout.cfg
View file @
190b2e94
...
@@ -3,12 +3,10 @@ parts = poppler
...
@@ -3,12 +3,10 @@ parts = poppler
extends =
extends =
../bzip2/buildout.cfg
../bzip2/buildout.cfg
../fontconfig/buildout.cfg
../fontconfig/buildout.cfg
../freetype/buildout.cfg
../jbigkit/buildout.cfg
../jbigkit/buildout.cfg
../libjpeg/buildout.cfg
../libjpeg/buildout.cfg
../libpng/buildout.cfg
../libpng/buildout.cfg
../libtiff/buildout.cfg
../libtiff/buildout.cfg
../libxml2/buildout.cfg
../pkgconfig/buildout.cfg
../pkgconfig/buildout.cfg
../xz-utils/buildout.cfg
../xz-utils/buildout.cfg
../zlib/buildout.cfg
../zlib/buildout.cfg
...
...
component/python-2.7/buildout.cfg
View file @
190b2e94
...
@@ -41,6 +41,7 @@ patch-options = -p1
...
@@ -41,6 +41,7 @@ patch-options = -p1
patches =
patches =
${:_profile_base_location_}/tls_sni.patch#c95af105e6e96aaa58a50137595872a0
${:_profile_base_location_}/tls_sni.patch#c95af105e6e96aaa58a50137595872a0
${:_profile_base_location_}/tls_sni_httplib.patch#5c9d00d23b85169df792a936a056cbcc
${:_profile_base_location_}/tls_sni_httplib.patch#5c9d00d23b85169df792a936a056cbcc
${:_profile_base_location_}/fix_compiler_module_issue_20613.patch#94443a77f903e9de880a029967fa6aa7
url =
url =
http://python.org/ftp/python/${:package_version}/Python-${:package_version}${:package_version_suffix}.tar.xz
http://python.org/ftp/python/${:package_version}/Python-${:package_version}${:package_version_suffix}.tar.xz
configure-options =
configure-options =
...
...
component/python-2.7/fix_compiler_module_issue_20613.patch
0 → 100644
View file @
190b2e94
This diff is collapsed.
Click to expand it.
software/apache-frontend/common.cfg
View file @
190b2e94
...
@@ -5,7 +5,6 @@ extends =
...
@@ -5,7 +5,6 @@ extends =
../../stack/slapos.cfg
../../stack/slapos.cfg
../../component/dash/buildout.cfg
../../component/dash/buildout.cfg
../../component/binutils/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/apache/buildout.cfg
../../component/apache/buildout.cfg
../../component/gzip/buildout.cfg
../../component/gzip/buildout.cfg
...
@@ -25,7 +24,6 @@ parts +=
...
@@ -25,7 +24,6 @@ parts +=
template
template
template-apache-frontend
template-apache-frontend
template-apache-replicate
template-apache-replicate
binutils
apache-2.2
apache-2.2
apache-antiloris-apache-2.2
apache-antiloris-apache-2.2
...
...
software/apache-frontend/software.cfg
View file @
190b2e94
...
@@ -12,7 +12,7 @@ gitdb = 0.5.4
...
@@ -12,7 +12,7 @@ gitdb = 0.5.4
plone.recipe.command = 1.1
plone.recipe.command = 1.1
pycrypto = 2.6.1
pycrypto = 2.6.1
rdiff-backup = 1.0.5
rdiff-backup = 1.0.5
slapos.recipe.template = 2.
5
slapos.recipe.template = 2.
6
slapos.toolbox = 0.40.4
slapos.toolbox = 0.40.4
smmap = 0.8.2
smmap = 0.8.2
...
...
software/erp5testnode/software.cfg
View file @
190b2e94
...
@@ -61,7 +61,7 @@ md5sum = 22ffc8e212dcf2db8ad94cf0e5ac4772
...
@@ -61,7 +61,7 @@ md5sum = 22ffc8e212dcf2db8ad94cf0e5ac4772
PyXML = 0.8.5
PyXML = 0.8.5
erp5.util = 0.4.42
erp5.util = 0.4.42
slapos.cookbook = 0.92
slapos.cookbook = 0.92
slapos.recipe.template = 2.
5
slapos.recipe.template = 2.
6
# Required by:
# Required by:
# slapos.cookbook==0.92
# slapos.cookbook==0.92
...
...
software/html5ide/software.cfg
View file @
190b2e94
...
@@ -48,4 +48,4 @@ PyRSS2Gen = 1.1
...
@@ -48,4 +48,4 @@ PyRSS2Gen = 1.1
cns.recipe.symlink = 0.2.3
cns.recipe.symlink = 0.2.3
collective.recipe.template = 1.11
collective.recipe.template = 1.11
plone.recipe.command = 1.1
plone.recipe.command = 1.1
slapos.recipe.template = 2.
5
slapos.recipe.template = 2.
6
software/monitor/software.cfg
View file @
190b2e94
...
@@ -76,7 +76,7 @@ eggs =
...
@@ -76,7 +76,7 @@ eggs =
PyRSS2Gen = 1.1
PyRSS2Gen = 1.1
cns.recipe.symlink = 0.2.3
cns.recipe.symlink = 0.2.3
plone.recipe.command = 1.1
plone.recipe.command = 1.1
slapos.recipe.template = 2.
5
slapos.recipe.template = 2.
6
z3c.recipe.scripts = 1.0.1
z3c.recipe.scripts = 1.0.1
apache-libcloud = 0.16.0
apache-libcloud = 0.16.0
...
...
software/nginx-push-stream/software.cfg
View file @
190b2e94
...
@@ -43,4 +43,4 @@ mode = 0644
...
@@ -43,4 +43,4 @@ mode = 0644
[versions]
[versions]
plone.recipe.command = 1.1
plone.recipe.command = 1.1
slapos.recipe.template = 2.
5
slapos.recipe.template = 2.
6
software/powerdns/software.cfg
View file @
190b2e94
...
@@ -64,4 +64,4 @@ PyRSS2Gen = 1.1
...
@@ -64,4 +64,4 @@ PyRSS2Gen = 1.1
cns.recipe.symlink = 0.2.3
cns.recipe.symlink = 0.2.3
collective.recipe.template = 1.11
collective.recipe.template = 1.11
plone.recipe.command = 1.1
plone.recipe.command = 1.1
slapos.recipe.template = 2.
5
slapos.recipe.template = 2.
6
software/seleniumrunner/software.cfg
View file @
190b2e94
...
@@ -47,4 +47,4 @@ mode = 0644
...
@@ -47,4 +47,4 @@ mode = 0644
[versions]
[versions]
plone.recipe.command = 1.1
plone.recipe.command = 1.1
slapos.recipe.template = 2.
5
slapos.recipe.template = 2.
6
software/slapos-in-partition/software.cfg
View file @
190b2e94
...
@@ -12,4 +12,4 @@ Pygments = 1.6
...
@@ -12,4 +12,4 @@ Pygments = 1.6
collective.recipe.environment = 0.2.0
collective.recipe.environment = 0.2.0
collective.recipe.template = 1.10
collective.recipe.template = 1.10
slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.
5
slapos.recipe.template = 2.
6
software/slapos-testing/software.cfg
View file @
190b2e94
...
@@ -83,4 +83,4 @@ mode = 640
...
@@ -83,4 +83,4 @@ mode = 640
Pygments = 1.6
Pygments = 1.6
collective.recipe.template = 1.10
collective.recipe.template = 1.10
plone.recipe.command = 1.1
plone.recipe.command = 1.1
slapos.recipe.template = 2.
5
slapos.recipe.template = 2.
6
software/test-slave-instance-deployment/software.cfg
View file @
190b2e94
...
@@ -59,7 +59,7 @@ eggs = collective.recipe.template
...
@@ -59,7 +59,7 @@ eggs = collective.recipe.template
collective.recipe.template = 1.11
collective.recipe.template = 1.11
plone.recipe.command = 1.1
plone.recipe.command = 1.1
slapos.recipe.build = 0.13
slapos.recipe.build = 0.13
slapos.recipe.template = 2.
5
slapos.recipe.template = 2.
6
# Replicate slapos stack, but without shacache to not have to compile the entire world for a simple test.
# Replicate slapos stack, but without shacache to not have to compile the entire world for a simple test.
[buildout]
[buildout]
...
...
stack/cloudooo.cfg
View file @
190b2e94
...
@@ -81,7 +81,7 @@ WSGIUtils = 0.7
...
@@ -81,7 +81,7 @@ WSGIUtils = 0.7
plone.recipe.command = 1.1
plone.recipe.command = 1.1
python-magic = 0.4.6
python-magic = 0.4.6
rdiff-backup = 1.0.5
rdiff-backup = 1.0.5
slapos.recipe.template = 2.
5
slapos.recipe.template = 2.
6
# Required by:
# Required by:
# PasteScript==1.7.5
# PasteScript==1.7.5
...
...
stack/monitor/buildout.cfg
View file @
190b2e94
...
@@ -48,7 +48,7 @@ mode = 0644
...
@@ -48,7 +48,7 @@ mode = 0644
recipe = hexagonit.recipe.download
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
url = ${:_profile_base_location_}/${:filename}
download-only = true
download-only = true
md5sum =
cb2f15850d3dc82459a0044adb4416cf
md5sum =
5b12e864f1762d7984f7d4863d0b795d
destination = ${buildout:parts-directory}/monitor-template-monitor-bin
destination = ${buildout:parts-directory}/monitor-template-monitor-bin
filename = monitor.py.in
filename = monitor.py.in
mode = 0644
mode = 0644
...
...
stack/monitor/monitor.py.in
View file @
190b2e94
#!{{ python_executable }}
#!{{ python_executable }}
import datetime
import json
import json
import os
import os
import subprocess
import subprocess
...
@@ -36,30 +35,32 @@ option_list = [
...
@@ -36,30 +35,32 @@ option_list = [
]
]
class Popen(subprocess.Popen):
class Popen(subprocess.Popen):
__timeout = None
def timeout(self, delay, delay_before_kill=5):
if self.__timeout is not None: self.__timeout.cancel()
self.__timeout = threading.Timer(delay, self.stop, [delay_before_kill])
self.__timeout.start()
def waiter():
self.wait()
self.__timeout.cancel()
threading.Thread(target=waiter).start()
def stop(self, delay_before_kill=5):
if self.__timeout is not None: self.__timeout.cancel()
self.terminate()
t = threading.Timer(delay_before_kill, self.kill)
t.start()
r = self.wait()
t.cancel()
return r
def init_db():
def set_timeout(self, timeout):
db = sqlite3.connect(db_path)
self.set_timeout = None # assert we're not called twice
c = db.cursor()
event = threading.Event()
c.executescript("""
event.__killed = False # we just need a mutable
def t():
# do not call wait() or poll() because they're not thread-safe
if not event.wait(timeout) and self.returncode is None:
# race condition if waitpid completes just before the signal sent ?
self.terminate()
event.__killed = True
if event.wait(5):
return
if self.returncode is None:
self.kill() # same race as for terminate ?
t = threading.Thread(target=t)
t.daemon = True
t.start()
def killed():
event.set()
t.join()
return event.__killed
return killed
def init_db(db):
db.executescript("""
CREATE TABLE IF NOT EXISTS status (
CREATE TABLE IF NOT EXISTS status (
timestamp INTEGER UNIQUE,
timestamp INTEGER UNIQUE,
status VARCHAR(255));
status VARCHAR(255));
...
@@ -69,8 +70,6 @@ CREATE TABLE IF NOT EXISTS individual_status (
...
@@ -69,8 +70,6 @@ CREATE TABLE IF NOT EXISTS individual_status (
element VARCHAR(255),
element VARCHAR(255),
output TEXT);
output TEXT);
""")
""")
db.commit()
db.close()
def getListOfScripts(directory):
def getListOfScripts(directory):
"""
"""
...
@@ -109,59 +108,43 @@ def runServices(directory):
...
@@ -109,59 +108,43 @@ def runServices(directory):
def runScripts(directory):
def runScripts(directory):
scripts = getListOfScripts(directory)
# XXX script_timeout could be passed as parameters
# XXX script_timeout could be passed as parameters
script_timeout = 60 # in seconds
script_timeout = 60 # in seconds
result = {}
result = {}
for script in scripts:
with open(os.devnull, 'r+') as f:
command = [os.path.join(promise_dir, script)]
for script in getListOfScripts(directory):
script = os.path.basename(command[0])
command = os.path.join(promise_dir, script),
result[script] = ''
script = os.path.basename(script)
result[script] = ''
process_handler = Popen(command,
cwd=instance_path,
p = Popen(command, cwd=instance_path,
env=None if sys.platform == 'cygwin' else {},
env=None if sys.platform == 'cygwin' else {},
stdout=subprocess.PIPE,
stdin=f, stdout=f, stderr=subprocess.PIPE)
stderr=subprocess.PIPE,
killed = p.set_timeout(script_timeout)
stdin=subprocess.PIPE)
stderr = p.communicate()[1]
process_handler.stdin.flush()
if killed():
process_handler.stdin.close()
result[script] = "Time Out"
process_handler.stdin = None
elif p.returncode:
process_handler.timeout(script_timeout)
process_handler.wait()
if process_handler.poll() is None:
process_handler.terminate()
result[script] = "Time Out"
elif process_handler.poll() != 0:
stderr = process_handler.communicate()[1]
if stderr is not None:
result[script] = stderr.strip()
result[script] = stderr.strip()
return result
return result
def writeFiles(monitors):
def writeFiles(monitors):
timestamp = int(time.time())
timestamp = int(time.time())
date = datetime.datetime.now().ctime()
init_db()
db = sqlite3.connect(db_path)
db = sqlite3.connect(db_path)
fail = False
init_db(db)
status = SUCCESS
for key, value in monitors.iteritems():
for key, value in monitors.iteritems():
element_status = SUCCESS
if value:
if value != "" :
element_status = status = FAILURE
fail = True
else:
element_status =
FAILURE
element_status =
SUCCESS
db.execute("insert into individual_status(timestamp, element, output, status) values (?, ?, ?, ?)", (timestamp, key, value, element_status))
db.execute("insert into individual_status(timestamp, element, output, status) values (?, ?, ?, ?)", (timestamp, key, value, element_status))
db.commit()
status = SUCCESS
if fail:
status = FAILURE
db.execute("insert into status(timestamp, status) values (?, ?)", (timestamp, status))
db.execute("insert into status(timestamp, status) values (?, ?)", (timestamp, status))
db.commit()
db.commit()
db.close()
db.close()
monitors['datetime'] =
date
monitors['datetime'] =
time.ctime(timestamp)
open(monitoring_file_json, "w+").write(json.dumps(monitors
))
json.dump(monitors, open(monitoring_file_json, "w+"
))
def main():
def main():
parser = OptionParser(option_list=option_list)
parser = OptionParser(option_list=option_list)
...
@@ -183,10 +166,6 @@ def main():
...
@@ -183,10 +166,6 @@ def main():
print json.dumps(monitors)
print json.dumps(monitors)
else:
else:
writeFiles(monitors)
writeFiles(monitors)
if len(monitors) == 0:
exit(0)
else:
exit(1)
if __name__ == "__main__":
if __name__ == "__main__":
...
...
stack/slapos.cfg
View file @
190b2e94
...
@@ -100,7 +100,7 @@ eggs =
...
@@ -100,7 +100,7 @@ eggs =
[versions]
[versions]
# Use SlapOS patched zc.buildout
# Use SlapOS patched zc.buildout
zc.buildout = 1.7.1-dev-SlapOS-00
3
zc.buildout = 1.7.1-dev-SlapOS-00
4
# Use SlapOS patched zc.recipe.egg (zc.recipe.egg 2.x is for Buildout 2)
# Use SlapOS patched zc.recipe.egg (zc.recipe.egg 2.x is for Buildout 2)
zc.recipe.egg = 1.3.2nxd001
zc.recipe.egg = 1.3.2nxd001
# Use own version of h.r.download to be able to open xz-like archives
# Use own version of h.r.download to be able to open xz-like archives
...
@@ -111,7 +111,7 @@ MarkupSafe = 0.23
...
@@ -111,7 +111,7 @@ MarkupSafe = 0.23
Werkzeug = 0.9.6
Werkzeug = 0.9.6
buildout-versions = 1.7
buildout-versions = 1.7
cffi = 0.8.6
cffi = 0.8.6
cmd2 = 0.6.
7
cmd2 = 0.6.
8
cryptography = 0.6
cryptography = 0.6
itsdangerous = 0.24
itsdangerous = 0.24
lxml = 3.4.1
lxml = 3.4.1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment