WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 8/24] [xen-unstable.hg] rename xenstore stubdom as Xe

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 8/24] [xen-unstable.hg] rename xenstore stubdom as Xenstore
From: Alex Zeffertt <alex.zeffertt@xxxxxxxxxxxxx>
Date: Mon, 23 Mar 2009 15:20:54 +0000
Delivery-date: Mon, 23 Mar 2009 08:29:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.19 (X11/20090105)


Attempts to set the name of the xenstore domain. I'm not sure if this is the
best place to do so.

TODO: If this patch is kept, the patch xend_var_run_domid should put
read_domid in a more global location from the beginning, instead of
moving it here.

Signed-off-by: Diego Ongaro <diego.ongaro@xxxxxxxxxx>
Signed-off-by: Alex Zeffertt <alex.zeffertt@xxxxxxxxxxxxx>
---

diff -r b14e95d65bb6 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Wed Mar 18 10:59:59 2009 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Wed Mar 18 11:03:08 2009 +0000
@@ -261,6 +261,16 @@
     """
     from xen.xend import XendDomain
     return XendDomain.instance().domain_lookup_by_name_nr(name)
+
+def read_domid(service):
+    try:
+        f = open("/var/run/%s.did" % service)
+        try:
+            return int(f.read())
+        finally:
+            f.close()
+    except (IOError, ValueError):
+        return 0 # assume domain 0 is providing service
 
 
 def shutdown_reason(code):
@@ -433,6 +443,10 @@
         self._checkName(self.info['name_label'])
 
         self.metrics = XendVMMetrics(uuid.createString(), self)
+
+        if "name_label" in info and info["name_label"] == "Domain-Unnamed" and 
\
+           read_domid("xenstore") == self.domid:
+            info["name_label"] = "XenStore"
             
 
     #
@@ -2750,16 +2764,6 @@
     def _createChannels(self):
         """Create the channels to the domain.
         """
-        def read_domid(service):
-            try:
-                f = open("/var/run/%s.did" % service)
-                try:
-                    return int(f.read())
-                finally:
-                    f.close()
-            except (IOError, ValueError):
-                return 0 # assume domain 0 is providing service
-
         self.store_port = self._createChannel(read_domid("xenstore"))
         self.console_port = self._createChannel(read_domid("console"))
 


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH 8/24] [xen-unstable.hg] rename xenstore stubdom as Xenstore, Alex Zeffertt <=