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
* [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.