Bug 182328

Summary: "Error: [Errno 17] File exists" on xm create due to dangling /var/lib/xen/xenbl
Product: [Fedora] Fedora Reporter: Stephen Tweedie <sct>
Component: xenAssignee: Jeremy Katz <katzj>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: bstein, katzj
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-23 16:53:40 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 150222    
Description Flags
Always delete the /var/lib/xen/xenbl file on error. none

Description Stephen Tweedie 2006-02-21 16:08:26 EST
Description of problem:
/var/lib/xen/xenbl can be left behind, leading to spurious

[root@xentest1 ~]# xm create -c guest1
Using config file "/etc/xen/guest1".
Error: [Errno 17] File exists


Version-Release number of selected component (if applicable):

xen/tools/python/xen/xend/XenBootloader.py creates the xenbl FIFO to communicate
to a subprocess but does not delete it for all errors; nor does it handle
multiple instances running at the same time.
Comment 1 Stephen Tweedie 2006-02-21 16:13:00 EST
Created attachment 124983 [details]
Always delete the /var/lib/xen/xenbl file on error.

Simple XenBootloader.py patch to add a try...finally: construct to make sure we
delete /var/lib/xen/xenbl on error.

We still need to handle the case where it exists on entry, by forming a new
filename (based on pid?) to avoid collisions.
Comment 2 Jeremy Katz 2006-02-22 15:35:18 EST
I vaguely remember there being a reason why I was using a defined name instead
of actually doing a mktemp'd name.  Let me look further
Comment 3 Jeremy Katz 2006-02-23 16:53:40 EST
Can't tell what it was.  Committed a fix to CVS and sent upstream