All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix save.py bug
@ 2011-05-18  8:30 Liu, Jinsong
  2011-05-18 13:00 ` Shriram Rajagopalan
  0 siblings, 1 reply; 13+ messages in thread
From: Liu, Jinsong @ 2011-05-18  8:30 UTC (permalink / raw)
  To: Keir Fraser, xen-devel; +Cc: rshriram, Ian Campbell, Li, Xin

[-- Attachment #1: Type: text/plain, Size: 1460 bytes --]

Resend it, it has been acked by Ian and Shriram, but seems to be ignored and didn't in unstable tree :)

Thanks,
Jinsong

================
Fix save.py bug

Fix save.py bug, to avoid compiling error under python2.4

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com>
Acked-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>

diff -r f9bb0bbea7c2 tools/python/xen/remus/save.py
--- a/tools/python/xen/remus/save.py	Thu May 12 16:42:54 2011 +0100
+++ b/tools/python/xen/remus/save.py	Fri May 13 22:45:21 2011 +0800
@@ -161,11 +161,12 @@ class Saver(object):
 
         self.checkpointer = xen.lowlevel.checkpoint.checkpointer()
         try:
-            self.checkpointer.open(self.vm.domid)
-            self.checkpointer.start(self.fd, self.suspendcb, self.resumecb,
-                                    self.checkpointcb, self.interval)
-        except xen.lowlevel.checkpoint.error, e:
-            raise CheckpointError(e)
+            try:
+                self.checkpointer.open(self.vm.domid)
+                self.checkpointer.start(self.fd, self.suspendcb, self.resumecb,
+                                        self.checkpointcb, self.interval)
+            except xen.lowlevel.checkpoint.error, e:
+                raise CheckpointError(e)
         finally:
             try: #errors in checkpoint close are not critical atm.
                 self.checkpointer.close()

[-- Attachment #2: fix-save-py-new.patch --]
[-- Type: application/octet-stream, Size: 1237 bytes --]

Fix save.py bug

Fix save.py bug, to avoid compiling error under python2.4

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com>

diff -r f9bb0bbea7c2 tools/python/xen/remus/save.py
--- a/tools/python/xen/remus/save.py	Thu May 12 16:42:54 2011 +0100
+++ b/tools/python/xen/remus/save.py	Fri May 13 22:45:21 2011 +0800
@@ -161,11 +161,12 @@ class Saver(object):
 
         self.checkpointer = xen.lowlevel.checkpoint.checkpointer()
         try:
-            self.checkpointer.open(self.vm.domid)
-            self.checkpointer.start(self.fd, self.suspendcb, self.resumecb,
-                                    self.checkpointcb, self.interval)
-        except xen.lowlevel.checkpoint.error, e:
-            raise CheckpointError(e)
+            try:
+                self.checkpointer.open(self.vm.domid)
+                self.checkpointer.start(self.fd, self.suspendcb, self.resumecb,
+                                        self.checkpointcb, self.interval)
+            except xen.lowlevel.checkpoint.error, e:
+                raise CheckpointError(e)
         finally:
             try: #errors in checkpoint close are not critical atm.
                 self.checkpointer.close()

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] Fix save.py bug
  2011-05-18  8:30 [PATCH] Fix save.py bug Liu, Jinsong
@ 2011-05-18 13:00 ` Shriram Rajagopalan
  2011-05-19 12:05   ` Liu, Jinsong
  2011-05-20 16:54   ` Ian Jackson
  0 siblings, 2 replies; 13+ messages in thread
From: Shriram Rajagopalan @ 2011-05-18 13:00 UTC (permalink / raw)
  To: Liu, Jinsong; +Cc: Li, Xin, Keir Fraser, Ian Jackson, xen-devel, Ian Campbell


[-- Attachment #1.1: Type: text/plain, Size: 1749 bytes --]

On Wed, May 18, 2011 at 4:30 AM, Liu, Jinsong <jinsong.liu@intel.com> wrote:

> Resend it, it has been acked by Ian and Shriram, but seems to be ignored
> and didn't in unstable tree :)
>
> Thanks,
> Jinsong
>
> ================
> Fix save.py bug
>
> Fix save.py bug, to avoid compiling error under python2.4
>
> Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
> Acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com>
> Acked-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
>
> diff -r f9bb0bbea7c2 tools/python/xen/remus/save.py
> --- a/tools/python/xen/remus/save.py    Thu May 12 16:42:54 2011 +0100
> +++ b/tools/python/xen/remus/save.py    Fri May 13 22:45:21 2011 +0800
> @@ -161,11 +161,12 @@ class Saver(object):
>
>         self.checkpointer = xen.lowlevel.checkpoint.checkpointer()
>         try:
> -            self.checkpointer.open(self.vm.domid)
> -            self.checkpointer.start(self.fd, self.suspendcb,
> self.resumecb,
> -                                    self.checkpointcb, self.interval)
> -        except xen.lowlevel.checkpoint.error, e:
> -            raise CheckpointError(e)
> +            try:
> +                self.checkpointer.open(self.vm.domid)
> +                self.checkpointer.start(self.fd, self.suspendcb,
> self.resumecb,
> +                                        self.checkpointcb, self.interval)
> +            except xen.lowlevel.checkpoint.error, e:
> +                raise CheckpointError(e)
>         finally:
>             try: #errors in checkpoint close are not critical atm.
>                 self.checkpointer.close()

>From my experience it takes couple of days for the patches to appear in the
unstable tree,
after they have been sent to the mailing list.
No point resending it. :)
shriram

[-- Attachment #1.2: Type: text/html, Size: 2247 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [PATCH] Fix save.py bug
  2011-05-18 13:00 ` Shriram Rajagopalan
@ 2011-05-19 12:05   ` Liu, Jinsong
  2011-05-20 16:54   ` Ian Jackson
  1 sibling, 0 replies; 13+ messages in thread
From: Liu, Jinsong @ 2011-05-19 12:05 UTC (permalink / raw)
  To: rshriram; +Cc: Li, Xin, Keir Fraser, Ian Jackson, xen-devel, Ian Campbell


[-- Attachment #1.1: Type: text/plain, Size: 2147 bytes --]

Thanks for reminding :)

Jinsong

________________________________
From: Shriram Rajagopalan [mailto:rshriram@cs.ubc.ca]
Sent: Wednesday, May 18, 2011 9:00 PM
To: Liu, Jinsong
Cc: Keir Fraser; xen-devel@lists.xensource.com; Ian Campbell; Li, Xin; Ian Jackson
Subject: Re: [PATCH] Fix save.py bug

On Wed, May 18, 2011 at 4:30 AM, Liu, Jinsong <jinsong.liu@intel.com<mailto:jinsong.liu@intel.com>> wrote:
Resend it, it has been acked by Ian and Shriram, but seems to be ignored and didn't in unstable tree :)

Thanks,
Jinsong

================
Fix save.py bug

Fix save.py bug, to avoid compiling error under python2.4

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com<mailto:jinsong.liu@intel.com>>
Acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com<mailto:Ian.Campbell@eu.citrix.com>>
Acked-by: Shriram Rajagopalan <rshriram@cs.ubc.ca<mailto:rshriram@cs.ubc.ca>>

diff -r f9bb0bbea7c2 tools/python/xen/remus/save.py
--- a/tools/python/xen/remus/save.py    Thu May 12 16:42:54 2011 +0100
+++ b/tools/python/xen/remus/save.py    Fri May 13 22:45:21 2011 +0800
@@ -161,11 +161,12 @@ class Saver(object):

        self.checkpointer = xen.lowlevel.checkpoint.checkpointer()
        try:
-            self.checkpointer.open(self.vm.domid)
-            self.checkpointer.start(self.fd, self.suspendcb, self.resumecb,
-                                    self.checkpointcb, self.interval)
-        except xen.lowlevel.checkpoint.error, e:
-            raise CheckpointError(e)
+            try:
+                self.checkpointer.open(self.vm.domid)
+                self.checkpointer.start(self.fd, self.suspendcb, self.resumecb,
+                                        self.checkpointcb, self.interval)
+            except xen.lowlevel.checkpoint.error, e:
+                raise CheckpointError(e)
        finally:
            try: #errors in checkpoint close are not critical atm.
                self.checkpointer.close()
>From my experience it takes couple of days for the patches to appear in the unstable tree,
after they have been sent to the mailing list.
No point resending it. :)
shriram

[-- Attachment #1.2: Type: text/html, Size: 4037 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] Fix save.py bug
  2011-05-18 13:00 ` Shriram Rajagopalan
  2011-05-19 12:05   ` Liu, Jinsong
@ 2011-05-20 16:54   ` Ian Jackson
  2011-05-21  3:30     ` Liu, Jinsong
  2011-05-23  8:22     ` Liu, Jinsong
  1 sibling, 2 replies; 13+ messages in thread
From: Ian Jackson @ 2011-05-20 16:54 UTC (permalink / raw)
  To: rshriram; +Cc: Liu, Jinsong, Ian Campbell, Keir Fraser, xen-devel, Li, Xin

Shriram Rajagopalan writes ("Re: [PATCH] Fix save.py bug"):
> Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com<mailto:jinsong.liu@intel.com>>
> Acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com<mailto:Ian.Campbell@eu.citrix.com>>
> Acked-by: Shriram Rajagopalan <rshriram@cs.ubc.ca<mailto:rshriram@cs.ubc.ca>>

patching file tools/python/xen/remus/save.py
Hunk #1 FAILED at 161.
1 out of 1 hunk FAILED -- saving rejects to file tools/python/xen/remus/save.py.rej

Ian.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [PATCH] Fix save.py bug
  2011-05-20 16:54   ` Ian Jackson
@ 2011-05-21  3:30     ` Liu, Jinsong
  2011-05-21 11:29       ` Shriram Rajagopalan
  2011-05-23  8:22     ` Liu, Jinsong
  1 sibling, 1 reply; 13+ messages in thread
From: Liu, Jinsong @ 2011-05-21  3:30 UTC (permalink / raw)
  To: Ian Jackson, rshriram; +Cc: Ian Campbell, Keir Fraser, xen-devel, Li, Xin

Ian Jackson wrote:
> Shriram Rajagopalan writes ("Re: [PATCH] Fix save.py bug"):
>> Signed-off-by: Liu, Jinsong
>> <jinsong.liu@intel.com<mailto:jinsong.liu@intel.com>> Acked-by: Ian
>> Campbell
>> <Ian.Campbell@eu.citrix.com<mailto:Ian.Campbell@eu.citrix.com>>
>> Acked-by: Shriram Rajagopalan
>> <rshriram@cs.ubc.ca<mailto:rshriram@cs.ubc.ca>>   
> 
> patching file tools/python/xen/remus/save.py
> Hunk #1 FAILED at 161.
> 1 out of 1 hunk FAILED -- saving rejects to file
> tools/python/xen/remus/save.py.rej 
> 
> Ian.

?? some strange, I patched based on a recent tree :(

Shriram, is there big change recently for save.py?
Anyway, I will pull latest xen tree next Monday and resend a patch to avoid hunk.

Thanks,
Jinsong

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] Fix save.py bug
  2011-05-21  3:30     ` Liu, Jinsong
@ 2011-05-21 11:29       ` Shriram Rajagopalan
  0 siblings, 0 replies; 13+ messages in thread
From: Shriram Rajagopalan @ 2011-05-21 11:29 UTC (permalink / raw)
  To: Liu, Jinsong; +Cc: Ian Campbell, xen-devel, Ian Jackson, Li, Xin

On 2011-05-20, at 11:30 PM, "Liu, Jinsong" <jinsong.liu@intel.com> wrote:

> Ian Jackson wrote:
>> Shriram Rajagopalan writes ("Re: [PATCH] Fix save.py bug"):
>>> Signed-off-by: Liu, Jinsong
>>> <jinsong.liu@intel.com<mailto:jinsong.liu@intel.com>> Acked-by: Ian
>>> Campbell
>>> <Ian.Campbell@eu.citrix.com<mailto:Ian.Campbell@eu.citrix.com>>
>>> Acked-by: Shriram Rajagopalan
>>> <rshriram@cs.ubc.ca<mailto:rshriram@cs.ubc.ca>>   
>> 
>> patching file tools/python/xen/remus/save.py
>> Hunk #1 FAILED at 161.
>> 1 out of 1 hunk FAILED -- saving rejects to file
>> tools/python/xen/remus/save.py.rej 
>> 
>> Ian.
> 
> ?? some strange, I patched based on a recent tree :(
> 
> Shriram, is there big change recently for save.py?
None at all! 
> Anyway, I will pull latest xen tree next Monday and resend a patch to avoid hunk.
> 
> Thanks,
> Jinsong
Shriram

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [PATCH] Fix save.py bug
  2011-05-20 16:54   ` Ian Jackson
  2011-05-21  3:30     ` Liu, Jinsong
@ 2011-05-23  8:22     ` Liu, Jinsong
  2011-05-24 15:13       ` Ian Jackson
  1 sibling, 1 reply; 13+ messages in thread
From: Liu, Jinsong @ 2011-05-23  8:22 UTC (permalink / raw)
  To: Ian Jackson, rshriram; +Cc: Ian Campbell, Keir Fraser, xen-devel, Li, Xin

[-- Attachment #1: Type: text/plain, Size: 650 bytes --]

Ian Jackson wrote:
> Shriram Rajagopalan writes ("Re: [PATCH] Fix save.py bug"):
>> Signed-off-by: Liu, Jinsong
>> <jinsong.liu@intel.com<mailto:jinsong.liu@intel.com>> Acked-by: Ian
>> Campbell
>> <Ian.Campbell@eu.citrix.com<mailto:Ian.Campbell@eu.citrix.com>>
>> Acked-by: Shriram Rajagopalan
>> <rshriram@cs.ubc.ca<mailto:rshriram@cs.ubc.ca>>   
> 
> patching file tools/python/xen/remus/save.py
> Hunk #1 FAILED at 161.
> 1 out of 1 hunk FAILED -- saving rejects to file
> tools/python/xen/remus/save.py.rej 
> 
> Ian.

Ian,

I pull and try at latest xen (c/s 23368), no problem to patch it.
Some strange :(

Thanks,
Jinsong

[-- Attachment #2: fix-save-py-new.patch --]
[-- Type: application/octet-stream, Size: 1237 bytes --]

Fix save.py bug

Fix save.py bug, to avoid compiling error under python2.4

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com>

diff -r f9bb0bbea7c2 tools/python/xen/remus/save.py
--- a/tools/python/xen/remus/save.py	Thu May 12 16:42:54 2011 +0100
+++ b/tools/python/xen/remus/save.py	Fri May 13 22:45:21 2011 +0800
@@ -161,11 +161,12 @@ class Saver(object):
 
         self.checkpointer = xen.lowlevel.checkpoint.checkpointer()
         try:
-            self.checkpointer.open(self.vm.domid)
-            self.checkpointer.start(self.fd, self.suspendcb, self.resumecb,
-                                    self.checkpointcb, self.interval)
-        except xen.lowlevel.checkpoint.error, e:
-            raise CheckpointError(e)
+            try:
+                self.checkpointer.open(self.vm.domid)
+                self.checkpointer.start(self.fd, self.suspendcb, self.resumecb,
+                                        self.checkpointcb, self.interval)
+            except xen.lowlevel.checkpoint.error, e:
+                raise CheckpointError(e)
         finally:
             try: #errors in checkpoint close are not critical atm.
                 self.checkpointer.close()

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [PATCH] Fix save.py bug
  2011-05-23  8:22     ` Liu, Jinsong
@ 2011-05-24 15:13       ` Ian Jackson
  2011-05-25  2:32         ` Liu, Jinsong
  0 siblings, 1 reply; 13+ messages in thread
From: Ian Jackson @ 2011-05-24 15:13 UTC (permalink / raw)
  To: Liu, Jinsong; +Cc: rshriram, Ian Campbell, Keir Fraser, xen-devel, Li, Xin

Liu, Jinsong writes ("RE: [PATCH] Fix save.py bug"):
> I pull and try at latest xen (c/s 23368), no problem to patch it.
> Some strange :(

Thanks.  Your resend works for me.  I think it's possible that the
problem was caused by some difficulties we are having with the Citrix
email system.  In this case I used the copy that came via the
xen-devel list (which doesn't come through the Citrix email system
for me).

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

Ian.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [PATCH] Fix save.py bug
  2011-05-24 15:13       ` Ian Jackson
@ 2011-05-25  2:32         ` Liu, Jinsong
  0 siblings, 0 replies; 13+ messages in thread
From: Liu, Jinsong @ 2011-05-25  2:32 UTC (permalink / raw)
  To: Ian Jackson; +Cc: rshriram, Ian Campbell, Keir Fraser, xen-devel, Li, Xin

Ian Jackson wrote:
> Liu, Jinsong writes ("RE: [PATCH] Fix save.py bug"):
>> I pull and try at latest xen (c/s 23368), no problem to patch it.
>> Some strange :(
> 
> Thanks.  Your resend works for me.  I think it's possible that the
> problem was caused by some difficulties we are having with the Citrix
> email system.  In this case I used the copy that came via the
> xen-devel list (which doesn't come through the Citrix email system
> for me).
> 
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
> 
> Ian.

Good, thanks!

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] Fix save.py bug
  2011-05-13 17:33   ` Liu, Jinsong
@ 2011-05-17  1:58     ` Shriram Rajagopalan
  0 siblings, 0 replies; 13+ messages in thread
From: Shriram Rajagopalan @ 2011-05-17  1:58 UTC (permalink / raw)
  To: Liu, Jinsong; +Cc: xen-devel, Ian Jackson, Ian Campbell


[-- Attachment #1.1: Type: text/plain, Size: 1746 bytes --]

On Fri, May 13, 2011 at 1:33 PM, Liu, Jinsong <jinsong.liu@intel.com> wrote:

> Ian Campbell wrote:
> > Adding Remus maintainer. You can consult the MAINTAINERS file at the
> > top level to fix this.
> >
> > On Fri, 2011-05-13 at 15:26 +0100, Liu, Jinsong wrote:
> >> I don't know python well, but when I compile at my platform, compile
> >> error as:
> >>
> >>
> >> =======================
> >> ...
> >> Parsing libxl.idl
> >> cmp: _libxl_paths.h.tmp: No such file or directory
> >> cmp: _libxl_paths.h: No such file or directory
> >> cmp: xen/util/path.py: No such file or directory
> >> Parsing
> >>
> >>
> >> /otc/source/vtd/xen-unstable/tools/python/../../tools/libxl/libxl.idl
> >> File "/usr/lib64/python2.4/site-packages/xen/remus/save.py", line
> >> 169     finally: ^
> >> SyntaxError: invalid syntax
> >> ...
> >>
> >> ======================
> >>
> >>
> >> This kind of compile error introduced from c/s 23195.
> >> This patch revert it.
> >
> > That seems rather extreme in the first instance.
> >
> > From a quick google It seems that python 2.4 did not properly support
> > the "try: ... except: ... finally: ... " syntax. It appears that as a
> > workaround one can do
> >       try:
> >               try:
> >                       ...
> >               except:
> >                       ...
> >       finally:
> >               ...
> >
> > But I didn't try this myself.
> >
> > Ian.
>
> Shriram and Ian,
>
> I update the patch according to Ian's comments, as attached.
> Test result shows compiling OK now.
>
> Hi,
sorry for the delay but I was waiting for the xen side bug to get resolved
before testing your patch. It works properly in remus installation.

Acked-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>

Thanks,
> Jinsong

[-- Attachment #1.2: Type: text/html, Size: 2669 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [PATCH] Fix save.py bug
  2011-05-13 14:36 ` Ian Campbell
@ 2011-05-13 17:33   ` Liu, Jinsong
  2011-05-17  1:58     ` Shriram Rajagopalan
  0 siblings, 1 reply; 13+ messages in thread
From: Liu, Jinsong @ 2011-05-13 17:33 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Rajagopalan, xen-devel, Ian Jackson, Keir Fraser, Shriram

[-- Attachment #1: Type: text/plain, Size: 1357 bytes --]

Ian Campbell wrote:
> Adding Remus maintainer. You can consult the MAINTAINERS file at the
> top level to fix this.
> 
> On Fri, 2011-05-13 at 15:26 +0100, Liu, Jinsong wrote:
>> I don't know python well, but when I compile at my platform, compile
>> error as: 
>> 
>> 
>> =======================
>> ...
>> Parsing libxl.idl
>> cmp: _libxl_paths.h.tmp: No such file or directory
>> cmp: _libxl_paths.h: No such file or directory
>> cmp: xen/util/path.py: No such file or directory
>> Parsing
>>  
>>          
>> /otc/source/vtd/xen-unstable/tools/python/../../tools/libxl/libxl.idl
>> File "/usr/lib64/python2.4/site-packages/xen/remus/save.py", line
>> 169     finally: ^   
>> SyntaxError: invalid syntax
>> ...
>> 
>> ======================
>> 
>> 
>> This kind of compile error introduced from c/s 23195.
>> This patch revert it.
> 
> That seems rather extreme in the first instance.
> 
> From a quick google It seems that python 2.4 did not properly support
> the "try: ... except: ... finally: ... " syntax. It appears that as a
> workaround one can do
> 	try:
> 		try:
> 			...
> 		except:
> 			...
> 	finally:
> 		...
> 
> But I didn't try this myself.
> 
> Ian.

Shriram and Ian,

I update the patch according to Ian's comments, as attached.
Test result shows compiling OK now.

Thanks,
Jinsong

[-- Attachment #2: fix-save-py-new.patch --]
[-- Type: application/octet-stream, Size: 1237 bytes --]

Fix save.py bug

Fix save.py bug, to avoid compiling error under python2.4

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com>

diff -r f9bb0bbea7c2 tools/python/xen/remus/save.py
--- a/tools/python/xen/remus/save.py	Thu May 12 16:42:54 2011 +0100
+++ b/tools/python/xen/remus/save.py	Fri May 13 22:45:21 2011 +0800
@@ -161,11 +161,12 @@ class Saver(object):
 
         self.checkpointer = xen.lowlevel.checkpoint.checkpointer()
         try:
-            self.checkpointer.open(self.vm.domid)
-            self.checkpointer.start(self.fd, self.suspendcb, self.resumecb,
-                                    self.checkpointcb, self.interval)
-        except xen.lowlevel.checkpoint.error, e:
-            raise CheckpointError(e)
+            try:
+                self.checkpointer.open(self.vm.domid)
+                self.checkpointer.start(self.fd, self.suspendcb, self.resumecb,
+                                        self.checkpointcb, self.interval)
+            except xen.lowlevel.checkpoint.error, e:
+                raise CheckpointError(e)
         finally:
             try: #errors in checkpoint close are not critical atm.
                 self.checkpointer.close()

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] Fix save.py bug
  2011-05-13 14:26 Liu, Jinsong
@ 2011-05-13 14:36 ` Ian Campbell
  2011-05-13 17:33   ` Liu, Jinsong
  0 siblings, 1 reply; 13+ messages in thread
From: Ian Campbell @ 2011-05-13 14:36 UTC (permalink / raw)
  To: Liu, Jinsong; +Cc: Rajagopalan, xen-devel, Ian Jackson, Keir Fraser, Shriram

Adding Remus maintainer. You can consult the MAINTAINERS file at the top
level to fix this.

On Fri, 2011-05-13 at 15:26 +0100, Liu, Jinsong wrote:
> I don't know python well, but when I compile at my platform, compile error as:
> 
> 
> =======================
> ...
> Parsing libxl.idl
> cmp: _libxl_paths.h.tmp: No such file or directory
> cmp: _libxl_paths.h: No such file or directory
> cmp: xen/util/path.py: No such file or directory
> Parsing /otc/source/vtd/xen-unstable/tools/python/../../tools/libxl/libxl.idl
>   File "/usr/lib64/python2.4/site-packages/xen/remus/save.py", line 169
>     finally:
>           ^
> SyntaxError: invalid syntax
> ...
> 
> ======================
> 
> 
> This kind of compile error introduced from c/s 23195. 
> This patch revert it.

That seems rather extreme in the first instance.

>From a quick google It seems that python 2.4 did not properly support
the "try: ... except: ... finally: ... " syntax. It appears that as a
workaround one can do
	try:
		try:
			...
		except:
			...
	finally:
		...

But I didn't try this myself.

Ian.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH] Fix save.py bug
@ 2011-05-13 14:26 Liu, Jinsong
  2011-05-13 14:36 ` Ian Campbell
  0 siblings, 1 reply; 13+ messages in thread
From: Liu, Jinsong @ 2011-05-13 14:26 UTC (permalink / raw)
  To: Ian Jackson, xen-devel; +Cc: Keir Fraser

[-- Attachment #1: Type: text/plain, Size: 623 bytes --]

I don't know python well, but when I compile at my platform, compile error as:


=======================
...
Parsing libxl.idl
cmp: _libxl_paths.h.tmp: No such file or directory
cmp: _libxl_paths.h: No such file or directory
cmp: xen/util/path.py: No such file or directory
Parsing /otc/source/vtd/xen-unstable/tools/python/../../tools/libxl/libxl.idl
  File "/usr/lib64/python2.4/site-packages/xen/remus/save.py", line 169
    finally:
          ^
SyntaxError: invalid syntax
...

======================


This kind of compile error introduced from c/s 23195. 
This patch revert it.

Thanks,
Jinsong

[-- Attachment #2: fix-save-py.patch --]
[-- Type: application/octet-stream, Size: 1395 bytes --]

Fix save.py bug

When compiling at my platform, compile error as:
...
Parsing libxl.idl
cmp: _libxl_paths.h.tmp: No such file or directory
cmp: _libxl_paths.h: No such file or directory
cmp: xen/util/path.py: No such file or directory
Parsing /otc/source/vtd/xen-unstable/tools/python/../../tools/libxl/libxl.idl
  File "/usr/lib64/python2.4/site-packages/xen/remus/save.py", line 169
    finally:
          ^
SyntaxError: invalid syntax
...

This kind of compile error introduced from c/s 23195. 
This patch revert it.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>

diff -r f9bb0bbea7c2 tools/python/xen/remus/save.py
--- a/tools/python/xen/remus/save.py	Thu May 12 16:42:54 2011 +0100
+++ b/tools/python/xen/remus/save.py	Fri May 13 21:06:20 2011 +0800
@@ -164,13 +164,9 @@ class Saver(object):
             self.checkpointer.open(self.vm.domid)
             self.checkpointer.start(self.fd, self.suspendcb, self.resumecb,
                                     self.checkpointcb, self.interval)
+            self.checkpointer.close()
         except xen.lowlevel.checkpoint.error, e:
             raise CheckpointError(e)
-        finally:
-            try: #errors in checkpoint close are not critical atm.
-                self.checkpointer.close()
-            except:
-                pass
 
     def _resume(self):
         """low-overhead version of XendDomainInfo.resumeDomain"""

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-05-25  2:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-18  8:30 [PATCH] Fix save.py bug Liu, Jinsong
2011-05-18 13:00 ` Shriram Rajagopalan
2011-05-19 12:05   ` Liu, Jinsong
2011-05-20 16:54   ` Ian Jackson
2011-05-21  3:30     ` Liu, Jinsong
2011-05-21 11:29       ` Shriram Rajagopalan
2011-05-23  8:22     ` Liu, Jinsong
2011-05-24 15:13       ` Ian Jackson
2011-05-25  2:32         ` Liu, Jinsong
  -- strict thread matches above, loose matches on Subject: below --
2011-05-13 14:26 Liu, Jinsong
2011-05-13 14:36 ` Ian Campbell
2011-05-13 17:33   ` Liu, Jinsong
2011-05-17  1:58     ` Shriram Rajagopalan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.