]> git.proxmox.com Git - pve-container.git/log
pve-container.git
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>
8 years agobump version to 1.0-42
Dietmar Maurer [Mon, 8 Feb 2016 11:17:36 +0000 (12:17 +0100)]
bump version to 1.0-42

8 years agoRemove mknod call from pre-start hook
Fabian Grünbichler [Thu, 4 Feb 2016 12:07:03 +0000 (13:07 +0100)]
Remove mknod call from pre-start hook

Since lxc.autodev defaults to 1, LXC will mount /dev as
tmpfs an populate it. The removed code was unnecessary,
since the device node was not accessable in the container
anyway. A /dev mountpoint is mounted into the rootfs and
accessable under its mountpoint, even if there is no
associated /dev node in the container.

To make matters worse, there was no cleanup for this device
node, which made all but the first boot of containers with
a configured /dev mountpoint fail until the host itself was
rebooted.

8 years agoOnly add actual volumes to volid_list
Fabian Grünbichler [Thu, 4 Feb 2016 10:08:05 +0000 (11:08 +0100)]
Only add actual volumes to volid_list

skip /dev and bind mounts, otherwise stop backups will
fail in parse_volume_id.

8 years agofix growing of a running container's memory limit
Wolfgang Bumiller [Mon, 8 Feb 2016 07:48:28 +0000 (08:48 +0100)]
fix growing of a running container's memory limit

Since the memory cgroup has a memory and a "total" value
depending on whether you're increasing or decreasing the
values you have to set then in a working order. (Eg. you
can't reduce the total amount to less than the swap limit
or grow the swap limit to more than the total one.)

8 years agoopensuse 13.2 support
Wolfgang Bumiller [Mon, 8 Feb 2016 07:48:27 +0000 (08:48 +0100)]
opensuse 13.2 support

Needs the apparmor /run -> /var/run bind mount patch in
lxc-pve.

8 years agoadded $skiplock parameter for pct start/stop
Wolfgang Bumiller [Mon, 8 Feb 2016 07:48:26 +0000 (08:48 +0100)]
added $skiplock parameter for pct start/stop

Like with qemu the root user can use -skiplock with 'pct
start' and 'pct stop'.

This does not alter the container's lxc config, instead we
pass PVE_SKIPLOCK=1 via the environment which will be seen
from the prestart hook but not from inside the container.

8 years agoFix #791: warn when resize2fs fails
Wolfgang Bumiller [Mon, 8 Feb 2016 07:48:25 +0000 (08:48 +0100)]
Fix #791: warn when resize2fs fails

At this point the underlying file has already been
successfully resized which means it makes sense to refelct
that change in the config, but the guest will not see the
effect of it, however, a subsequent resize command will
further increase the size relative to the 'new' size, so
after such an error the best option is to manually deal with
the error and perform the necessary resize steps.

8 years agoFix #881: uninitialized value on valid lxc.cgroup keys
Wolfgang Bumiller [Tue, 2 Feb 2016 07:21:12 +0000 (08:21 +0100)]
Fix #881: uninitialized value on valid lxc.cgroup keys

We have no lxc.cgroup.* keys in $valid_lxc_conf_keys so they
and unknown keys showed an uninitialized value warning for
the new 'eq' operation.
This also avoids the second hash access.

8 years agoupdate changelog
Dietmar Maurer [Thu, 28 Jan 2016 16:12:26 +0000 (17:12 +0100)]
update changelog

8 years agoCloses #877: Skip mps with backup=0 for snapshot backups
Fabian Grünbichler [Thu, 28 Jan 2016 15:10:59 +0000 (16:10 +0100)]
Closes #877: Skip mps with backup=0 for snapshot backups

8 years agoupdate changelog
Dietmar Maurer [Thu, 28 Jan 2016 10:05:53 +0000 (11:05 +0100)]
update changelog

8 years agocreate firewall dir on ct restore, if it does not exists.
Wolfgang Link [Thu, 28 Jan 2016 08:00:40 +0000 (09:00 +0100)]
create firewall dir on ct restore, if it does not exists.

8 years agoupdate changelog
Dietmar Maurer [Wed, 27 Jan 2016 16:15:21 +0000 (17:15 +0100)]
update changelog

8 years agofix PVE::HA use clauses
Thomas Lamprecht [Wed, 27 Jan 2016 13:25:49 +0000 (14:25 +0100)]
fix PVE::HA use clauses

remove to unecessary use clauses and add the PVE2 environment use
clause to the other so that the correct HA resource plugins get
registered

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 years agobump version to 1.0-41
Dietmar Maurer [Wed, 27 Jan 2016 15:43:50 +0000 (16:43 +0100)]
bump version to 1.0-41

8 years agoadded 'acl' and 'ro' mountpoint options
Wolfgang Bumiller [Wed, 27 Jan 2016 10:10:23 +0000 (11:10 +0100)]
added 'acl' and 'ro' mountpoint options

Note that read-only bind mounts are currently not supported.

8 years agolxc.rootfs and lxc.rootfs.options are now invalid
Wolfgang Bumiller [Wed, 27 Jan 2016 10:10:22 +0000 (11:10 +0100)]
lxc.rootfs and lxc.rootfs.options are now invalid

lxc.rootfs has been a conflicting option already but now
lxc.rootfs.options is too

$valid_lxc_conf_keys can now containe an optional warning to
be printed when such a key is used.

8 years agoRemove weird config key entries
Wolfgang Bumiller [Wed, 27 Jan 2016 10:10:21 +0000 (11:10 +0100)]
Remove weird config key entries

8 years agobump version to 1.0-40
Dietmar Maurer [Sat, 23 Jan 2016 07:56:50 +0000 (08:56 +0100)]
bump version to 1.0-40

8 years agocheck sh instead of file for templates architecture type
Thomas Lamprecht [Fri, 22 Jan 2016 17:34:57 +0000 (18:34 +0100)]
check sh instead of file for templates architecture type

/usr/bin/file may not be available, while that has no high
probability we already had bug reports regarding this.

To ensure better compatibility use /bin/sh which every Linux
has (POSIX 1003.1-2004).

See: http://pubs.opengroup.org/onlinepubs/009695399/utilities/sh.html

8 years agoAdd dependency to 'file' package, which we use in src/PVE/LXC/Create.pm
Emmanuel Kasper [Thu, 21 Jan 2016 14:53:09 +0000 (15:53 +0100)]
Add dependency to 'file' package, which we use in src/PVE/LXC/Create.pm

Debian can be installed with the 'Minimal' or the 'Standard' package selection.
'Minimal' debian installations have the package missing.

8 years agoimplement linked clones
Dietmar Maurer [Thu, 21 Jan 2016 10:50:56 +0000 (11:50 +0100)]
implement linked clones

8 years agoRework snapshot config removal logic
Fabian Grünbichler [Wed, 20 Jan 2016 12:14:52 +0000 (13:14 +0100)]
Rework snapshot config removal logic

Correctly update parent relations in config file upon snapshot removal.

Previously, only the parent of the current state was updated/removed,
which led to broken parent relations if any snapshot other then the
immediate parent of the current snapshot was removed. To fix this,
the parent relation of all children snapshots of the removed snapshot
are updated/removed as well.

Based on code in qemu-server/PVE/QemuServer.pm and parts
of a patch by Gerrit Venema <gmoniker at gmail.com>

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
8 years agoDon't hold flock for whole backup operation
Fabian Grünbichler [Tue, 19 Jan 2016 12:47:24 +0000 (13:47 +0100)]
Don't hold flock for whole backup operation

Instead of holding the flock for the whole backup operation,
release it at the end of prepare(), and use
lock_container() to remove a potential 'backup' lock
from the config file when the backup is finished.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
8 years agoUse lock_container when checking locks
Fabian Grünbichler [Tue, 19 Jan 2016 12:47:23 +0000 (13:47 +0100)]
Use lock_container when checking locks

This should prevent race conditions by preventing config
file changes inbetween checking locks and actually doing
the start/stop/.. operation.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
8 years agoFix typo in lxc-checkpoint dump directory
Fabian Grünbichler [Tue, 19 Jan 2016 12:10:51 +0000 (13:10 +0100)]
Fix typo in lxc-checkpoint dump directory

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
8 years agoFix typos in comments, descriptions and messages
Fabian Grünbichler [Tue, 19 Jan 2016 12:10:50 +0000 (13:10 +0100)]
Fix typos in comments, descriptions and messages

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
8 years agobump version to 1.0-39
Dietmar Maurer [Mon, 18 Jan 2016 16:01:51 +0000 (17:01 +0100)]
bump version to 1.0-39