Francesco Romani has uploaded a new change for review.
Change subject: daemon: tracemalloc: LD_PRELOAD support ......................................................................
daemon: tracemalloc: LD_PRELOAD support
In order to integrate tracemalloc, we may need a special-purpose libpython. This change makes it easy to use it into VDSM.
Change-Id: I3b26a4d156394631345b0a60f212effdaef48503 Signed-off-by: Francesco Romani fromani@redhat.com --- M .gitignore M debian/vdsm.install M init/Makefile.am M init/systemd/vdsmd.service.in A init/vdsmd.in M vdsm.spec.in 6 files changed, 18 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/23/47623/1
diff --git a/.gitignore b/.gitignore index 3c6c9e8..8c4afda 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ init/systemd/vdsm-network.service init/systemd/mom-vdsm.service init/vdsmd_init_common.sh +init/vdsmd lib/vdsm/config.py lib/vdsm/constants.py lib/vdsm/tool/validate_ovirt_certs.py diff --git a/debian/vdsm.install b/debian/vdsm.install index c9666f5..117b867 100644 --- a/debian/vdsm.install +++ b/debian/vdsm.install @@ -31,6 +31,7 @@ ./usr/libexec/vdsm/unpersist-vdsm-hook ./usr/libexec/vdsm/vdsm-gencerts.sh ./usr/libexec/vdsm/vdsmd_init_common.sh +./usr/bin/vdsmd ./usr/share/man/man8/vdsmd.8 ./usr/share/vdsm/API.py ./usr/share/vdsm/alignmentScan.py diff --git a/init/Makefile.am b/init/Makefile.am index 62a226b..69e2e2a 100644 --- a/init/Makefile.am +++ b/init/Makefile.am @@ -22,6 +22,10 @@
include $(top_srcdir)/build-aux/Makefile.subs
+bin_SCRIPTS = \ + vdsmd \ + $(NULL) + nodist_vdsmexec_SCRIPTS = \ vdsmd_init_common.sh \ $(NULL) @@ -36,6 +40,7 @@ $(NULL)
EXTRA_DIST = \ + vdsmd.in \ vdsmd_init_common.sh.in \ $(NULL)
diff --git a/init/systemd/vdsmd.service.in b/init/systemd/vdsmd.service.in index d7d025f..1627af6 100644 --- a/init/systemd/vdsmd.service.in +++ b/init/systemd/vdsmd.service.in @@ -13,7 +13,7 @@ LimitCORE=infinity EnvironmentFile=-/etc/sysconfig/vdsm ExecStartPre=@LIBEXECDIR@/vdsmd_init_common.sh --pre-start -ExecStart=@VDSMDIR@/daemonAdapter -0 /dev/null -1 /dev/null -2 /dev/null "@VDSMDIR@/vdsm" +ExecStart=@BINDIR@/vdsmd ExecStopPost=@LIBEXECDIR@/vdsmd_init_common.sh --post-stop Restart=always Nice=-20 diff --git a/init/vdsmd.in b/init/vdsmd.in new file mode 100644 index 0000000..075fb79 --- /dev/null +++ b/init/vdsmd.in @@ -0,0 +1,9 @@ +#!/bin/sh + +. /etc/sysconfig/vdsm + +if [ "$TRACEMALLOC" == "yes" ]; then + export LD_PRELOAD=@LIBDIR@/libpython2.7_tm.so +fi + +exec @VDSMDIR@/daemonAdapter -0 /dev/null -1 /dev/null -2 /dev/null "@VDSMDIR@/vdsm" diff --git a/vdsm.spec.in b/vdsm.spec.in index 32a1e38..d4b4d0f 100644 --- a/vdsm.spec.in +++ b/vdsm.spec.in @@ -862,6 +862,7 @@ %{_libexecdir}/%{vdsm_name}/ovirt_functions.sh %{_libexecdir}/%{vdsm_name}/vdsm-gencerts.sh %{_libexecdir}/%{vdsm_name}/vdsmd_init_common.sh +%{_bindir}/vdsmd %{_datadir}/%{vdsm_name}/network/__init__.py* %{_datadir}/%{vdsm_name}/network/api.py* %{_datadir}/%{vdsm_name}/network/configurators/__init__.py*
automation@ovirt.org has posted comments on this change.
Change subject: daemon: tracemalloc: LD_PRELOAD support ......................................................................
Patch Set 1:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: daemon: tracemalloc: LD_PRELOAD support ......................................................................
Patch Set 2:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: daemon: tracemalloc: LD_PRELOAD support ......................................................................
Patch Set 3:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: daemon: tracemalloc: LD_PRELOAD support ......................................................................
Patch Set 4:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
vdsm-patches@lists.fedorahosted.org