]> git.proxmox.com Git - pve-container.git/log
pve-container.git
8 years agostyle fix
Wolfgang Bumiller [Thu, 24 Mar 2016 07:47:49 +0000 (08:47 +0100)]
style fix

8 years agobump version to 1.0-55
Dietmar Maurer [Fri, 1 Apr 2016 05:21:03 +0000 (07:21 +0200)]
bump version to 1.0-55

8 years agoAdd read_password sub for 'pct create'
Fabian Grünbichler [Wed, 30 Mar 2016 11:51:52 +0000 (13:51 +0200)]
Add read_password sub for 'pct create'

Read the container root password from stdin when creating a
container with 'pct create ... -password', instead of
providing it as command line argument. This is consistent
with 'pveum adduser' and pvesh, as described in #737 and #777.

8 years agouse ascicode compatible markup
Dietmar Maurer [Wed, 23 Mar 2016 09:36:19 +0000 (10:36 +0100)]
use ascicode compatible markup

s/Note:/NOTE:/

8 years agobump version to 1.0-54
Dietmar Maurer [Fri, 18 Mar 2016 15:35:27 +0000 (16:35 +0100)]
bump version to 1.0-54

8 years agoFix #918: add /dev/mapper symlinks for dm-* devices
Wolfgang Bumiller [Fri, 18 Mar 2016 09:11:10 +0000 (10:11 +0100)]
Fix #918: add /dev/mapper symlinks for dm-* devices

Mount canonicalizes paths unless the -c option is used. This
is mostly fine but for device-mapper nodes (/dev/dm-*) it'll
fetch the /dev/mapper/* path and pass that to the mount
system call resulting in /proc/mounts showing the
/dev/mapper path. This is neither the one we provided (since
we use /dev/$vg/$lv), nor the one userspace tools will find
in /dev currently.
Since the dm-* paths are rather inconvenient to look at we
decided to keep mount's behavior and compensate by providing
the /dev/mapper symlinks for devices via the autodev hook.

8 years agocleanup: avoid an -o '' empty-string option
Wolfgang Bumiller [Fri, 18 Mar 2016 09:11:09 +0000 (10:11 +0100)]
cleanup: avoid an -o '' empty-string option

8 years agocleanup: $mounted_dev is never set in this code path
Wolfgang Bumiller [Fri, 18 Mar 2016 09:11:08 +0000 (10:11 +0100)]
cleanup: $mounted_dev is never set in this code path

This might avoid some confusion in the future...

8 years agoautodev: create missing paths
Wolfgang Bumiller [Fri, 18 Mar 2016 09:11:07 +0000 (10:11 +0100)]
autodev: create missing paths

8 years agobump version to 1.0-53
Dietmar Maurer [Wed, 16 Mar 2016 15:52:24 +0000 (16:52 +0100)]
bump version to 1.0-53

8 years agospelling/typo correction
Fabian Grünbichler [Wed, 16 Mar 2016 14:45:56 +0000 (15:45 +0100)]
spelling/typo correction

8 years agoAdd force parameter for migration with bind/dev mp
Fabian Grünbichler [Wed, 16 Mar 2016 14:45:55 +0000 (15:45 +0100)]
Add force parameter for migration with bind/dev mp

Add a new 'force' parameter that allows to force the
migration of a container despite configured bind or device
mountpoints, which will be ignored/skipped.

8 years agoRefactor content type check into sub
Fabian Grünbichler [Wed, 16 Mar 2016 09:53:13 +0000 (10:53 +0100)]
Refactor content type check into sub

8 years agocall create_disks after updating rootfs
Fabian Grünbichler [Wed, 16 Mar 2016 09:14:01 +0000 (10:14 +0100)]
call create_disks after updating rootfs

this allows to set the rootfs to <storage>:<size>,
automatically creating an empty volume of the specified
size on the specified storage, like for non-rootfs mps.

8 years agoCheck content type when adding/updating volumes
Fabian Grünbichler [Wed, 16 Mar 2016 09:14:00 +0000 (10:14 +0100)]
Check content type when adding/updating volumes

the non-'rootdir' storages are filtered out in the web
interface already, but using the API/CLI it was still
possible to add volumes on storages without the 'rootdir'
content type.

this check is only used for mountpoints using our storage
backends, bind/dev mounts still work like before.

8 years agoupdate changelog
Dietmar Maurer [Tue, 15 Mar 2016 08:19:09 +0000 (09:19 +0100)]
update changelog

8 years agorequire -experimental for pct clone and template
Fabian Grünbichler [Tue, 15 Mar 2016 08:01:18 +0000 (09:01 +0100)]
require -experimental for pct clone and template

8 years agobump version to 1.0-52
Dietmar Maurer [Mon, 14 Mar 2016 08:00:25 +0000 (09:00 +0100)]
bump version to 1.0-52

8 years agoPrevent race conditions in snapshot mode backup
Fabian Grünbichler [Fri, 11 Mar 2016 10:44:47 +0000 (11:44 +0100)]
Prevent race conditions in snapshot mode backup

Instead of dropping the 'backup' lock early on when doing
snapshot backups, drop it temporarily for snapshot
operations that set their own 'snapshot' lock, and protect
the "unlock_vm, snapshot_XX, lock_vm" sequence by holding an
flock for the config file.

Before this change it was possible to interfere with the
backup job by setting a different lock with another
operation inbetween the call to unlock_vm and
snapshot_create (or snapshot_delete).

The final lock_vm is re-introduced in order to be more
consistent with the other backup modes and to prevent
changes to the configuration file before assemble()
reloads the configuration that is included in the backup.

8 years agoUse set_lock and remove_lock
Fabian Grünbichler [Fri, 11 Mar 2016 10:37:33 +0000 (11:37 +0100)]
Use set_lock and remove_lock

instead of manually setting and removing the lock config
parameter.

8 years agoupdate changelog
Dietmar Maurer [Wed, 9 Mar 2016 16:56:04 +0000 (17:56 +0100)]
update changelog

8 years agofix #912: centos/redhat confusion
Wolfgang Bumiller [Wed, 9 Mar 2016 09:13:00 +0000 (10:13 +0100)]
fix #912: centos/redhat confusion

With the introduction of unmanaged containers a check was
added to verify that the ostype is the same as the
autodetected one.
Since our CentOS plugin was named 'redhat' but the ostype
setting was 'centos' this error triggered and rendered
centos containers unusable.

Renamed the LXC::Setup::Redhat package LXC::Setup::CentOS
and changed the plugin name to and autodetected type from
'redhat' to 'centos' as well.

8 years agobump version to 1.0-51
Dietmar Maurer [Wed, 9 Mar 2016 16:52:48 +0000 (17:52 +0100)]
bump version to 1.0-51

8 years agoimplement cpulimit hotplugging
Wolfgang Bumiller [Wed, 9 Mar 2016 09:01:14 +0000 (10:01 +0100)]
implement cpulimit hotplugging

8 years agoconfig: allow deleting cpuunits and cpulimit
Wolfgang Bumiller [Wed, 9 Mar 2016 09:01:13 +0000 (10:01 +0100)]
config: allow deleting cpuunits and cpulimit

These were simply missing.

8 years agoupdate changelog
Dietmar Maurer [Tue, 8 Mar 2016 14:56:31 +0000 (15:56 +0100)]
update changelog

8 years agoimplement rate limiting
Wolfgang Bumiller [Tue, 8 Mar 2016 12:55:40 +0000 (13:55 +0100)]
implement rate limiting

8 years agobump version to 1.0-50
Dietmar Maurer [Tue, 8 Mar 2016 10:37:40 +0000 (11:37 +0100)]
bump version to 1.0-50

8 years agoDecide whether volume is added as unused in subclass
Fabian Grünbichler [Mon, 7 Mar 2016 11:39:28 +0000 (12:39 +0100)]
Decide whether volume is added as unused in subclass

follow the change in PVE::AbstractConfig

8 years agolist_active_containers: fix regex
Dietmar Maurer [Tue, 8 Mar 2016 06:28:50 +0000 (07:28 +0100)]
list_active_containers: fix regex

allow \s+ as seperator

8 years agobump version to 1.0-49
Dietmar Maurer [Mon, 7 Mar 2016 08:50:07 +0000 (09:50 +0100)]
bump version to 1.0-49

8 years agochange update_etc_hosts to use ct_modify_file
Wolfgang Bumiller [Tue, 1 Mar 2016 09:50:33 +0000 (10:50 +0100)]
change update_etc_hosts to use ct_modify_file

8 years agoSetup::Base: more generic ct_modify_file function
Wolfgang Bumiller [Tue, 1 Mar 2016 09:50:32 +0000 (10:50 +0100)]
Setup::Base: more generic ct_modify_file function

Replaced ct_modify_file_head_portion() with ct_modify_file()
taking a header and and replacing the section in-place
rather than always moving it to the top of the file.

The behavior for when a section is not defined can be
defined via the provided options (replace, prepend, or
append).

8 years agoDocument the difference between stop and shutdown
Emmanuel Kasper [Thu, 3 Mar 2016 12:52:52 +0000 (13:52 +0100)]
Document the difference between stop and shutdown

8 years agobump version to 1.0-48
Dietmar Maurer [Thu, 3 Mar 2016 09:38:47 +0000 (10:38 +0100)]
bump version to 1.0-48

8 years agoMove JSONFormat code to PVE::LXC::Config
Fabian Grünbichler [Wed, 2 Mar 2016 13:03:52 +0000 (14:03 +0100)]
Move JSONFormat code to PVE::LXC::Config

Some of this should move into PVE::AbstractConfig soon.

8 years agoRefactor mountpoint and general conf methods
Fabian Grünbichler [Wed, 2 Mar 2016 13:03:51 +0000 (14:03 +0100)]
Refactor mountpoint and general conf methods

Move add_unused_volume into abstract
pve-common/src/PVE/AbstractConfig.pm, because it is
identical for LXC and Qemu.

Move classify_mountpoint, is_volume_in_use, has_dev_console,
mountpoint_names, foreach_mountpoint_XX and get_vm_volumes
to PVE::LXC::Config because they only deal with config
related matters.

(Some of) the latter methods might get moved to or become
implementations of methods in PVE::AbstractConfig in the
future.

8 years agoRework snapshot code, has_feature
Fabian Grünbichler [Wed, 2 Mar 2016 13:03:50 +0000 (14:03 +0100)]
Rework snapshot code, has_feature

Move snapshot_create, snapshot_delete and snapshot_rollback
into abstract pve-common/src/PVE/AbstractConfig.pm,
splitting LXC-specific parts into __snapshot_XX methods in
src/PVE/LXC/Config.pm.

check_freeze_needed, snapshot_prepare and snapshot_commit
are downgraded to private __snapshot_XX methods (in
PVE::AbstractConfig and PVE::LXC::Config).

has_feature is made an implementation of the abstract
has_feature, and thus moves into src/PVE/LXC/Config.pm

8 years agoRefactor config-related methods into AbstractConfig
Fabian Grünbichler [Wed, 2 Mar 2016 13:03:49 +0000 (14:03 +0100)]
Refactor config-related methods into AbstractConfig

Move load_config, write_config, lock_config[_xx],
check_lock, has_lock, set_lock, remove_lock, is_template,
check_protection and config_file to pve-common/src/PVE/
AbstractConfig.pm since they are identical for LXC and
Qemu.

Move cfs_config_path and config_file_lock to implementation
of PVE::AbstractConfig in src/PVE/LXC/Config.pm

Drop create_config and replace it with write_config.

8 years agopct list: Add a 'Lock' column
Wolfgang Bumiller [Tue, 1 Mar 2016 10:07:49 +0000 (11:07 +0100)]
pct list: Add a 'Lock' column

This seems more useful than a 'mounted' state as a
mount-locked container can also be running.

8 years agoDrop used unused volumes when writing config
Fabian Grünbichler [Tue, 1 Mar 2016 09:57:44 +0000 (10:57 +0100)]
Drop used unused volumes when writing config

instead of only when updating the config via pct set or the
API.

This enables us to add unused volumes without calling
is_volume_in_use and mimics the behaviour in QemuServer.pm

8 years agoDon't apply snapshot config in snapshot_commit
Fabian Grünbichler [Tue, 1 Mar 2016 08:14:29 +0000 (09:14 +0100)]
Don't apply snapshot config in snapshot_commit

We hold a lock from snapshot_prepare until snapshot_commit,
so there is no need to copy back the snapshot config to the
actual config.

This allows us to move snapshot_commit to the abstract
 common code base.

8 years agocleanup: remove duplicate code
Dietmar Maurer [Tue, 1 Mar 2016 08:07:49 +0000 (09:07 +0100)]
cleanup: remove duplicate code

8 years agorun_with_loopdev: reuse existing loopdevs
Wolfgang Bumiller [Mon, 29 Feb 2016 08:44:18 +0000 (09:44 +0100)]
run_with_loopdev: reuse existing loopdevs

This will avoid triggering the MMP when mounting a
container locally outside lxc.

8 years agobump version to 1.0-47
Dietmar Maurer [Sat, 27 Feb 2016 13:38:42 +0000 (14:38 +0100)]
bump version to 1.0-47

8 years agoallow starting and stopping a mounted container
Wolfgang Bumiller [Fri, 26 Feb 2016 10:42:12 +0000 (11:42 +0100)]
allow starting and stopping a mounted container

8 years agoImplement pct mount/unmount
Wolfgang Bumiller [Fri, 26 Feb 2016 10:42:10 +0000 (11:42 +0100)]
Implement pct mount/unmount

These are for emergency maintenance and put the container
into a locked state ('mounted' lock).

8 years agoadded set_lock and remove_lock
Wolfgang Bumiller [Fri, 26 Feb 2016 10:42:09 +0000 (11:42 +0100)]
added set_lock and remove_lock

Since set_lock does the implied lock_config() and
load_config() it also returns the loaded config afterwards
as there is no other meaningful return value defined for
this function since failure to apply the lock throws an
exception.

remove_lock() also takes a lock name in order to make sure
only the correct lock is being removed.

8 years agoImplement pct push/pull
Wolfgang Bumiller [Fri, 26 Feb 2016 10:42:08 +0000 (11:42 +0100)]
Implement pct push/pull

These commands are for running containers only.

To avoid symlink problems these implementations switch
between the host's and container's namespace to open the
corresponding file handles, then copy the data.

With unprivileged containers we also enter the container's
user-namespace with pct-push and switch to the container's
root user before opening the destination for writing in
order to create new files with the mapped root user.

8 years agoRefactor has_feature
Fabian Grünbichler [Fri, 26 Feb 2016 08:19:44 +0000 (09:19 +0100)]
Refactor has_feature

add unused running flag for signature compatibility to
QemuServer.pm
add backup_only flag to replace former feature workaround,
needed to skip backup=no mountpoints if called from VZDump.

8 years agoMake snapshot_save_vmstate proper sub
Fabian Grünbichler [Fri, 26 Feb 2016 08:19:43 +0000 (09:19 +0100)]
Make snapshot_save_vmstate proper sub

8 years agoFix #898: typo
Wolfgang Bumiller [Fri, 26 Feb 2016 07:07:46 +0000 (08:07 +0100)]
Fix #898: typo

8 years agoAdapt and add testcases for mp support
Fabian Grünbichler [Wed, 24 Feb 2016 11:28:35 +0000 (12:28 +0100)]
Adapt and add testcases for mp support

8 years agoAdd mp support to snapshots
Fabian Grünbichler [Wed, 24 Feb 2016 11:28:34 +0000 (12:28 +0100)]
Add mp support to snapshots

Modelled after QemuServer's way of handling multiple drives.

8 years agoCheck volume usage in snapshots before deleting
Fabian Grünbichler [Wed, 24 Feb 2016 11:28:33 +0000 (12:28 +0100)]
Check volume usage in snapshots before deleting

8 years agopct enter: check if container runs before lxc-attach
Thomas Lamprecht [Wed, 24 Feb 2016 08:33:41 +0000 (09:33 +0100)]
pct enter: check if container runs before lxc-attach

else we get:
 >
 > lxc-attach: attach.c: lxc_attach: 710 failed to get the init pid

which an arbitrary user could misunderstand.

8 years agoAdd snapshot rollback testcases
Fabian Grünbichler [Tue, 23 Feb 2016 14:00:14 +0000 (15:00 +0100)]
Add snapshot rollback testcases

8 years agoCleanup test output
Fabian Grünbichler [Tue, 23 Feb 2016 14:00:13 +0000 (15:00 +0100)]
Cleanup test output

8 years agoUse run_command instead of system to stop CT
Fabian Grünbichler [Tue, 23 Feb 2016 14:00:12 +0000 (15:00 +0100)]
Use run_command instead of system to stop CT

8 years agoAdd '\n' to die statements
Fabian Grünbichler [Tue, 23 Feb 2016 14:00:11 +0000 (15:00 +0100)]
Add '\n' to die statements

8 years agoonly root@pam should be able to add bind mounts
Wolfgang Bumiller [Tue, 23 Feb 2016 08:54:03 +0000 (09:54 +0100)]
only root@pam should be able to add bind mounts

8 years agofix permission check skipping
Wolfgang Bumiller [Tue, 23 Feb 2016 08:54:02 +0000 (09:54 +0100)]
fix permission check skipping

8 years agointroduce 'unmanaged' os type
Dietmar Maurer [Tue, 23 Feb 2016 07:16:57 +0000 (08:16 +0100)]
introduce 'unmanaged' os type

to skip all container configuration.

8 years agoconfig: deal with re-added previously unused volumes
Wolfgang Bumiller [Mon, 22 Feb 2016 12:27:45 +0000 (13:27 +0100)]
config: deal with re-added previously unused volumes

8 years agoalways use new/unistalled files for testing
Dietmar Maurer [Mon, 22 Feb 2016 15:09:04 +0000 (16:09 +0100)]
always use new/unistalled files for testing

8 years agoadd libtest-mockmodule-perl to build depends
Dietmar Maurer [Mon, 22 Feb 2016 15:03:29 +0000 (16:03 +0100)]
add libtest-mockmodule-perl to build depends

8 years agoAdd snapshot tests
Fabian Grünbichler [Mon, 22 Feb 2016 12:31:29 +0000 (13:31 +0100)]
Add snapshot tests

tested so far:
-snapshot_prepare
-snapshot_commit
-snapshot_create
-snapshot_delete

8 years agoRefactor snapshot_rollback
Fabian Grünbichler [Mon, 22 Feb 2016 12:09:00 +0000 (13:09 +0100)]
Refactor snapshot_rollback

like in QemuServer.pm, but only for rootfs for now

8 years agoRefactor snapshot_delete
Fabian Grünbichler [Mon, 22 Feb 2016 12:08:59 +0000 (13:08 +0100)]
Refactor snapshot_delete

like in QemuServer.pm, but only for rootfs for now

8 years agoAdd snapshot_apply_config, cleanup prepare and commit
Fabian Grünbichler [Mon, 22 Feb 2016 12:08:58 +0000 (13:08 +0100)]
Add snapshot_apply_config, cleanup prepare and commit

snapshot_apply_config, snapshot_prepare and snapshot_commit
like in QemuServer.pm

8 years agoAdjust snapshot_create and snapshot_prepare signatures
Fabian Grünbichler [Mon, 22 Feb 2016 12:08:57 +0000 (13:08 +0100)]
Adjust snapshot_create and snapshot_prepare signatures

Add new save_vmstate parameter to snapshot_create and
snapshot_prepare, like in QemuServer.pm
Also make snapshot_prepare and snapshot_commit proper subs.

8 years agoupdate changelog
Dietmar Maurer [Thu, 18 Feb 2016 10:52:05 +0000 (11:52 +0100)]
update changelog

8 years agoexclude 'parent' from config when restoring
Dominik Csapak [Mon, 15 Feb 2016 14:10:56 +0000 (15:10 +0100)]
exclude 'parent' from config when restoring

without this, if you restore an lxc container from a backup
while it has snapshots, the parser does not understand the
'parent' option and aborts

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
8 years agobump version to 1.0-46
Dietmar Maurer [Thu, 18 Feb 2016 10:49:39 +0000 (11:49 +0100)]
bump version to 1.0-46

8 years agosuse: move setup_securetty to template_fixup()
Wolfgang Bumiller [Thu, 18 Feb 2016 09:54:52 +0000 (10:54 +0100)]
suse: move setup_securetty to template_fixup()

8 years agosetup: move setup_container_getty_service to Base
Wolfgang Bumiller [Thu, 18 Feb 2016 09:54:51 +0000 (10:54 +0100)]
setup: move setup_container_getty_service to Base

And reuse it for ArchLinux.

8 years agoAdd to unused volumes only if really unused
Fabian Grünbichler [Wed, 17 Feb 2016 13:37:15 +0000 (14:37 +0100)]
Add to unused volumes only if really unused

Add unused volumes for changed mpX and rootfs, not only for
deleted mpX.
Add check before adding to unused volumes in order to
prevent false entries (which could lead to deletion of still
used volumes!)

8 years agobump version to 1.0-45
Dietmar Maurer [Tue, 16 Feb 2016 11:15:32 +0000 (12:15 +0100)]
bump version to 1.0-45

8 years agoalpine: read /etc/alpine-release
Wolfgang Bumiller [Fri, 12 Feb 2016 08:27:34 +0000 (09:27 +0100)]
alpine: read /etc/alpine-release

8 years agouse common/userns.conf if no ostype-speicifc one exists
Wolfgang Bumiller [Fri, 12 Feb 2016 08:27:33 +0000 (09:27 +0100)]
use common/userns.conf if no ostype-speicifc one exists

(LXC doesn't ship an alpine.conf)

8 years agoinstall Alpine.pm and configure its network
Wolfgang Bumiller [Fri, 12 Feb 2016 08:27:32 +0000 (09:27 +0100)]
install Alpine.pm and configure its network

Since busybox' current default DHCPv6 client is unfinished
and alpine currently doesn't handle a 'dhcp' interface type
in its /etc/network/interfaces and bails out when
configuring the network with a broken config we have to make
sure we don't pass this on to debian's setup_network.

Unfortunately a warning at this point would only be visible
when creating a container because at this point no warning
makes it to the console/UI (and errors would be hidden
because the setup runs in our lxc prestart hook).

8 years agoalpine: cleanup
Wolfgang Bumiller [Fri, 12 Feb 2016 08:27:31 +0000 (09:27 +0100)]
alpine: cleanup

8 years agoadd Alpine Linux distribution
Jens Vehlhaber [Fri, 12 Feb 2016 08:27:30 +0000 (09:27 +0100)]
add Alpine Linux distribution

Signed-off-by: Jens Vehlhaber <jens@eisfair.org>
8 years agoupdate changelog
Dietmar Maurer [Fri, 12 Feb 2016 11:04:00 +0000 (12:04 +0100)]
update changelog

8 years agolxc: read-only bind mounts
Wolfgang Bumiller [Fri, 12 Feb 2016 10:40:35 +0000 (11:40 +0100)]
lxc: read-only bind mounts

Factored the bind-mounting into a bindmount() function since
we don't want to leave a writable bind-mount behind if the
read-only remount fails.

The read-only flag is now also removed from the initial
mount flags and is added only for the remount command and is
added separately the non-bind mounts.

8 years agoRefactor lock_container into lock_config_[xx]
Fabian Grünbichler [Fri, 12 Feb 2016 06:53:28 +0000 (07:53 +0100)]
Refactor lock_container into lock_config_[xx]

This mimics the "signatures" of the methods in
QemuServer.pm, and should allow us to use this methods in a
future abstract "Guest" class.

It also changes the various timeouts (ranging from 1, 10, 60
to undef) to use the default timeout defined in the
lock_config methods (10).

Also drop the now unused use statement for flock.

8 years agoAdd missing use statement
Fabian Grünbichler [Thu, 11 Feb 2016 11:17:36 +0000 (12:17 +0100)]
Add missing use statement

8 years agocleanup: remove unused json_config_properties_no_rootfs()
Wolfgang Bumiller [Thu, 11 Feb 2016 09:34:08 +0000 (10:34 +0100)]
cleanup: remove unused json_config_properties_no_rootfs()

8 years agobump version to 1.0-44
Dietmar Maurer [Thu, 11 Feb 2016 10:57:27 +0000 (11:57 +0100)]
bump version to 1.0-44

8 years agosnapshot: replace global sync with a namespace sync
Wolfgang Bumiller [Thu, 11 Feb 2016 08:26:36 +0000 (09:26 +0100)]
snapshot: replace global sync with a namespace sync

snapshot_create() called did a global 'sync' after freeze()
which syncs everything including all other containers and
the host. So if you want to snapshot container A while
container B tries to write to a broken NFS mount the
snapshot will hang in that sync call.
Instead we now enter the container's mount namespace and do
a syncfs() on all of its mountpoints.

8 years agoautodev hook cleanup
Wolfgang Bumiller [Thu, 11 Feb 2016 08:12:42 +0000 (09:12 +0100)]
autodev hook cleanup

8 years agoupdate changelog
Dietmar Maurer [Thu, 11 Feb 2016 07:41:58 +0000 (08:41 +0100)]
update changelog

8 years agoallow to update rootfs config
Dietmar Maurer [Thu, 11 Feb 2016 07:08:45 +0000 (08:08 +0100)]
allow to update rootfs config

8 years agolxc-pve-prestart-hook: use PVE::Tools::file_set_contents to write devlist
Dietmar Maurer [Thu, 11 Feb 2016 06:44:32 +0000 (07:44 +0100)]
lxc-pve-prestart-hook: use PVE::Tools::file_set_contents to write devlist

8 years agoadded quota flag to mountpoints
Wolfgang Bumiller [Wed, 10 Feb 2016 08:58:17 +0000 (09:58 +0100)]
added quota flag to mountpoints

quotactl(2) requires a path to the device node to work which
means we need to expose them to the container, luckily it
doesn't need r/w access to the device. Also, loop devices
will not detach from the images anymore with them being
still mounted in the monitor's mount namespace (which is
unshared from the host to prevent accidental unmounts via
lxc.monitor.unshare).

Note that quota manipulation currently does not work with
unprivileged containers.

8 years agobump version to 1.0-43
Dietmar Maurer [Thu, 11 Feb 2016 05:58:45 +0000 (06:58 +0100)]
bump version to 1.0-43

8 years agoImprove error handling in snapshot_create
Fabian Grünbichler [Wed, 10 Feb 2016 12:04:11 +0000 (13:04 +0100)]
Improve error handling in snapshot_create

Set unfreeze before trying to freeze, otherwise an aborted
or failed lxc-freeze will not be reversed by our error
handling, leaving the container in a (partially) frozen
state.

Make snapshot_create failure handling more resembling
to the QemuServer codebase and prepare for future code
convergence:
* use $drivehash parameter in snapshot_delete to bypass
check_lock() and delete config lock
* call $snapshot_commit last, it's only needed now if
there were no errors

8 years agoVZDump lock update, drop lock_aquire/lock_release
Fabian Grünbichler [Wed, 10 Feb 2016 11:01:17 +0000 (12:01 +0100)]
VZDump lock update, drop lock_aquire/lock_release

Since VZDump was the only user of lock_aquire and
lock_release, and does not actually need this split,
we can drop lock_aquire and lock_release.

Since lock_file_full in PVE::Tools now uses the same
refcounting implementation that lock_aquire/release
had, lock_container can simply wrap lock_file_full.

8 years agoprevent snapshot name 'vzdump' from user
Dominik Csapak [Wed, 10 Feb 2016 14:04:11 +0000 (15:04 +0100)]
prevent snapshot name 'vzdump' from user

if someone makes a snapshot named 'vzdump', it would get deleted
when using vzdump in snapshot mode, since we use that name for
making a temporary one

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
8 years agoimprove mountpoint parsing
Dominik Csapak [Thu, 4 Feb 2016 12:40:15 +0000 (13:40 +0100)]
improve mountpoint parsing

changes from v1:
renamed function to verify_*
added check for ../ at the beginning
cleaned up regex (\.)? -> \.?

currently we sanitize mountpoints with sanitize_mountpoint, which
tries to remove dots, double-dots and multiple slashes, but it does it
not correctly (e.g. /test/././ gets truncated to /test./ )

instead of trying to truncate the path, we create a format for mp strings
which throws an error if /./ or /../ exist (also /. and /.. at the end or
../ at the beginning) since there should be no valid use for these in
mountpoint paths anyway

with the new behaviour, we don't need sanitize_mountpoint anymore:

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>