1. 26 Aug, 2013 2 commits
    • config_ipv6: run inet_pton on the addr value without mask · 5acccf95
      Serge Hallyn authored
      otherwise a "$addr/$mask" results in failure.
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
    • api: convert lxc_start · 79622932
      Serge Hallyn authored
      Normal lxc-start usage tends to be "lxc-start -n name [-P lxcpath]".
      This causes $lxcpath/$name/config to be the configuration for the
      container.  However, lxc-start is more flexible than that.  You can
      specify a custom configuration file, in which case $lxcpath/$name/config
      is not used.  You can also (in addition or in place of either of these)
      specify configuration entries one-by-one using "-s lxc.utsname=xxx".
      
      To support this using the API, if we are not using
      $lxcpath/$name/config then we put ourselves into a custom lxcpath
      called (configurable using LXCPATH) /var/lib/lxc_anon.  To stop a
      container so created, then, you would use
      
      	lxc-stop -P /var/lib/lxc_anon -n name
      
      TODO: we should walk over the list of &defines by hand and set them
      using c->set_config_item.  I haven't done that in this patch.
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
  2. 22 Aug, 2013 2 commits
  3. 21 Aug, 2013 2 commits
    • lxc_cgroup: convert to using API · 9069513c
      Serge Hallyn authored
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
    • Track snapshot dependencies (v2) · dfb31b25
      Serge Hallyn authored
      (Will push in a bit barring any objections)
      
      lvm, btrfs, and zfs snapshots each do an ok job of handling deletions
      for us - a btrfs snapshot does fine after the original is removed,
      while zfs and lvm will both refuse to allow the original to be deleted
      while the snapshot exists.
      
      Overlayfs doesn't do this for us.  So, for overlayfs snapshots, track
      the dependencies.
      
      When c2 is created as an overlayfs snapshot of dir-backed c1, then
      
      1. c2's lxc_rdepends file will contain
      
      	c1_lxcpath
      	c1_lxcname
      
      2. c1's lxc_snapshots will contain "1"
      
      c1 cannot be deleted so long as lxc_snapshots exists and contains
      a non-zero number.
      
      The contents of lxc_snapshots and lxc_rdepends are protected by
      container_disk_lock() and at lxc_clone by the new container not yet
      being accessible.
      
      (Originally I was going to keep them in the container config, but the
      problem with using $lxcpath/$name/config is that api users could end up
      calling c->save_config() with a cached old value of snapshots/rdepends.)
      
      Changelog:
      	aug 21: check for fprintf and fclose failures
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
      Acked-by: 's avatarDwight Engen <dwight.engen@oracle.com>
  4. 20 Aug, 2013 8 commits
  5. 19 Aug, 2013 25 commits
  6. 16 Aug, 2013 1 commit
    • ubuntu-cloud-prep: patch /sbin/start for overlayfs · d24d56d7
      Scott Moser authored
      upstart depends on inotify, and overlayfs does not support inotify.
      
      That means that the following results in 'tgt' not running. tgt is simply
      used here as an example of a service that installs an upstart job and
      starts it on package install.
       lxc-clone -s -B overlayfs -o source-precise-amd64 -n test1
       lxc-start -n test1
       ..
       apt-get install tgt
      
      The change here is to modify /sbin/start inside the container so that when
      something explicitly tries 'start', it results in an explicit call to
      'initctl reload-configuration' so that upstart is aware of the newly
      placed job.
      
      Should overlayfs ever gain inotify support, this should still not cause
      any harm.
      Signed-off-by: 's avatarScott Moser <smoser@ubuntu.com>
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>