Skip to contentSkip to conversation

xend: Allow for non-existent xen-python-path binary.

Xen-staging Alex Williamson 3 participants 4 messages Nov 8, 2007 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 7 lines · Xen staging patchbot-unstable

# HG changeset patch
# User Keir Fraser <[email protected]>
# Date 1194535934 0
# Node ID 0ebac857649591de0e1b57605b054552afb03297 # Parent c0bdfda5183d5e9dca5c9bc7a68a6cf40e3f6c58
xend: Allow for non-existent xen-python-path binary. On Solaris, xen-python-path is unnecessary.

This completely breaks xend for me:

# xend start
Traceback (most recent call last):
  File "/usr/sbin/xend", line 36, in ?
    xpp = os.path.join(os.path.dirname(sys.argv[0], 'xen-python-path'))
TypeError: dirname() takes exactly 1 argument (2 given)

Alex

Quoted 34 lines
---
 tools/misc/xend |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff -r c0bdfda5183d -r 0ebac8576495 tools/misc/xend

tools/misc/xend +7 -6
@@ -33,13 +33,14 @@ import time
 import time
 import commands
 
-result = commands.getstatusoutput(os.path.join(os.path.dirname(sys.argv[0]),
-                                               'xen-python-path'))
-if result[0] != 0:
-    print >>sys.stderr, result[1]
-    sys.exit(1)
+xpp = os.path.join(os.path.dirname(sys.argv[0], 'xen-python-path'))
+if os.path.exists(xpp):
+    result = commands.getstatusoutput(xpp)
+    if result[0] != 0:
+        print >>sys.stderr, result[1]
+        sys.exit(1)
 
-sys.path.append(result[1])
+    sys.path.append(result[1])
 
 from xen.xend.server import SrvDaemon
 

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

Signature · 1 line
Alex Williamson                             HP Open Source & Linux Org.
#2 lore raw

Ah yes, I suppose the non-Solaris path isn't tested...

-- Keir

Quoted 54 lines · Alex Williamson
Quoted 7 lines · Xen staging patchbot-unstable

# HG changeset patch
# User Keir Fraser <[email protected]>
# Date 1194535934 0
# Node ID 0ebac857649591de0e1b57605b054552afb03297 # Parent c0bdfda5183d5e9dca5c9bc7a68a6cf40e3f6c58
xend: Allow for non-existent xen-python-path binary. On Solaris, xen-python-path is unnecessary.

This completely breaks xend for me:

# xend start
Traceback (most recent call last):
  File "/usr/sbin/xend", line 36, in ?
    xpp = os.path.join(os.path.dirname(sys.argv[0], 'xen-python-path'))
TypeError: dirname() takes exactly 1 argument (2 given)

Alex

Quoted 34 lines
---
 tools/misc/xend |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff -r c0bdfda5183d -r 0ebac8576495 tools/misc/xend

tools/misc/xend Thu Nov 08 15:32:14 2007 +0000 renamed from tools/misc/xend Thu Nov 08 14:50:01 2007 +0000 +7 -6
@@ -33,13 +33,14 @@ import time
 import time
 import commands
 
-result = commands.getstatusoutput(os.path.join(os.path.dirname(sys.argv[0]),
-                                               'xen-python-path'))
-if result[0] != 0:
-    print >>sys.stderr, result[1]
-    sys.exit(1)
+xpp = os.path.join(os.path.dirname(sys.argv[0], 'xen-python-path'))
+if os.path.exists(xpp):
+    result = commands.getstatusoutput(xpp)
+    if result[0] != 0:
+        print >>sys.stderr, result[1]
+        sys.exit(1)
 
-sys.path.append(result[1])
+    sys.path.append(result[1])
 
 from xen.xend.server import SrvDaemon
 

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

#3 lore raw
Quoted 1 line · Keir Fraser

Ah yes, I suppose the non-Solaris path isn't tested...

I'm sure you already figured it out, but here's the trivial patch.
Thanks,

Alex

--

tools/misc/xend +1 -1
diff -r 155a016b8064 tools/misc/xend
@@ -33,7 +33,7 @@ import time
 import time
 import commands
 
-xpp = os.path.join(os.path.dirname(sys.argv[0], 'xen-python-path'))
+xpp = os.path.join(os.path.dirname(sys.argv[0]), 'xen-python-path')
 if os.path.exists(xpp):
     result = commands.getstatusoutput(xpp)
     if result[0] != 0:
#4 lore raw
In reply to Keir Fraser
Quoted 1 line · Keir Fraser

Ah yes, I suppose the non-Solaris path isn't tested...

Yes, sorry. I do try to test the 'scarier' patches by at least building, I just missed this one.

regards
john