1,6 → 1,6 |
--- /root/xen_lock_patch/XendDomainInfo.py 2011-03-14 11:03:21.000000000 +0100 |
+++ /usr/lib/xen-4.1/lib/python/xen/xend/XendDomainInfo.py 2011-03-14 15:50:52.000000000 +0100 |
@@ -365,6 +365,8 @@ |
+++ /usr/lib/xen-4.0/lib/python/xen/xend/XendDomainInfo.py 2011-03-14 15:50:52.000000000 +0100 |
@@ -361,6 +361,8 @@ |
@type state_updated: threading.Condition |
@ivar refresh_shutdown_lock: lock for polling shutdown state |
@type refresh_shutdown_lock: threading.Condition |
9,7 → 9,7 |
@ivar _deviceControllers: device controller cache for this domain |
@type _deviceControllers: dict 'string' to DevControllers |
""" |
@@ -444,6 +446,8 @@ |
@@ -439,6 +441,8 @@ |
self.refresh_shutdown_lock = threading.Condition() |
self._stateSet(DOM_STATE_HALTED) |
|
18,7 → 18,7 |
self._deviceControllers = {} |
|
for state in DOM_STATES_OLD: |
@@ -470,6 +474,7 @@ |
@@ -465,6 +469,7 @@ |
|
if self._stateGet() in (XEN_API_VM_POWER_STATE_HALTED, XEN_API_VM_POWER_STATE_SUSPENDED, XEN_API_VM_POWER_STATE_CRASHED): |
try: |
26,7 → 26,7 |
XendTask.log_progress(0, 30, self._constructDomain) |
XendTask.log_progress(31, 60, self._initDomain) |
|
@@ -496,6 +501,7 @@ |
@@ -491,6 +496,7 @@ |
state = self._stateGet() |
if state in (DOM_STATE_SUSPENDED, DOM_STATE_HALTED): |
try: |
34,7 → 34,7 |
self._constructDomain() |
|
try: |
@@ -2950,6 +2956,11 @@ |
@@ -2932,6 +2938,11 @@ |
|
self._stateSet(DOM_STATE_HALTED) |
self.domid = None # Do not push into _stateSet()! |
46,7 → 46,7 |
finally: |
self.refresh_shutdown_lock.release() |
|
@@ -4438,6 +4449,32 @@ |
@@ -4413,6 +4424,32 @@ |
def has_device(self, dev_class, dev_uuid): |
return (dev_uuid in self.info['%s_refs' % dev_class.lower()]) |
|
80,8 → 80,8 |
return '<domain id=%s name=%s memory=%s state=%s>' % \ |
(str(self.domid), self.info['name_label'], |
--- /root/xen_lock_patch/XendDomain.py 2011-03-14 11:04:13.000000000 +0100 |
+++ /usr/lib/xen-4.1/lib/python/xen/xend/XendDomain.py 2011-03-14 11:26:44.000000000 +0100 |
@@ -1368,6 +1368,7 @@ |
+++ /usr/lib/xen-4.0/lib/python/xen/xend/XendDomain.py 2011-03-14 11:26:44.000000000 +0100 |
@@ -1349,6 +1349,7 @@ |
raise XendError("Domain is not a managed domain") |
|
""" The following call may raise a XendError exception """ |
90,8 → 90,8 |
|
if live: |
--- /root/xen_lock_patch/XendOptions.py 2011-03-14 11:02:52.000000000 +0100 |
+++ /usr/lib/xen-4.1/lib/python/xen/xend/XendOptions.py 2011-03-14 11:27:33.000000000 +0100 |
@@ -321,6 +321,11 @@ |
+++ /usr/lib/xen-4.0/lib/python/xen/xend/XendOptions.py 2011-03-14 11:27:33.000000000 +0100 |
@@ -318,6 +318,11 @@ |
""" |
return self.get_config_string("xend-domains-path", self.xend_domains_path_default) |
|
103,8 → 103,8 |
def get_xend_state_path(self): |
""" Get the path for persistent domain configuration storage |
""" |
--- /root/xen_lock_patch/file-lock.c 2011-03-14 15:48:03.000000000 +0100 |
+++ /etc/xen/scripts/file-lock.c 1970-01-01 01:00:00.000000000 +0100 |
--- /root/xen_lock_patch/file-lock.c 2011-03-14 15:48:03.000000000 +0100 |
+++ /etc/xen/scripts/file-lock.c 1970-01-01 01:00:00.000000000 +0100 |
@@ -0,0 +1,190 @@ |
+/* |
+ * file-lock.c |
206,7 → 206,7 |
+ char *prog, *p; |
+ char *name = NULL; |
+ char *uuid = NULL; |
+ char *path = "."; /* create lock file on current working |
+ char *path = "."; /* create lock file on current working |
+directory by default*/ |
+ int verbose = 0; /* turn off verbose output by default */ |
+ int status = 0; /* returned value */ |
296,8 → 296,8 |
+ return status; |
+} |
+ |
--- /root/xen_lock/xend-config.sxp 2011-03-14 15:28:51.000000000 +0100 |
+++ /etc/xen/xend-config.sxp 2011-03-14 15:51:54.000000000 +0100 |
--- /root/xen_lock/xend-config.sxp 2011-03-14 15:28:51.000000000 +0100 |
+++ /etc/xen/xend-config.sxp 2011-03-14 15:51:54.000000000 +0100 |
@@ -279,3 +279,9 @@ |
# we have to realize this may incur security issue and we can't make sure the |
# device assignment could really work properly even after we do this. |
308,4 → 308,3 |
+#(xend-domains-path /mnt/xenfs/vm-locks/) |
+#(xend-domains-lock-path /etc/xen/scripts/file-lock) |
+ |
|