Change in vdsm[master]: threadpool: bootstrap the threadpool package
fromani at redhat.com
fromani at redhat.com
Wed Jun 25 11:04:55 UTC 2014
Francesco Romani has uploaded a new change for review.
Change subject: threadpool: bootstrap the threadpool package
......................................................................
threadpool: bootstrap the threadpool package
add a new VDSM subpackage, like zombiereaper,
to contain the new threadpool code.
This patch only address the packaging and the
the source layout, and does not adds nor changes
any python code.
Change-Id: I2bc89dabb3fdcd8069b3b5a1286c3a176168b14f
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M configure.ac
M debian/Makefile.am
M debian/control
A debian/vdsm-python-threadpool.docs
A debian/vdsm-python-threadpool.install
M lib/Makefile.am
A lib/threadpool/Makefile.am
A lib/threadpool/__init__.py
M vdsm.spec.in
9 files changed, 77 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/89/29189/1
diff --git a/configure.ac b/configure.ac
index 885572e..42e934f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -262,6 +262,7 @@
init/sysvinit/Makefile
init/upstart/Makefile
lib/Makefile
+ lib/threadpool/Makefile
lib/vdsm/Makefile
lib/vdsm/tool/Makefile
lib/yajsonrpc/Makefile
diff --git a/debian/Makefile.am b/debian/Makefile.am
index 00b0d33..316bc8a 100644
--- a/debian/Makefile.am
+++ b/debian/Makefile.am
@@ -94,6 +94,8 @@
vdsm.prerm \
vdsm-python.docs \
vdsm-python.install \
+ vdsm-python-threadpool.docs \
+ vdsm-python-threadpool.install \
vdsm-python-zombiereaper.docs \
vdsm-python-zombiereaper.install \
vdsm-tests.docs \
diff --git a/debian/control b/debian/control
index 3a1154a..ba0939a 100644
--- a/debian/control
+++ b/debian/control
@@ -45,6 +45,12 @@
Description: VDSM python libraries
Shared libraries between the various VDSM packages.
+Package: vdsm-python-threadpool
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python (>=2.7.3)
+Description: threadpool for Python
+ Implementation a thread pool which can handle risky or blocking operations.
+
Package: vdsm-python-zombiereaper
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python (>=2.7.3)
@@ -122,6 +128,7 @@
tree,
vdsm-python (= ${source:Version}),
xz-utils,
+ vdsm-python-threadpool (= ${source:Version}),
vdsm-python-zombiereaper (= ${source:Version}),
vdsm-yajsonrpc (= ${source:Version})
Conflicts: apparmor
diff --git a/debian/vdsm-python-threadpool.docs b/debian/vdsm-python-threadpool.docs
new file mode 100644
index 0000000..050f3ce
--- /dev/null
+++ b/debian/vdsm-python-threadpool.docs
@@ -0,0 +1,2 @@
+COPYING
+README.rst
diff --git a/debian/vdsm-python-threadpool.install b/debian/vdsm-python-threadpool.install
new file mode 100644
index 0000000..c1f625b
--- /dev/null
+++ b/debian/vdsm-python-threadpool.install
@@ -0,0 +1 @@
+./usr/lib/python2.7/dist-packages/threadpool/__init__.py
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 493edc8..1dba878 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -19,4 +19,4 @@
#
include $(top_srcdir)/build-aux/Makefile.subs
-SUBDIRS = vdsm yajsonrpc zombiereaper
+SUBDIRS = threadpool vdsm yajsonrpc zombiereaper
diff --git a/lib/threadpool/Makefile.am b/lib/threadpool/Makefile.am
new file mode 100644
index 0000000..3a71a5d
--- /dev/null
+++ b/lib/threadpool/Makefile.am
@@ -0,0 +1,25 @@
+#
+# Copyright 2014 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Refer to the README and COPYING files for full details of the license
+#
+
+threadpooldir = $(pythondir)/threadpool
+
+dist_threadpool_PYTHON = \
+ __init__.py \
+ $(NULL)
diff --git a/lib/threadpool/__init__.py b/lib/threadpool/__init__.py
new file mode 100644
index 0000000..8bd1e48
--- /dev/null
+++ b/lib/threadpool/__init__.py
@@ -0,0 +1,20 @@
+#
+# Copyright 2014 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Refer to the README and COPYING files for full details of the license
+#
+
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 7087b7e..f8fff91 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -115,6 +115,7 @@
Requires: python-cpopen >= 1.3
Requires: python-ioprocess >= 0.5-1
Requires: python-ethtool >= 0.6-3
+Requires: %{name}-python-threadpool = %{version}-%{release}
Requires: %{name}-python-zombiereaper = %{version}-%{release}
Requires: rpm-python
Requires: nfs-utils
@@ -301,6 +302,16 @@
%description python-zombiereaper
Collects zombie processes automatically so you don't have to
+%package python-threadpool
+Summary: Thread pool implementation
+BuildArch: noarch
+
+Requires: python >= 2.6
+
+%description python-threadpool
+Implementation a multithreaded scheduler and of thread pool
+which can handle risky or blocking operations.
+
%package bootstrap
Summary: VDSM bootstrapping package
BuildArch: noarch
@@ -323,6 +334,7 @@
%package python
Summary: VDSM python libraries
+Requires: %{name}-python-threadpool = %{version}-%{release}
Requires: %{name}-python-zombiereaper = %{version}-%{release}
Requires: python-cpopen >= 1.2.3-5
Requires: m2crypto
@@ -1415,6 +1427,12 @@
%files python-zombiereaper
%{python_sitelib}/zombiereaper/__init__.py*
+%files python-threadpool
+%{python_sitelib}/threadpool/__init__.py*
+%{python_sitelib}/threadpool/schedqueue.py*
+%{python_sitelib}/threadpool/threadpool.py*
+%{python_sitelib}/threadpool/watchedpool.py*
+
%files bootstrap
%defattr(-, root, root, -)
%doc COPYING
--
To view, visit http://gerrit.ovirt.org/29189
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2bc89dabb3fdcd8069b3b5a1286c3a176168b14f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
More information about the vdsm-patches
mailing list