Re: [vdsm] Helping ovirt-3.2 run on EL6

2013-01-14 Thread Juan Hernandez
On 01/13/2013 02:39 PM, Dan Kenigsberg wrote:
 On Sun, Jan 13, 2013 at 04:40:11PM +0400, Andrey Gordeev wrote:
 Hi Dan.


 On Fri, Jan 11, 2013 at 12:42 AM, Dan Kenigsberg dan...@redhat.com wrote:

 Hi Andrey,

 I just have seen your http://www.dreyou.org/ovirt/vdsm.patch for
 ovirt-3.2. I would like to thank you for your packaging and engineering
 work. I'd like to incorporate as much of it into vdsm's upstream so that
 it runs properly on any EL6 out-of-the-box.

 Could you help me understand some of your changes?


 Glad to help you.



 I've posted http://gerrit.ovirt.org/#/c/10893/ which is taken from a
 former patchset of yours - is it intentionally missing form the 3.2
 version of your patchset?

 From adf7dc96767783ab81993504267c3cfd65b4c1bb Mon Sep 17 00:00:00 2001
 From: Andrey Gordeev dre...@gmail.com
 Date: Fri, 7 Dec 2012 13:12:19 +0400
 Subject: [PATCH 1/2] CentOS 6.2 changes

 ---
  build-aux/pkg-version |6 +-
  vds_bootstrap/setup   |2 +-
  vdsm.spec.in  |   30 ++
  vdsm/configNetwork.py |5 +
  vdsm/storage/misc.py  |2 +-
  vdsm/vdsmd.init.in|3 ++-
  6 files changed, 40 insertions(+), 8 deletions(-)

 diff --git a/build-aux/pkg-version b/build-aux/pkg-version
 index 346ad23..9c410ff 100755
 --- a/build-aux/pkg-version
 +++ b/build-aux/pkg-version
 @@ -32,7 +32,11 @@ if test x$1 = x--full; then
  elif test x$1 = x--version; then
  echo $PKG_VERSION | awk $AWK_VERSION | tr -cd '[:alnum:].'
  elif test x$1 = x--release; then
 -echo $PKG_VERSION | awk $AWK_RELEASE | tr -cd '[:alnum:].'
 +if [ $LOCAL_BUILDID ]; then
 +   echo $PKG_VERSION | awk $AWK_RELEASE | sed
 s/git.*$/{$LOCAL_BUILDID}/ | tr -cd '[:alnum:].'
 +else
 +   echo $PKG_VERSION | awk $AWK_RELEASE | tr -cd '[:alnum:].'
 +fi
  else
  echo usage: $0 [--full|--version|--release]
  exit 1
 diff --git a/vds_bootstrap/setup b/vds_bootstrap/setup
 index 01306bd..177e089 100755
 --- a/vds_bootstrap/setup
 +++ b/vds_bootstrap/setup
 @@ -29,7 +29,7 @@ import re
  import tempfile
  from time import strftime

 -SUPPORTED_PLATFORMS = [ RedHatEnterpriseServer, Fedora ]
 +SUPPORTED_PLATFORMS = [ RedHatEnterpriseServer, Fedora, CentOS,
 Scientific, Oracle ]

 I see no reason not to take this upstream

  HYPERVISOR_PLATFORMS = [ RedHatEnterpriseVirtualizationHypervisor,
 RedHatEnterpriseHypervisor, oVirtNodeHypervisor ]
  HYPERVISOR_RELEASE_FILE = '/etc/rhev-hypervisor-release'
  REDHAT_RELEASE_FILE = '/etc/redhat-release'
 diff --git a/vdsm.spec.in b/vdsm.spec.in
 index 465d548..a9de23d 100644
 --- a/vdsm.spec.in
 +++ b/vdsm.spec.in
 @@ -102,8 +102,10 @@ Requires: iscsi-initiator-utils = 6.2.0.872-15
  Requires: device-mapper-multipath = 0.4.9-52
  Requires: e2fsprogs = 1.41.12-11
  Requires: kernel = 2.6.32-279.9.1
 -Requires: sanlock = 2.3-4, sanlock-python
 -Requires: initscripts = 9.03.31-2.el6_3.1
 +#Requires: sanlock = 2.3-4, sanlock-python
 +#Requires: initscripts = 9.03.31-2.el6_3.1

 These requirements are for real bugs. Better include them into your EL6
 flavor
 or build yourself.


 Agreed with sanlock, I can build newest version from rhev rpms repo,
 but initscripts packages has the different names with the same version in
 different distributions i.e. 9.03.31-2.el6_3.1 - rhel
 , 9.03.31-2.el6.centos.1 - centos
 
 Too bad about the naming convention. However, it is important that
 initscripts bug https://bugzilla.redhat.com/854852 is solved in that
 release.
 



 +Requires: sanlock = 2.3-1, sanlock-python
 +Requires: initscripts = 9.03.31-2
  Requires: mom = 0.3.0
  Requires: selinux-policy-targeted = 3.7.19-80
  Requires: lvm2 = 2.02.95-10.el6_3.2
 @@ -431,6 +433,8 @@ install -Dm 0644 vdsm/limits.conf \
  # Install the SysV init scripts
  install -Dm 0755 vdsm/vdsmd.init %{buildroot}%{_initrddir}/vdsmd
  install -Dm 0755 vdsm_reg/vdsm-reg.init
 %{buildroot}%{_initrddir}/vdsm-reg
 +install -Dm 0644 vdsm/vdsm.conf.sample \
 + %{buildroot}%{_sysconfdir}/vdsm/vdsm.conf

 Federico, do you recall why don't we ship vdsm.conf on el?


  # This is not commonplace, but we want /var/log/core to be a
 world-writable
  # dropbox for core dumps
 @@ -475,6 +479,15 @@ export LC_ALL=C
  /usr/sbin/usermod -a -G %{qemu_group},%{vdsm_group} %{snlk_user}

  %post
 +if [ -f /etc/sysconfig/modules/softdog.modules ]
 +then
 +cp /etc/sysconfig/modules/softdog.modules
 /etc/vdsm/softdog.modules.prevdsm
 +fi
 +echo -e '#!/bin/sh\nmodprobe softdog\nexit 0' 
 /etc/sysconfig/modules/softdog.modules
 +chmod +x /etc/sysconfig/modules/softdog.modules
 +/sbin/chkconfig wdmd on
 +/sbin/chkconfig sanlock on
 +

 Andrey/Federico: why is this hack required?


 Really don't know, but in one of my installation on Intel Blade System, i
 got error:

 *VM testVm is down. Exit message: internal error Failed to open socket to
 sanlock daemon: No such file or directory.* 

 I.e. softdog module not loaded, then I add this hack.



  %{_bindir}/vdsm-tool 

Re: [vdsm] Helping ovirt-3.2 run on EL6

2013-01-13 Thread Andrey Gordeev
Hi Dan.


On Fri, Jan 11, 2013 at 12:42 AM, Dan Kenigsberg dan...@redhat.com wrote:

 Hi Andrey,

 I just have seen your http://www.dreyou.org/ovirt/vdsm.patch for
 ovirt-3.2. I would like to thank you for your packaging and engineering
 work. I'd like to incorporate as much of it into vdsm's upstream so that
 it runs properly on any EL6 out-of-the-box.

 Could you help me understand some of your changes?


Glad to help you.



 I've posted http://gerrit.ovirt.org/#/c/10893/ which is taken from a
 former patchset of yours - is it intentionally missing form the 3.2
 version of your patchset?

  From adf7dc96767783ab81993504267c3cfd65b4c1bb Mon Sep 17 00:00:00 2001
  From: Andrey Gordeev dre...@gmail.com
  Date: Fri, 7 Dec 2012 13:12:19 +0400
  Subject: [PATCH 1/2] CentOS 6.2 changes
 
  ---
   build-aux/pkg-version |6 +-
   vds_bootstrap/setup   |2 +-
   vdsm.spec.in  |   30 ++
   vdsm/configNetwork.py |5 +
   vdsm/storage/misc.py  |2 +-
   vdsm/vdsmd.init.in|3 ++-
   6 files changed, 40 insertions(+), 8 deletions(-)
 
  diff --git a/build-aux/pkg-version b/build-aux/pkg-version
  index 346ad23..9c410ff 100755
  --- a/build-aux/pkg-version
  +++ b/build-aux/pkg-version
  @@ -32,7 +32,11 @@ if test x$1 = x--full; then
   elif test x$1 = x--version; then
   echo $PKG_VERSION | awk $AWK_VERSION | tr -cd '[:alnum:].'
   elif test x$1 = x--release; then
  -echo $PKG_VERSION | awk $AWK_RELEASE | tr -cd '[:alnum:].'
  +if [ $LOCAL_BUILDID ]; then
  +   echo $PKG_VERSION | awk $AWK_RELEASE | sed
 s/git.*$/{$LOCAL_BUILDID}/ | tr -cd '[:alnum:].'
  +else
  +   echo $PKG_VERSION | awk $AWK_RELEASE | tr -cd '[:alnum:].'
  +fi
   else
   echo usage: $0 [--full|--version|--release]
   exit 1
  diff --git a/vds_bootstrap/setup b/vds_bootstrap/setup
  index 01306bd..177e089 100755
  --- a/vds_bootstrap/setup
  +++ b/vds_bootstrap/setup
  @@ -29,7 +29,7 @@ import re
   import tempfile
   from time import strftime
 
  -SUPPORTED_PLATFORMS = [ RedHatEnterpriseServer, Fedora ]
  +SUPPORTED_PLATFORMS = [ RedHatEnterpriseServer, Fedora, CentOS,
 Scientific, Oracle ]

 I see no reason not to take this upstream

   HYPERVISOR_PLATFORMS = [ RedHatEnterpriseVirtualizationHypervisor,
 RedHatEnterpriseHypervisor, oVirtNodeHypervisor ]
   HYPERVISOR_RELEASE_FILE = '/etc/rhev-hypervisor-release'
   REDHAT_RELEASE_FILE = '/etc/redhat-release'
  diff --git a/vdsm.spec.in b/vdsm.spec.in
  index 465d548..a9de23d 100644
  --- a/vdsm.spec.in
  +++ b/vdsm.spec.in
  @@ -102,8 +102,10 @@ Requires: iscsi-initiator-utils = 6.2.0.872-15
   Requires: device-mapper-multipath = 0.4.9-52
   Requires: e2fsprogs = 1.41.12-11
   Requires: kernel = 2.6.32-279.9.1
  -Requires: sanlock = 2.3-4, sanlock-python
  -Requires: initscripts = 9.03.31-2.el6_3.1
  +#Requires: sanlock = 2.3-4, sanlock-python
  +#Requires: initscripts = 9.03.31-2.el6_3.1

 These requirements are for real bugs. Better include them into your EL6
 flavor
 or build yourself.


Agreed with sanlock, I can build newest version from rhev rpms repo,
but initscripts packages has the different names with the same version in
different distributions i.e. 9.03.31-2.el6_3.1 - rhel
, 9.03.31-2.el6.centos.1 - centos



  +Requires: sanlock = 2.3-1, sanlock-python
  +Requires: initscripts = 9.03.31-2
   Requires: mom = 0.3.0
   Requires: selinux-policy-targeted = 3.7.19-80
   Requires: lvm2 = 2.02.95-10.el6_3.2
  @@ -431,6 +433,8 @@ install -Dm 0644 vdsm/limits.conf \
   # Install the SysV init scripts
   install -Dm 0755 vdsm/vdsmd.init %{buildroot}%{_initrddir}/vdsmd
   install -Dm 0755 vdsm_reg/vdsm-reg.init
 %{buildroot}%{_initrddir}/vdsm-reg
  +install -Dm 0644 vdsm/vdsm.conf.sample \
  + %{buildroot}%{_sysconfdir}/vdsm/vdsm.conf

 Federico, do you recall why don't we ship vdsm.conf on el?

 
   # This is not commonplace, but we want /var/log/core to be a
 world-writable
   # dropbox for core dumps
  @@ -475,6 +479,15 @@ export LC_ALL=C
   /usr/sbin/usermod -a -G %{qemu_group},%{vdsm_group} %{snlk_user}
 
   %post
  +if [ -f /etc/sysconfig/modules/softdog.modules ]
  +then
  +cp /etc/sysconfig/modules/softdog.modules
 /etc/vdsm/softdog.modules.prevdsm
  +fi
  +echo -e '#!/bin/sh\nmodprobe softdog\nexit 0' 
 /etc/sysconfig/modules/softdog.modules
  +chmod +x /etc/sysconfig/modules/softdog.modules
  +/sbin/chkconfig wdmd on
  +/sbin/chkconfig sanlock on
  +

 Andrey/Federico: why is this hack required?


Really don't know, but in one of my installation on Intel Blade System, i
got error:

*VM testVm is down. Exit message: internal error Failed to open socket to
sanlock daemon: No such file or directory.* 

I.e. softdog module not loaded, then I add this hack.



   %{_bindir}/vdsm-tool sebool-config
   # set the vdsm secret password for libvirt
   %{_bindir}/vdsm-tool set-saslpasswd
  @@ -538,6 +551,15 @@ exit 0
   %endif
 
   %postun
  +if [ -f 

Re: [vdsm] Helping ovirt-3.2 run on EL6

2013-01-13 Thread Ewoud Kohl van Wijngaarden
On Sun, Jan 13, 2013 at 03:39:57PM +0200, Dan Kenigsberg wrote:
 On Sun, Jan 13, 2013 at 04:40:11PM +0400, Andrey Gordeev wrote:
  On Fri, Jan 11, 2013 at 12:42 AM, Dan Kenigsberg dan...@redhat.com wrote:
   I've posted http://gerrit.ovirt.org/#/c/10893/ which is taken from a
   former patchset of yours - is it intentionally missing form the 3.2
   version of your patchset?
  
From adf7dc96767783ab81993504267c3cfd65b4c1bb Mon Sep 17 00:00:00 2001
From: Andrey Gordeev dre...@gmail.com
Date: Fri, 7 Dec 2012 13:12:19 +0400
Subject: [PATCH 1/2] CentOS 6.2 changes
   
---
 if mtu:
 mtu = int(mtu)
   
diff --git a/vdsm/storage/misc.py b/vdsm/storage/misc.py
index 17d38ee..ada3196 100644
--- a/vdsm/storage/misc.py
+++ b/vdsm/storage/misc.py
@@ -748,7 +748,7 @@ class RollbackContext(object):
   
 # re-raise the earliest exception
 if firstException is not None:
-raise firstException, None, traceback
+raise firstException(None, traceback)
  
   I do not believe that it is correct - is it only to satisfy old pep8
   tool not recognizing the peculiar raise syntax that is used here?
   Could you ship
   http://danken.fedorapeople.org/python-pep8-1.3.3-3.el6.noarch.rpm
   instead?
  
  
  Yes, I hope.

 Thanks. I still hope that someone rebases EPEL's pep8 to something more
 modern and without the raise bug. Maybe iweller could help!

So I'd take this patch upstream and not worry about the newer pep
version because the latter syntax is the better choice since the former
is no longer allowed in python 3. See
http://docs.pythonsprints.com/python3_porting/py-porting.html#exceptions
___
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel


Re: [vdsm] Helping ovirt-3.2 run on EL6

2013-01-13 Thread Antoni Segura Puimedon


- Original Message -
 From: Ewoud Kohl van Wijngaarden ew...@kohlvanwijngaarden.nl
 To: Dan Kenigsberg dan...@redhat.com
 Cc: vdsm-de...@fedorahosted.org, Ian Weller iwel...@redhat.com, Juan 
 Hernandez juan.hernan...@redhat.com
 Sent: Sunday, January 13, 2013 3:35:13 PM
 Subject: Re: [vdsm] Helping ovirt-3.2 run on EL6
 
 On Sun, Jan 13, 2013 at 03:39:57PM +0200, Dan Kenigsberg wrote:
  On Sun, Jan 13, 2013 at 04:40:11PM +0400, Andrey Gordeev wrote:
   On Fri, Jan 11, 2013 at 12:42 AM, Dan Kenigsberg
   dan...@redhat.com wrote:
I've posted http://gerrit.ovirt.org/#/c/10893/ which is taken
from a
former patchset of yours - is it intentionally missing form the
3.2
version of your patchset?
   
 From adf7dc96767783ab81993504267c3cfd65b4c1bb Mon Sep 17
 00:00:00 2001
 From: Andrey Gordeev dre...@gmail.com
 Date: Fri, 7 Dec 2012 13:12:19 +0400
 Subject: [PATCH 1/2] CentOS 6.2 changes

 ---
  if mtu:
  mtu = int(mtu)

 diff --git a/vdsm/storage/misc.py b/vdsm/storage/misc.py
 index 17d38ee..ada3196 100644
 --- a/vdsm/storage/misc.py
 +++ b/vdsm/storage/misc.py
 @@ -748,7 +748,7 @@ class RollbackContext(object):

  # re-raise the earliest exception
  if firstException is not None:
 -raise firstException, None, traceback
 +raise firstException(None, traceback)
   
I do not believe that it is correct - is it only to satisfy old
pep8
tool not recognizing the peculiar raise syntax that is used
here?
Could you ship
http://danken.fedorapeople.org/python-pep8-1.3.3-3.el6.noarch.rpm
instead?
   
   
   Yes, I hope.
 
  Thanks. I still hope that someone rebases EPEL's pep8 to something
  more
  modern and without the raise bug. Maybe iweller could help!
 
 So I'd take this patch upstream and not worry about the newer pep
 version because the latter syntax is the better choice since the
 former
 is no longer allowed in python 3. See
 http://docs.pythonsprints.com/python3_porting/py-porting.html#exceptions

I was thinking, just the other day, that we could systematically update the
except and raise clauses to be forwards compatible.

 ___
 vdsm-devel mailing list
 vdsm-devel@lists.fedorahosted.org
 https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel
 
___
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel


Re: [vdsm] Helping ovirt-3.2 run on EL6

2013-01-13 Thread Dan Kenigsberg
On Sun, Jan 13, 2013 at 03:35:13PM +0100, Ewoud Kohl van Wijngaarden wrote:
 On Sun, Jan 13, 2013 at 03:39:57PM +0200, Dan Kenigsberg wrote:
  On Sun, Jan 13, 2013 at 04:40:11PM +0400, Andrey Gordeev wrote:
   On Fri, Jan 11, 2013 at 12:42 AM, Dan Kenigsberg dan...@redhat.com 
   wrote:
I've posted http://gerrit.ovirt.org/#/c/10893/ which is taken from a
former patchset of yours - is it intentionally missing form the 3.2
version of your patchset?
   
 From adf7dc96767783ab81993504267c3cfd65b4c1bb Mon Sep 17 00:00:00 2001
 From: Andrey Gordeev dre...@gmail.com
 Date: Fri, 7 Dec 2012 13:12:19 +0400
 Subject: [PATCH 1/2] CentOS 6.2 changes

 ---
  if mtu:
  mtu = int(mtu)

 diff --git a/vdsm/storage/misc.py b/vdsm/storage/misc.py
 index 17d38ee..ada3196 100644
 --- a/vdsm/storage/misc.py
 +++ b/vdsm/storage/misc.py
 @@ -748,7 +748,7 @@ class RollbackContext(object):

  # re-raise the earliest exception
  if firstException is not None:
 -raise firstException, None, traceback
 +raise firstException(None, traceback)
   
I do not believe that it is correct - is it only to satisfy old pep8
tool not recognizing the peculiar raise syntax that is used here?
Could you ship
http://danken.fedorapeople.org/python-pep8-1.3.3-3.el6.noarch.rpm
instead?
   
   
   Yes, I hope.
 
  Thanks. I still hope that someone rebases EPEL's pep8 to something more
  modern and without the raise bug. Maybe iweller could help!
 
 So I'd take this patch upstream and not worry about the newer pep
 version because the latter syntax is the better choice since the former
 is no longer allowed in python 3. See
 http://docs.pythonsprints.com/python3_porting/py-porting.html#exceptions

No, this is impossible. Zhou Zheng Sheng code attempted to raise the
firstException with its original exception. In Python 3, the traceback
is part of the Excpetion object. Thus,

raise firstException

would be enough. However, afaik, Python 2 has no equivalent, and
requires us to use the extraordinary

raise firstException, None, traceback

construct. The suggested syntax is wrong, as it attempts ot call a
non-callable object.

Dan.
___
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel


Re: [vdsm] Helping ovirt-3.2 run on EL6

2013-01-13 Thread Dan Kenigsberg
On Sun, Jan 13, 2013 at 09:49:11AM -0500, Antoni Segura Puimedon wrote:
 
 
 - Original Message -
  From: Ewoud Kohl van Wijngaarden ew...@kohlvanwijngaarden.nl
  To: Dan Kenigsberg dan...@redhat.com
  Cc: vdsm-de...@fedorahosted.org, Ian Weller iwel...@redhat.com, Juan 
  Hernandez juan.hernan...@redhat.com
  Sent: Sunday, January 13, 2013 3:35:13 PM
  Subject: Re: [vdsm] Helping ovirt-3.2 run on EL6
  
  On Sun, Jan 13, 2013 at 03:39:57PM +0200, Dan Kenigsberg wrote:
   On Sun, Jan 13, 2013 at 04:40:11PM +0400, Andrey Gordeev wrote:
On Fri, Jan 11, 2013 at 12:42 AM, Dan Kenigsberg
dan...@redhat.com wrote:
 I've posted http://gerrit.ovirt.org/#/c/10893/ which is taken
 from a
 former patchset of yours - is it intentionally missing form the
 3.2
 version of your patchset?

  From adf7dc96767783ab81993504267c3cfd65b4c1bb Mon Sep 17
  00:00:00 2001
  From: Andrey Gordeev dre...@gmail.com
  Date: Fri, 7 Dec 2012 13:12:19 +0400
  Subject: [PATCH 1/2] CentOS 6.2 changes
 
  ---
   if mtu:
   mtu = int(mtu)
 
  diff --git a/vdsm/storage/misc.py b/vdsm/storage/misc.py
  index 17d38ee..ada3196 100644
  --- a/vdsm/storage/misc.py
  +++ b/vdsm/storage/misc.py
  @@ -748,7 +748,7 @@ class RollbackContext(object):
 
   # re-raise the earliest exception
   if firstException is not None:
  -raise firstException, None, traceback
  +raise firstException(None, traceback)

 I do not believe that it is correct - is it only to satisfy old
 pep8
 tool not recognizing the peculiar raise syntax that is used
 here?
 Could you ship
 http://danken.fedorapeople.org/python-pep8-1.3.3-3.el6.noarch.rpm
 instead?


Yes, I hope.
  
   Thanks. I still hope that someone rebases EPEL's pep8 to something
   more
   modern and without the raise bug. Maybe iweller could help!
  
  So I'd take this patch upstream and not worry about the newer pep
  version because the latter syntax is the better choice since the
  former
  is no longer allowed in python 3. See
  http://docs.pythonsprints.com/python3_porting/py-porting.html#exceptions
 
 I was thinking, just the other day, that we could systematically update the
 except and raise clauses to be forwards compatible.

+1 for moving everything to

except Exception as e:
___
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel


Re: [vdsm] Helping ovirt-3.2 run on EL6

2013-01-13 Thread Antoni Segura Puimedon


- Original Message -
 From: Dan Kenigsberg dan...@redhat.com
 To: Ewoud Kohl van Wijngaarden ew...@kohlvanwijngaarden.nl
 Cc: vdsm-de...@fedorahosted.org, Ian Weller iwel...@redhat.com, Juan 
 Hernandez juan.hernan...@redhat.com
 Sent: Sunday, January 13, 2013 4:31:44 PM
 Subject: Re: [vdsm] Helping ovirt-3.2 run on EL6
 
 On Sun, Jan 13, 2013 at 03:35:13PM +0100, Ewoud Kohl van Wijngaarden
 wrote:
  On Sun, Jan 13, 2013 at 03:39:57PM +0200, Dan Kenigsberg wrote:
   On Sun, Jan 13, 2013 at 04:40:11PM +0400, Andrey Gordeev wrote:
On Fri, Jan 11, 2013 at 12:42 AM, Dan Kenigsberg
dan...@redhat.com wrote:
 I've posted http://gerrit.ovirt.org/#/c/10893/ which is taken
 from a
 former patchset of yours - is it intentionally missing form
 the 3.2
 version of your patchset?

  From adf7dc96767783ab81993504267c3cfd65b4c1bb Mon Sep 17
  00:00:00 2001
  From: Andrey Gordeev dre...@gmail.com
  Date: Fri, 7 Dec 2012 13:12:19 +0400
  Subject: [PATCH 1/2] CentOS 6.2 changes
 
  ---
   if mtu:
   mtu = int(mtu)
 
  diff --git a/vdsm/storage/misc.py b/vdsm/storage/misc.py
  index 17d38ee..ada3196 100644
  --- a/vdsm/storage/misc.py
  +++ b/vdsm/storage/misc.py
  @@ -748,7 +748,7 @@ class RollbackContext(object):
 
   # re-raise the earliest exception
   if firstException is not None:
  -raise firstException, None, traceback
  +raise firstException(None, traceback)

 I do not believe that it is correct - is it only to satisfy
 old pep8
 tool not recognizing the peculiar raise syntax that is used
 here?
 Could you ship
 http://danken.fedorapeople.org/python-pep8-1.3.3-3.el6.noarch.rpm
 instead?


Yes, I hope.
  
   Thanks. I still hope that someone rebases EPEL's pep8 to
   something more
   modern and without the raise bug. Maybe iweller could help!
  
  So I'd take this patch upstream and not worry about the newer pep
  version because the latter syntax is the better choice since the
  former
  is no longer allowed in python 3. See
  http://docs.pythonsprints.com/python3_porting/py-porting.html#exceptions
 
 No, this is impossible. Zhou Zheng Sheng code attempted to raise the
 firstException with its original exception. In Python 3, the
 traceback
 is part of the Excpetion object. Thus,
 
 raise firstException
 
 would be enough. However, afaik, Python 2 has no equivalent, and
 requires us to use the extraordinary
 
 raise firstException, None, traceback

Yes, that is exactly the case. I studied alternatives that would be
forwards-compatible and pep8 compliant of raising the original exception
with the original traceback and I only found hacks like the one used by
the jinja debugger and the six compatibility module with its reraise.

I would say it is better to keep it like it is and if in the future we want
to support both python3 and 2 we will deal with it through six.
 
 construct. The suggested syntax is wrong, as it attempts ot call a
 non-callable object.
 
 Dan.
 ___
 vdsm-devel mailing list
 vdsm-devel@lists.fedorahosted.org
 https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel
 
___
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel