Change in vdsm[master]: Revert "hooking: move to lib"

2017-08-10 Thread Code Review
From Dan Kenigsberg :

Dan Kenigsberg has posted comments on this change.

Change subject: Revert "hooking: move to lib"
..


Patch Set 3: Code-Review+2

disappointing, but we cannot keep master broken.

-- 
To view, visit https://gerrit.ovirt.org/80444
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I383f3c747a45194949a8dca073c93afddda61674
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Irit Goihman 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: Revert "hooking: move to lib"

2017-08-10 Thread Code Review
From Dan Kenigsberg :

Dan Kenigsberg has submitted this change and it was merged. ( 
https://gerrit.ovirt.org/80444 )

Change subject: Revert "hooking: move to lib"
..


Revert "hooking: move to lib"

This reverts commit 6687ba74e74fcd18d20fcce00349aca5adf38a30.

Verified that without those changes the hooks are being read properly.
This folder move should be re-defined and fixed properly later.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1478054
Change-Id: I383f3c747a45194949a8dca073c93afddda61674
Signed-off-by: Yaniv Bronhaim 
---
M Makefile.am
M configure.ac
M lib/vdsm/Makefile.am
D lib/vdsm/hook/Makefile.am
D lib/vdsm/hook/__init__.py
M lib/vdsm/hooks.py
M vdsm.spec.in
M vdsm/Makefile.am
R vdsm/hooking.py
9 files changed, 7 insertions(+), 33 deletions(-)

Approvals:
  Nir Soffer: Looks good to me, but someone else must approve
  Yaniv Bronhaim: Verified
  Jenkins CI: Passed CI tests
  Dan Kenigsberg: Looks good to me, approved
  Francesco Romani: Looks good to me, but someone else must approve



-- 
To view, visit https://gerrit.ovirt.org/80444
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I383f3c747a45194949a8dca073c93afddda61674
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Irit Goihman 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: Revert "hooking: move to lib"

2017-08-09 Thread Code Review
From Dan Kenigsberg :

Dan Kenigsberg has posted comments on this change.

Change subject: Revert "hooking: move to lib"
..


Patch Set 3:

(though I would surely prefer a proper fix)

-- 
To view, visit https://gerrit.ovirt.org/80444
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I383f3c747a45194949a8dca073c93afddda61674
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Irit Goihman 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: Revert "hooking: move to lib"

2017-08-09 Thread Code Review
From Dan Kenigsberg :

Dan Kenigsberg has posted comments on this change.

Change subject: Revert "hooking: move to lib"
..


Patch Set 3: Code-Review+1

-- 
To view, visit https://gerrit.ovirt.org/80444
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I383f3c747a45194949a8dca073c93afddda61674
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Irit Goihman 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: Revert "hooking: move to lib"

2017-08-09 Thread Code Review
From Yaniv Bronhaim :

Yaniv Bronhaim has posted comments on this change.

Change subject: Revert "hooking: move to lib"
..


Patch Set 2:

I don't know the reason. only the bug-url for the regression

-- 
To view, visit https://gerrit.ovirt.org/80444
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I383f3c747a45194949a8dca073c93afddda61674
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim 
Gerrit-Reviewer: Irit Goihman 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: Revert "hooking: move to lib"

2017-08-09 Thread Code Review
From Yaniv Bronhaim :

Yaniv Bronhaim has posted comments on this change.

Change subject: Revert "hooking: move to lib"
..


Patch Set 2: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/80444
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I383f3c747a45194949a8dca073c93afddda61674
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: Revert "hooking: move to lib"

2017-08-09 Thread Code Review
From Yaniv Bronhaim :

Yaniv Bronhaim has uploaded a new change for review.

Change subject: Revert "hooking: move to lib"
..

Revert "hooking: move to lib"

This reverts commit 6687ba74e74fcd18d20fcce00349aca5adf38a30.

Change-Id: I383f3c747a45194949a8dca073c93afddda61674
Signed-off-by: Yaniv Bronhaim 
---
M Makefile.am
M configure.ac
M lib/vdsm/Makefile.am
D lib/vdsm/hook/Makefile.am
D lib/vdsm/hook/__init__.py
M lib/vdsm/hooks.py
M vdsm.spec.in
M vdsm/Makefile.am
R vdsm/hooking.py
9 files changed, 7 insertions(+), 33 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/44/80444/1

diff --git a/Makefile.am b/Makefile.am
index fd126c0..6277042 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -89,6 +89,7 @@
 pylint: tox
tox -e pylint \
vdsm/sitecustomize.py \
+   vdsm/hooking.py \
lib/vdsm \
lib/vdsmclient \
lib/yajsonrpc \
diff --git a/configure.ac b/configure.ac
index ad108bb..0b9189e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -383,7 +383,6 @@
lib/vdsm/common/Makefile
lib/vdsm/common/network/Makefile
lib/vdsm/gluster/Makefile
-   lib/vdsm/hook/Makefile
lib/vdsm/host/Makefile
lib/vdsm/metrics/Makefile
lib/vdsm/network/Makefile
diff --git a/lib/vdsm/Makefile.am b/lib/vdsm/Makefile.am
index 99be41b..af42de6 100644
--- a/lib/vdsm/Makefile.am
+++ b/lib/vdsm/Makefile.am
@@ -19,7 +19,7 @@
 #
 include $(top_srcdir)/build-aux/Makefile.subs
 
-SUBDIRS=api common tool profiling rpc network virt storage hook host metrics \
+SUBDIRS=api common tool profiling rpc network virt storage host metrics \
 gluster supervdsm_api
 
 dist_vdsmpylib_PYTHON = \
diff --git a/lib/vdsm/hook/Makefile.am b/lib/vdsm/hook/Makefile.am
deleted file mode 100644
index dec5bbb..000
--- a/lib/vdsm/hook/Makefile.am
+++ /dev/null
@@ -1,6 +0,0 @@
-vdsmhookdir = $(vdsmpylibdir)/hook
-
-dist_vdsmhook_PYTHON = \
-   __init__.py \
-   hooking.py \
-   $(NULL)
diff --git a/lib/vdsm/hook/__init__.py b/lib/vdsm/hook/__init__.py
deleted file mode 100644
index a592b0e..000
--- a/lib/vdsm/hook/__init__.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright 2017 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
-#
-from __future__ import absolute_import
diff --git a/lib/vdsm/hooks.py b/lib/vdsm/hooks.py
index f7e9fdf..2baa2df 100644
--- a/lib/vdsm/hooks.py
+++ b/lib/vdsm/hooks.py
@@ -1,5 +1,5 @@
 #
-# Copyright 2010-2017 Red Hat, Inc.
+# Copyright 2010-2011 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
@@ -34,7 +34,7 @@
 
 from vdsm.common import exception
 from . import commands
-from .constants import P_VDSM_HOOKS, P_VDSM_RUN
+from .constants import P_VDSM_HOOKS, P_VDSM, P_VDSM_RUN
 
 _LAUNCH_FLAGS_FILE = 'launchflags'
 _LAUNCH_FLAGS_PATH = os.path.join(
@@ -95,8 +95,7 @@
 if vmconf.get('vmId'):
 scriptenv['vmId'] = vmconf.get('vmId')
 ppath = scriptenv.get('PYTHONPATH', '')
-hook = os.path.join(os.path.dirname(__file__), 'hook')
-scriptenv['PYTHONPATH'] = ':'.join(ppath.split(':') + [hook])
+scriptenv['PYTHONPATH'] = ':'.join(ppath.split(':') + [P_VDSM])
 if hookType == _DOMXML_HOOK:
 scriptenv['_hook_domxml'] = data_filename
 elif hookType == _JSON_HOOK:
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 58e7069..25af81f 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -877,6 +877,7 @@
 %dir %{_sysconfdir}/%{vdsm_name}/mom.d
 %dir %{_datadir}/%{vdsm_name}
 %{_datadir}/%{vdsm_name}/daemonAdapter
+%{_datadir}/%{vdsm_name}/hooking.py*
 %{_datadir}/%{vdsm_name}/sitecustomize.py*
 %{_datadir}/%{vdsm_name}/supervdsmd
 %{_datadir}/%{vdsm_name}/vdsmd
@@ -1050,7 +1051,6 @@
 %{python_sitelib}/%{vdsm_name}/cmdutils.py*
 %{python_sitelib}/%{vdsm_name}/commands.py*
 %{python_sitelib}/%{vdsm_name}/common/*.py*
-%{python_sitelib}/%{vdsm_name}/hook/*.py*
 %{python_sitelib}/%{vdsm_name}/host/*.py*
 %{python_sitelib}/%{vdsm_name}/common/network/*.py*