[Bug 1197754] [NEW] "lxc-start-ephemeral -d" is racy

Robie Basak 1197754 at bugs.launchpad.net
Thu Jul 4 10:38:36 UTC 2013


Public bug reported:

A script cannot call lxc-start-ephemeral and get a named container in a
reliable, race-free way.

Having the caller specify a name directly is racy, since the name could
have been taken in between checking that it doesn't exist already and
calling lxc-start-ephemeral.

Allowing lxc-start-ephemeral allows it to take care of the mkdir (and
retries) to generate an LXC container name in a race free manner, but
this needs -d to return the name in a machine-readable way, so that we
can create ephemeral LXC containers from scripts.

Please add a machine-readable mechanism to "lxc-start-ephemeral -d" and
then we can modify adt-virt-lxc to use it.

** Affects: autopkgtest (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: lxc (Ubuntu)
     Importance: Undecided
         Status: New

** Also affects: autopkgtest (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to autopkgtest in Ubuntu.
https://bugs.launchpad.net/bugs/1197754

Title:
  "lxc-start-ephemeral -d" is racy

Status in “autopkgtest” package in Ubuntu:
  New
Status in “lxc” package in Ubuntu:
  New

Bug description:
  A script cannot call lxc-start-ephemeral and get a named container in
  a reliable, race-free way.

  Having the caller specify a name directly is racy, since the name
  could have been taken in between checking that it doesn't exist
  already and calling lxc-start-ephemeral.

  Allowing lxc-start-ephemeral allows it to take care of the mkdir (and
  retries) to generate an LXC container name in a race free manner, but
  this needs -d to return the name in a machine-readable way, so that we
  can create ephemeral LXC containers from scripts.

  Please add a machine-readable mechanism to "lxc-start-ephemeral -d"
  and then we can modify adt-virt-lxc to use it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/autopkgtest/+bug/1197754/+subscriptions




More information about the foundations-bugs mailing list