1. 11 Jan, 2014 2 commits
  2. 10 Jan, 2014 4 commits
  3. 09 Jan, 2014 1 commit
  4. 08 Jan, 2014 2 commits
  5. 07 Jan, 2014 9 commits
  6. 06 Jan, 2014 11 commits
  7. 03 Jan, 2014 1 commit
    • add lxc-autostart support for sysv init systems · 420dfb59
      Dwight Engen authored
      This change updates the way init scripts get installed so that more
      than one init system can be supported. Instead of installing the
      systemd service file from the spec file, it should be installed at
      make install time, so that someone compiling from source also gets
      the unit file installed.
      
      Update the plamo template to use a lock file not named just
      /var/lock/subsys/lxc since the presence of that file is used by
      sysv init rc file to know if it should run the K01lxc script. This
      also makes it consistent with the other templates which use
      /var/lock/subsys/lxc-$template-name.
      Signed-off-by: 's avatarDwight Engen <dwight.engen@oracle.com>
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
  8. 02 Jan, 2014 6 commits
    • snapshot: enforce keeping same backing store type (v2) · 0a83cbbb
      Serge Hallyn authored
      Stéphane noticed that lxc-snapshot of a dir-backed container
      created an overlayfs container.  The expectation is that the
      user can continue to modify the original container and later make
      a new snapshot, but this doesn't work with the existing behavior -
      the overlayfs clone will end up with the modified contents.
      
      So add a 'LXC_CLONE_KEEPBDEVTYPE' flag, which c->snapshot()
      passes to c->clone().
      
      Also add a LXC_CLONE_MAYBE_SNAPSHOT.  If this is set and a
      backing store does not support snapshotting, then proceed with
      a copy clone.
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
    • change lxc-autostart shutdown to behave like lxc-stop · a771fe18
      Dwight Engen authored
      It is desirable to have a mode where a soft shutdown is requested,
      but then do a hard shutdown if after some time period the container
      has not shut down. This the default behaviour of lxc-stop, but is
      not currently possible with lxc-autostart. This change makes this
      the default behaviour when shutdown is specified to lxc-autostart.
      This will be very useful for init scripts.
      
      An indefinte wait for soft shutdown (though I'm not sure how that
      would be useful) is still possible by passing a timeout of 0.
      
      Change default timeout value to 60 seconds to match lxc-stop
      Signed-off-by: 's avatarDwight Engen <dwight.engen@oracle.com>
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
    • Additional logic for dealing with container shutdown / reboot · 99c2fb07
      Michael H. Warfield authored
      Additional logic for dealing with container shutdown / reboot
      
      Fix a problem with CentOS containers and legacy Fedora (<16) containers
      not shutting down or rebooting properly.  Copy /etc/init.d/halt to
      /etc/init.d/lxc-halt, deleting everything from the "hwclock save" and
      all after and append a force halt or reboot at the end of the new
      script, to prevent reexecing init.  Link that script in as
      S00lxc-halt in rc0.d and S00lxc-reboot in rc6.d to intercept the
      shutdown process before it gets to S01halt / S01reboot causing the hang.
      
      Fixed some typos in the CentOS template that were introduced in the
      previous patch for hwaddr settings and missed in regression testing.
      
      Cleaned up some instruction typos and tabs from previous patch.
      Signed-off-by: 's avatarMichael H. Warfield <mhw@WittsEnd.com>
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
    • Bring static and const to tests too · 0b98289e
      Andrey Mazo authored
      Signed-off-by: 's avatarAndrey Mazo <mazo@telum.ru>
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
    • Mark functions as static and arguments/arrays as const where possible · 74a3920a
      Andrey Mazo authored
      Mark most of functions that are used within only one file as static.
      After 95ee490b it's easy to prove they
      are not in public API.
      Several arrays and structs are also marked static.
      This prevents them from being exported from liblxc.so
      
      List of removed previously exported symbols:
      bdevs
      btrfs_ops
      check_autodev
      create_partial
      dir_ops
      dump_stacktrace
      get_mapped_rootid
      get_next_index
      lock_mutex
      loop_ops
      lvm_ops
      lxc_abort
      lxcapi_clone
      lxc_attach_drop_privs
      lxc_attach_get_init_uidgi
      lxc_attach_getpwshell
      lxc_attach_remount_sys_pr
      lxc_attach_set_environmen
      lxc_attach_to_ns
      lxc_clear_saved_nics
      lxc_config_readline
      lxc_devs
      lxc_free_idmap
      lxc_global_config_value
      lxc_poll
      lxc_proc_get_context_info
      lxc_set_state
      lxc_spawn
      mk_devtmpfs
      mount_check_fs
      ongoing_create
      overlayfs_destroy
      overlayfs_ops
      prepend_lxc_header
      remove_partial
      save_phys_nics
      setup_pivot_root
      signames
      static_mutex
      thread_mutex
      unlock_mutex
      unpriv_assign_nic
      zfs_ops
      Signed-off-by: 's avatarAndrey Mazo <mazo@telum.ru>
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
    • Revert "Use pthread_atfork() to unlock mutexes after fork()" · 64b1be29
      Serge Hallyn authored
      This reverts commit 84e9e197, because
      it breaks bionic builds.  The patch is desirable so hopefully we can
      come up with a solution or alternate patch soon.
  9. 01 Jan, 2014 3 commits
  10. 25 Dec, 2013 1 commit