Quoting zoolook (nbensa+lxcus...@gmail.com):
> Hello Serge,
> 
> On Tue, Jun 4, 2013 at 1:08 PM, Serge Hallyn <serge.hal...@ubuntu.com> wrote:
> > Quoting zoolook (nbensa+lxcus...@gmail.com):
> >> sysadmin@lxc0:~$ sudo lxc-create -n test1 -P /srv/lxc -B lvm --vgname
> >> vg_vmstorage --lvname lxc-test1-root --fssize 2G -t ubuntu -- -r
> >> precise
> >> [sudo] password for sysadmin:
> >> lxc-create: Bad file descriptor - Error locking partial file
> >> /srv/lxc/test1/partial
> >> lxc-create: _recursive_rmdir_onedev: failed to delete /srv/lxc/test1
> >> lxc-create: Error creating container test1
> >
> > grrr.  flock doesn't work on nfs?
> 
> O_EXCL? AFAIK, nope.
> 
> 
> > as a workaround in the meantime, I'd suggest
> >
> >         sudo mkdir -p /srv/lxc/locks
> >         sudo mount -t tmpfs tmpfs /srv/lxc/locks
> >
> > so the lockfiles aren't on nfs :)
> 
> 
> Did not work, as lxc-create expects a lock on
> /srv/lxc/${CONTAINER_NAME}/partial. Note that this file is outside of
> /srv/lxc/locks.

Hm.  Really just an atomic creat with O_EXCL|O_CREAT should suffice
for that file, which would at least work for nfsv3+.

> It's been a decade or so since I touched any C code so I'll better
> wait for your patch. But don't worry Serge, I'm not in a hurry.
> 
> Worst case, I can create the containers in some other directory and
> then mv/rsync to the nfs mount point, ... or maybe try samba, but I
> think it'll be overkill and I better avoid it.

I'll try switching to ioctl(F_SETLK) this week.

thanks,
-serge

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to