Skip to contentSkip to conversation

Fix xm list <Domname> so that it triggers an internal state update in Xend

PATCH In review Anthony Liguori 2 participants 4 messages Aug 31, 2005 – Sep 1, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix xm list <Domname> so that it triggers an internal state update in Xend

Fix xm list <Domname> so that it triggers an internal state update in Xend.

Regards,

Anthony Liguori

# HG changeset patch
# User Anthony Liguori <[email protected]>
# Node ID eb6ce6e19ac4eb1bde83eaae8cea7a35ed6350e7
# Parent 8af8ddf9107832cfe509ffe8e9f7ee65856b2fa3
Fix xm list so that we trigger Xend to update its internal state even when info is requested for individual domains.

Signed-off-by Anthony Liguori
tools/python/xen/xm/main.py +9 -4
diff -r 8af8ddf91078 -r eb6ce6e19ac4 tools/python/xen/xm/main.py
@@ -222,11 +222,16 @@
 
     domsinfo = []
     from xen.xend.XendClient import server
-    if n == 0:
-        doms = server.xend_domains()
-        doms.sort()
-    else:
+
+    # FIXME
+    # a bit of a hack, we need to call xend_domains to refresh xend's internal
+    # domain state.
+    doms = server.xend_domains()
+    doms.sort()
+
+    if n != 0:
         doms = params
+
     for dom in doms:
         info = server.xend_domain(dom)
         domsinfo.append(parse_doms_info(info))

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

Hey Christian,

BTW, this bug is also present in 2.0 (there's a bug filed in bugzilla about it).

I'm going to close the bug report and defer to you guys to decide whether it's worth applying to 2.0 too.

Thanks,

Anthony Liguori

Quoted 51 lines · Anthony Liguori

Fix xm list <Domname> so that it triggers an internal state update in Xend.

Regards,

Anthony Liguori

------------------------------------------------------------------------

# HG changeset patch
# User Anthony Liguori <[email protected]>
# Node ID eb6ce6e19ac4eb1bde83eaae8cea7a35ed6350e7
# Parent 8af8ddf9107832cfe509ffe8e9f7ee65856b2fa3
Fix xm list so that we trigger Xend to update its internal state even when info is requested for individual domains.

Signed-off-by Anthony Liguori

diff -r 8af8ddf91078 -r eb6ce6e19ac4 tools/python/xen/xm/main.py

tools/python/xen/xm/main.py +9 -5
@@ -222,11 +222,16 @@
 
    domsinfo = []
    from xen.xend.XendClient import server
-    if n == 0:
-        doms = server.xend_domains()
-        doms.sort()
-    else:
+
+    # FIXME
+    # a bit of a hack, we need to call xend_domains to refresh xend's internal
+    # domain state.
+    doms = server.xend_domains()
+    doms.sort()
+
+    if n != 0:
        doms = params
+
    for dom in doms:
        info = server.xend_domain(dom)
        domsinfo.append(parse_doms_info(info))
 
 
------------------------------------------------------------------------

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw
In reply to Anthony Liguori
Quoted 1 line · Anthony Liguori

Fix xm list <Domname> so that it triggers an internal state update in Xend.

Thanks, but I think it's preferable to change the server side to always return updated information when information on a single domain is requested. I've checked in changes to that effect.

christian

#3 lore raw
Quoted 12 lines · Christian Limpach
Quoted 3 lines · Anthony Liguori

Fix xm list <Domname> so that it triggers an internal state update in Xend.

Thanks, but I think it's preferable to change the server side to always return updated information when information on a single domain is requested. I've checked in changes to that effect.

Cool, that was the right fix. I didn't realize it was so easy to fix it this way.

Thanks!

Regards,

Anthony Liguori

Quoted 4 lines

christian