[pve-devel] [PATCH storage 2/2] disable jewel image features when using krdb

2016-06-07 Thread Fabian Grünbichler
otherwise mapping those images will fail. disabling the features only needs to be done once per image, so it makes sense to do this when creating the images. unfortunately, the command does not work in hammer, so it needs a version check for jewel or higher. --- PVE/Storage/RBDPlugin.pm | 17

[pve-devel] [PATCH storage 1/2] add ceph version helpers

2016-06-07 Thread Fabian Grünbichler
--- Note: this could be used in CephTools / pveceph as well if necessary PVE/Storage/RBDPlugin.pm | 30 ++ 1 file changed, 30 insertions(+) diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm index 967ee04..2b4ff9c 100644 --- a/PVE/Storage/RBDPlugin.pm

Re: [pve-devel] [PATCH V2 qemu-server] Add LVM and LVMThin to QemuMigration

2016-06-08 Thread Fabian Grünbichler
> Wolfgang Link hat am 8. Juni 2016 um 14:59 geschrieben: > > # if file, check if a backing file exist > - if (!($scfg->{type} eq 'dir' || $scfg->{type} eq 'zfspool') && > (!$sharedvm)) { > - my (undef, undef, undef, $parent) = >

[pve-devel] [PATCH docs 1/3] add bind mount warning

2016-06-07 Thread Fabian Grünbichler
--- pct.adoc | 6 ++ 1 file changed, 6 insertions(+) diff --git a/pct.adoc b/pct.adoc index dc9f446..014e48d 100644 --- a/pct.adoc +++ b/pct.adoc @@ -382,6 +382,12 @@ mounting mechanisms or storage technologies, it is possible to establish the FUSE mount on the Proxmox host and use a bind

[pve-devel] [PATCH docs 2/3] add mountpoint restore documentation

2016-06-07 Thread Fabian Grünbichler
--- pct.adoc | 53 + 1 file changed, 53 insertions(+) diff --git a/pct.adoc b/pct.adoc index 014e48d..38d5507 100644 --- a/pct.adoc +++ b/pct.adoc @@ -452,6 +452,45 @@ and destroy containers, and control execution (start, stop, migrate, ...).

[pve-devel] [PATCH docs 3/3] add note about skipped bind/dev mps

2016-06-07 Thread Fabian Grünbichler
--- vzdump.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vzdump.adoc b/vzdump.adoc index 3276a32..00f4aa6 100644 --- a/vzdump.adoc +++ b/vzdump.adoc @@ -93,6 +93,9 @@ NOTE: `snapshot` mode requires that all backed up volumes are on a storage that supports snapshots. Using the

[pve-devel] [PATCH v2 container] docs: update mountpoint descriptions

2016-06-07 Thread Fabian Grünbichler
--- Changed: - WARNING to NOTE - include symlink info in normal description as well src/PVE/LXC/Config.pm | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm index 6b4ec4c..c067e7a 100644 --- a/src/PVE/LXC/Config.pm +++

[pve-devel] [PATCH container] docs: update mountpoint descriptions

2016-06-07 Thread Fabian Grünbichler
--- src/PVE/LXC/Config.pm | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm index 6b4ec4c..d80dae0 100644 --- a/src/PVE/LXC/Config.pm +++ b/src/PVE/LXC/Config.pm @@ -208,7 +208,7 @@ my $rootfs_desc = { }, ro => {

[pve-devel] [PATCH v3 container] docs: update mountpoint descriptions again

2016-06-07 Thread Fabian Grünbichler
--- rebased v2 with v1 applied ;) src/PVE/LXC/Config.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm index d80dae0..c067e7a 100644 --- a/src/PVE/LXC/Config.pm +++ b/src/PVE/LXC/Config.pm @@ -551,9 +551,10 @@ my $mp_desc =

[pve-devel] [PATCH manager] fix #1005: don't exclude /var/log/?* with stdexcludes

2016-06-08 Thread Fabian Grünbichler
the old behaviour can be easily restored with --exclude-path and this seemed to surprise a lot of users. --- PVE/CLI/vzdump.pm | 1 - PVE/VZDump.pm | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/PVE/CLI/vzdump.pm b/PVE/CLI/vzdump.pm index a048a38..75d2bb7 100755 ---

[pve-devel] [PATCH docs] doc: update stdexcludes

2016-06-08 Thread Fabian Grünbichler
--- vzdump.adoc | 1 - 1 file changed, 1 deletion(-) diff --git a/vzdump.adoc b/vzdump.adoc index 00f4aa6..2939cbe 100644 --- a/vzdump.adoc +++ b/vzdump.adoc @@ -164,7 +164,6 @@ NOTE: this option is only available for container backups. 'vzdump' skips the following files by default (disable

[pve-devel] [PATCH container 1/3] ignore ro flag when creating/restoring CT

2016-06-03 Thread Fabian Grünbichler
--- Note: this was previously included in the refactoring patch, got its own patch for clarity's sake.. src/PVE/LXC/Create.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/LXC/Create.pm b/src/PVE/LXC/Create.pm index 68628a1..123ca81 100644 ---

[pve-devel] [PATCH container 2/3] split up create_rootfs and restore_and_configure

2016-06-03 Thread Fabian Grünbichler
these were only used once and their method signatures were already quite long, so split up into - delete old existing container and write new config - mount - restore archive / extract template - restore configuration / setup new container - unmount --- Changes to previous version: - destroy old

[pve-devel] [PATCH container 0/3] pct restore mountpoint improvements part 2

2016-06-03 Thread Fabian Grünbichler
this patch series includes a reworked / cleaned up version of the not-applied parts of the previous mp restore improvement series, as well as an additional fix to reserve the container ID with an empty config file after obtaining the local flock. Fabian Grünbichler (3): ignore ro flag when

[pve-devel] [PATCH container 3/3] use empty config to reserve container ID

2016-06-03 Thread Fabian Grünbichler
also adapt PVE::LXC::destroy_lxc_container to optionally write an arbitray new config instead of deleting it altogether. the old configuration is replaced by an empty temporary configuration at the moment, but this could easily be reused if/when a "create"-locked config is used instead of an empty

[pve-devel] [PATCH v2 storage 0/2] vzdump config extraction

2016-06-03 Thread Fabian Grünbichler
reworked and rebased config extraction from vzdump backup archives changes to v2: - moved client part to pvesm instead of pct/qm - improve error handling for compressed vma files Fabian Grünbichler (2): add extract vzdump config methods add pvesm extractconfig PVE/CLI/pvesm.pm | 38

[pve-devel] [PATCH v2 storage 1/2] add extract vzdump config methods

2016-06-03 Thread Fabian Grünbichler
extract_vzdump_config_tar is an adapted combination of tar_archive_search_conf() and the first part of recover_config(), both from PVE::LXC::Create. a compressed vma backup file needs special error handling because vma exits as soon as it found the config file, which the used decompressors treat

[pve-devel] [PATCH v2 storage 2/2] add pvesm extractconfig

2016-06-03 Thread Fabian Grünbichler
--- PVE/CLI/pvesm.pm | 38 ++ 1 file changed, 38 insertions(+) diff --git a/PVE/CLI/pvesm.pm b/PVE/CLI/pvesm.pm index 6630f87..f5ae277 100755 --- a/PVE/CLI/pvesm.pm +++ b/PVE/CLI/pvesm.pm @@ -53,6 +53,43 @@ __PACKAGE__->register_method ({ }});

[pve-devel] [PATCH v2 manager] add vzdump/extractconfig API path

2016-06-03 Thread Fabian Grünbichler
--- only rebased PVE/API2/VZDump.pm | 39 +++ 1 file changed, 39 insertions(+) diff --git a/PVE/API2/VZDump.pm b/PVE/API2/VZDump.pm index 712c712..91b8a27 100644 --- a/PVE/API2/VZDump.pm +++ b/PVE/API2/VZDump.pm @@ -165,3 +165,42 @@

[pve-devel] [PATCH v2 container] use PVE::Storage::extract_vzdump_config_tar

2016-06-03 Thread Fabian Grünbichler
which is based on the former tar_archive_search_conf code --- Note: requires vzdump config extraction patch series Changes in v2: - us qr operator to pass regexp src/PVE/LXC/Create.pm | 37 + 1 file changed, 1 insertion(+), 36 deletions(-) diff --git

[pve-devel] [PATCH kernel] use correct git urls for SOURCE

2016-06-14 Thread Fabian Grünbichler
--- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 46312e0..e783751 100644 --- a/Makefile +++ b/Makefile @@ -96,7 +96,7 @@ ${PVE_DEB} pve: proxmox-ve/control proxmox-ve/postinst sed -e 's/@KVNAME@/${KVNAME}/'

[pve-devel] [PATCH RFC container] include custom lxc options when displaying config

2016-06-15 Thread Fabian Grünbichler
this makes the "pct config" output more complete, the object returned by the API path contains the lxc options as parsed by our config parser, e.g.: "lxc" : [ [ "lxc.cap.keep", "sys_time" ], [ "lxc.cap.drop", "abc" ], [

Re: [pve-devel] [PATCH RFC container] include custom lxc options when displaying config

2016-06-15 Thread Fabian Grünbichler
comments inline > Dietmar Maurer hat am 15. Juni 2016 um 12:27 > geschrieben: > > > comments inline > > ... > > diff --git a/src/PVE/CLI/pct.pm b/src/PVE/CLI/pct.pm > > index ca87229..748ace3 100755 > > --- a/src/PVE/CLI/pct.pm > > +++ b/src/PVE/CLI/pct.pm > > @@ -542,12

[pve-devel] [PATCH kernel 2/2] drop dependency on pve-kernel-xx for pve-header-xx

2016-06-13 Thread Fabian Grünbichler
usually, the headers should be installed before the kernel image, not the other way round, and neither depends on the other. --- headers-control.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headers-control.in b/headers-control.in index ae8bc33..efccbe2 100644 ---

[pve-devel] [PATCH kernel 1/2] add pve-headers meta-package

2016-06-13 Thread Fabian Grünbichler
--- Makefile | 19 --- proxmox-ve/control-headers | 11 +++ 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 proxmox-ve/control-headers diff --git a/Makefile b/Makefile index 46312e0..549d16a 100644 --- a/Makefile +++ b/Makefile @@

[pve-devel] [PATCH container 4/5] warn about unsupported backup configuration

2016-05-30 Thread Fabian Grünbichler
--- Note: this should not affect many people.. src/PVE/LXC/Create.pm | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/PVE/LXC/Create.pm b/src/PVE/LXC/Create.pm index 60470b1..ec6d2e5 100644 --- a/src/PVE/LXC/Create.pm +++ b/src/PVE/LXC/Create.pm @@ -122,6 +122,13 @@ sub

[pve-devel] [PATCH container 1/5] fix #996: automatically restore mountpoints from backup

2016-05-30 Thread Fabian Grünbichler
if the mountpoint configuration is not explicitly provided via -rootfs or -mpX , recreate all volume mountpoints on the provided -storage , restore the archive and then finally add non-volume mountpoints back to the configuration. if -rootfs (and optionally any -mpX) are provided, the old

[pve-devel] [PATCH container 3/5] split up create_rootfs and restore_and_configure

2016-05-30 Thread Fabian Grünbichler
these were only used once and their method signatures were already quite long, so split up into - delete old existing container and write new config - mount - restore archive / extract template - restore configuration / setup new container - unmount this also uses the new ignore_ro flag for

[pve-devel] [PATCH container 5/5] support non-existing mount paths

2016-05-30 Thread Fabian Grünbichler
even if the mount target is missing more than one path component. this is still far from ideal, but needed for pct create/restore with complete mountpoint support. --- src/PVE/LXC.pm | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/PVE/LXC.pm

[pve-devel] [PATCH container 2/5] add ignore_ro flag to mount_all

2016-05-30 Thread Fabian Grünbichler
--- src/PVE/LXC.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index 759ab6d..7b4afa2 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -918,7 +918,7 @@ sub umount_all { } sub mount_all { -my ($vmid, $storage_cfg, $conf) = @_; +

[pve-devel] [PATCH container 0/5] improved mountpoint restore

2016-05-30 Thread Fabian Grünbichler
This patch series implements support for the two scenarios from bug #996 along with fixes for some related issues. Tested with pct create/restore and various backups, including some openvz archives. More testing and feedback welcome! Fabian Grünbichler (5): automatically restore mountpoints

[pve-devel] [PATCH v2 container 1/6] automatically restore mountpoints from backup

2016-05-30 Thread Fabian Grünbichler
if the mountpoint configuration is not explicitly provided via -rootfs or -mpX , recreate all volume mountpoints on the provided -storage , restore the archive and then add non-volume mountpoints back to the configuration. if -rootfs (and optionally any -mpX) are provided, the old configuration

[pve-devel] [PATCH v2 container 5/6] support non-existing mount paths

2016-05-30 Thread Fabian Grünbichler
even if the mount target is missing more than one path component. this is still far from ideal, but needed for pct create/restore with mountpoint support --- src/PVE/LXC.pm | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm

[pve-devel] [PATCH v2 container 6/6] don't allow automatic restore to dev/bind rootfs

2016-05-30 Thread Fabian Grünbichler
we cannot delay the rootfs, but we also don't want to automatically restore to a device or bind mount because that might destroy existing data.. only allow this when explicitly requested via -rootfs --- src/PVE/API2/LXC.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git

[pve-devel] [PATCH v2 container 3/6] split up create_rootfs and restore_and_configure

2016-05-30 Thread Fabian Grünbichler
these were only used once and their method signatures were already quite long, so split up into - delete old existing container and write new config - mount - restore archive / extract template - restore configuration / setup new container - unmount --- src/PVE/API2/LXC.pm | 19 +++--

[pve-devel] [PATCH v2 container 0/6] improved mountpoint restore

2016-05-30 Thread Fabian Grünbichler
mount points (like pct create) - unsupported config warning moved to src/PVE/API2/LXC.pm - drop delayed_mp_param hash from recover_config and co, not needed anymore Fabian Grünbichler (6): automatically restore mountpoints from backup add ignore_ro flag to mount_all split up create_rootfs

[pve-devel] [PATCH v2 container 4/6] warn about unsupported backup configuration

2016-05-30 Thread Fabian Grünbichler
--- Note: this should not affect many people.. src/PVE/API2/LXC.pm | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm index 05f457a..3a04fa5 100644 --- a/src/PVE/API2/LXC.pm +++ b/src/PVE/API2/LXC.pm @@ -335,6 +335,13 @@

[pve-devel] [PATCH v2 container 2/6] add ignore_ro flag to mount_all

2016-05-30 Thread Fabian Grünbichler
--- src/PVE/LXC.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index 759ab6d..7b4afa2 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -918,7 +918,7 @@ sub umount_all { } sub mount_all { -my ($vmid, $storage_cfg, $conf) = @_; +

Re: [pve-devel] quorum using Rasberry Pi as node

2016-05-27 Thread Fabian Grünbichler
> Michael Rasmussen hat am 27. Mai 2016 um 00:59 geschrieben: > > > On Tue, 24 May 2016 21:21:29 +0200 > Thomas Lamprecht wrote: > > > > > I would not recommend the first generation for anything else than testing, > > its - not to powerful -

Re: [pve-devel] [PATCH_V4 pve-container 5/5] Add full clone with running CT

2016-06-01 Thread Fabian Grünbichler
comments inline > Wolfgang Link hat am 1. Juni 2016 um 09:22 geschrieben: > > > With this patch it is possible to make a full clone from an running container, > if the underlying Storage provides snapshots. > --- > src/PVE/API2/LXC.pm | 42

Re: [pve-devel] [PATCH_V4 pve-container 2/5] Add move_volume.

2016-06-01 Thread Fabian Grünbichler
comments inline > Wolfgang Link hat am 1. Juni 2016 um 09:22 geschrieben: > > > Now it is possible to move the volume to an other storage. > This works only when the CT is off, to keep the volume consistent. > --- > src/PVE/API2/LXC.pm | 116 >

[pve-devel] [PATCH kernel] move /lib/modules/.../build as file into .deb

2016-06-15 Thread Fabian Grünbichler
this symlink should not be created in the postinst, but simply included in the pve-headers-xx .deb this is a followup to the recently dropped dependency of pve-headers-xx on pve-kernel-xx, and makes this more consistent with how upstream (Ubuntu) handles the creation of this symlink. ---

[pve-devel] [PATCH storage 2/2] fix indentation

2016-06-21 Thread Fabian Grünbichler
--- PVE/Storage/LVMPlugin.pm | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PVE/Storage/LVMPlugin.pm b/PVE/Storage/LVMPlugin.pm index 673d1cc..60a58e5 100644 --- a/PVE/Storage/LVMPlugin.pm +++ b/PVE/Storage/LVMPlugin.pm @@ -194,13 +194,13 @@ sub properties { sub

[pve-devel] [PATCH storage 1/2] add tagged_only option to LVM storage

2016-06-21 Thread Fabian Grünbichler
to filter volumes by the 'pve-vm-ID' tag, which is set on all volumes created via the PVE storage layer. --- Note: this should fix setups like that described in https://forum.proxmox.com/threads/unable-to-migrate-virtual-machines-on-drbd-storage.27757/#post-140699 PVE/Storage/LVMPlugin.pm | 14

[pve-devel] [PATCH container 2/2] add checks from QemuMigrate

2016-06-20 Thread Fabian Grünbichler
the following checks were copied from QemuMigrate and adapted for LXC: - check volumes from current configuration AND snapshots - look for and check lost/found volumes via PVE::Storage - check for local linked clones --- tested with various scenarios using Ceph, ZFS and LVM-Thin. linked clones and

[pve-devel] [PATCH qemu-server] add dependency on DBus

2016-06-20 Thread Fabian Grünbichler
required for our systemd-run replacement (systemd itself only recommends DBus and falls back to an internal IPC mechanism if unavailable) --- control.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/control.in b/control.in index 84841ce..6953ff5 100644 --- a/control.in +++

Re: [pve-devel] [PATCH kvm] fix #406: add qemu-utils to conflicts

2016-06-24 Thread Fabian Grünbichler
applied > Dominik Csapak hat am 22. Juni 2016 um 09:33 > geschrieben: > > > since we ship the same binaries as qemu-utils > (such as qemu-nbd or qemu-img) > > Signed-off-by: Dominik Csapak > --- > debian/control | 2 +- > 1 file changed, 1

[pve-devel] [PATCH qemu-server 2/5] don't repeat storage check for each volid

2016-06-17 Thread Fabian Grünbichler
--- PVE/QemuMigrate.pm | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 3e90a46..e42e5b1 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -237,14 +237,17 @@ sub sync_disks { # get list from

[pve-devel] [PATCH qemu-server 1/5] add @param to foreach_drive

2016-06-17 Thread Fabian Grünbichler
--- PVE/QemuServer.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 4226f50..9f3cc0c 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2645,7 +2645,7 @@ sub vmstatus { } sub foreach_drive { -my ($conf, $func) =

[pve-devel] [PATCH qemu-server 3/5] fix whitespace/indent

2016-06-17 Thread Fabian Grünbichler
--- Note: as a separate patch for readability PVE/QemuMigrate.pm | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index e42e5b1..5bfdc05 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -230,26 +230,26

[pve-devel] [PATCH qemu-server 0/5] QemuMigrate cleanup

2016-06-17 Thread Fabian Grünbichler
this patch series does not change the semantics, but cleans up the code to avoid repeated checks. tested using ceph, lvm-thin, zfs in various combinations. Fabian Grünbichler (5): add @param to foreach_drive don't repeat storage check for each volid fix whitespace/indent use

[pve-devel] [PATCH qemu-server 5/5] drop unncessary cdromhash

2016-06-17 Thread Fabian Grünbichler
--- PVE/QemuMigrate.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index e7a1d8a..1305b5c 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -225,7 +225,6 @@ sub sync_disks { eval { my $volhash = {}; -

[pve-devel] [PATCH qemu-server 4/5] use foreach_drive instead of foreach_volid

2016-06-17 Thread Fabian Grünbichler
foreach_volid recurses over snapshots as well, resulting in lots of repeated checks (especially for VMs with lots of snapshots and disks). a potential vmstate volume must be checked explicitly, because foreach_drive does not care about those. --- PVE/QemuMigrate.pm | 12 ++-- 1 file

[pve-devel] [PATCH qemu-server 0/4] improve local disk and error handling for migration

2016-06-24 Thread Fabian Grünbichler
uickly determine why the migration failed, which was rather unintuitive before when the only information displayed was "ERROR: Failed to sync data - can't do online migration - VM uses local disks" Fabian Grünbichler (4): collect and log origin of found local volumes switch order

[pve-devel] [PATCH qemu-server 1/4] collect and log origin of found local volumes

2016-06-24 Thread Fabian Grünbichler
just knowing that local disks prevent a migration is not very helpful, so be a bit more verbose here. --- PVE/QemuMigrate.pm | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 1305b5c..3b861a5 100644 ---

[pve-devel] [PATCH qemu-server 4/4] collect errors from all local volumes

2016-06-24 Thread Fabian Grünbichler
and then die with more meaningful output, instead of on the first encountered error. --- PVE/QemuMigrate.pm | 64 -- 1 file changed, 52 insertions(+), 12 deletions(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 2b383fa..6415032

[pve-devel] [PATCH qemu-server 3/4] add comments and rename volhash

2016-06-24 Thread Fabian Grünbichler
--- PVE/QemuMigrate.pm | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index b72087b..2b383fa 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -218,13 +218,15 @@ sub sync_disks { my $conf =

[pve-devel] [PATCH qemu-server 2/4] switch order of disk checks

2016-06-24 Thread Fabian Grünbichler
to make log message more meaningful. 'storage' < 'snapshot' < 'config' --- PVE/QemuMigrate.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 3b861a5..b72087b 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -302,12

[pve-devel] [PATCH v2 container 2/3] Check lock for pct start, stop, suspend, shutdown

2016-01-15 Thread Fabian Grünbichler
Correctly error out upon encountering a locked container when doing pct start, pct stop, pct suspend or pct shutdown Signed-off-by: Fabian Grünbichler <f.gruenbich...@proxmox.com> --- src/PVE/API2/LXC/Status.pm | 12 1 file changed, 12 insertions(+) diff --git a/src/PVE/AP

[pve-devel] [PATCH v2 container 1/3] Set backup lock during stop and suspend backups

2016-01-15 Thread Fabian Grünbichler
Correctly set a 'backup' lock while a 'stop' or 'suspend' mode backup is in progress. Signed-off-by: Fabian Grünbichler <f.gruenbich...@proxmox.com> --- src/PVE/VZDump/LXC.pm | 23 +++ 1 file changed, 23 insertions(+) diff --git a/src/PVE/VZDump/LXC.pm b/src/PVE/

[pve-devel] [PATCH v2 container 0/3] Set and check locks for container backups

2016-01-15 Thread Fabian Grünbichler
Fixes: #847 Set locks for suspend and stop backups, Check locks in pct start, pct stop, pct shutdown, pct suspend and lxc-pre-start-hook. Fabian Grünbichler (3): Set backup lock during stop and suspend backups Check lock for pct start, stop, suspend, shutdown Check lock in lxc-pre-start

[pve-devel] [PATCH v2 container 3/3] Check lock in lxc-pre-start-hook script as well

2016-01-15 Thread Fabian Grünbichler
Fixes: #847 Signed-off-by: Fabian Grünbichler <f.gruenbich...@proxmox.com> --- src/lxc-pve-prestart-hook | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lxc-pve-prestart-hook b/src/lxc-pve-prestart-hook index e88911d..1ba957f 100755 --- a/src/lxc-pve-prestart-hook +++ b/src/l

[pve-devel] [PATCH container 2/3] Check lock for pct start, stop, suspend, shutdown

2016-01-15 Thread Fabian Grünbichler
Correctly error out upon encountering a locked container when doing pct start, pct stop, pct suspend or pct shutdown --- src/PVE/API2/LXC/Status.pm | 12 1 file changed, 12 insertions(+) diff --git a/src/PVE/API2/LXC/Status.pm b/src/PVE/API2/LXC/Status.pm index fb5480d..e119211

[pve-devel] [PATCH container 1/3] Set backup lock during stop and suspend backups

2016-01-15 Thread Fabian Grünbichler
Correctly set a 'backup' lock while a 'stop' or 'suspend' mode backup is in progress. --- src/PVE/VZDump/LXC.pm | 23 +++ 1 file changed, 23 insertions(+) diff --git a/src/PVE/VZDump/LXC.pm b/src/PVE/VZDump/LXC.pm index 7f27f0b..7cd557c 100644 --- a/src/PVE/VZDump/LXC.pm +++

[pve-devel] [PATCH container 3/3] Check lock in lxc-pre-start-hook script as well

2016-01-15 Thread Fabian Grünbichler
--- src/lxc-pve-prestart-hook | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lxc-pve-prestart-hook b/src/lxc-pve-prestart-hook index e88911d..1ba957f 100755 --- a/src/lxc-pve-prestart-hook +++ b/src/lxc-pve-prestart-hook @@ -63,6 +63,7 @@ __PACKAGE__->register_method ({ return

[pve-devel] [PATCH cluster 2/2] Use correct key usage in node SSL certificate

2016-01-15 Thread Fabian Grünbichler
--- data/PVE/Cluster.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/data/PVE/Cluster.pm b/data/PVE/Cluster.pm index d325f8f..27e248f 100644 --- a/data/PVE/Cluster.pm +++ b/data/PVE/Cluster.pm @@ -271,8 +271,7 @@ commonName = $fqdn [ v3_req ] basicConstraints =

[pve-devel] [PATCH cluster 1/2] Change CA SSL key size to 4096 bit

2016-01-15 Thread Fabian Grünbichler
--- data/PVE/Cluster.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/PVE/Cluster.pm b/data/PVE/Cluster.pm index 0085316..d325f8f 100644 --- a/data/PVE/Cluster.pm +++ b/data/PVE/Cluster.pm @@ -165,7 +165,7 @@ sub gen_pveca_key { return if -f $pveca_key_fn;

Re: [pve-devel] [PATCH container 1/3] Set backup lock during stop and suspend backups

2016-01-15 Thread Fabian Grünbichler
> Fabian Grünbichler <f.gruenbich...@proxmox.com> hat am 15. Januar 2016 um > 10:03 geschrieben: > > > Correctly set a 'backup' lock while a 'stop' or 'suspend' > mode backup is in progress. This series should fix #847, with one caveat for a similar situation: While

[pve-devel] [PATCH container 1/2] Use lock_container when checking locks

2016-01-19 Thread Fabian Grünbichler
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.gruenbich...@proxmox.com> --- src/PVE/API2/LXC/Status.pm | 83 --

[pve-devel] [PATCH container 2/2] Don't hold flock for whole backup operation

2016-01-19 Thread Fabian Grünbichler
Instead release 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.gruenbich...@proxmox.com> --- src/PVE/VZDump/LXC.pm | 10 +- 1 file changed, 5 insertions

Re: [pve-devel] [PATCH container 2/2] Don't hold flock for whole backup operation

2016-01-19 Thread Fabian Grünbichler
> Fabian Grünbichler <f.gruenbich...@proxmox.com> hat am 19. Januar 2016 um > 11:20 geschrieben: > > @@ -192,16 +196,12 @@ sub prepare { > > sub lock_vm { > my ($self, $vmid) = @_; > - > PVE::LXC::lock_aquire($vmid); > } > >

[pve-devel] [PATCH container 2/2] Fix typo in lxc-checkpoint dump directory

2016-01-19 Thread Fabian Grünbichler
Signed-off-by: Fabian Grünbichler <f.gruenbich...@proxmox.com> --- src/PVE/API2/LXC/Status.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PVE/API2/LXC/Status.pm b/src/PVE/API2/LXC/Status.pm index 8d59436..ec29fe8 100644 --- a/src/PVE/API2/LXC/Status.pm +++

[pve-devel] [PATCH container 1/2] Fix typos in comments, descriptions and messages

2016-01-19 Thread Fabian Grünbichler
Signed-off-by: Fabian Grünbichler <f.gruenbich...@proxmox.com> --- src/PVE/LXC.pm| 24 src/PVE/VZDump/LXC.pm | 15 --- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index 035b3ab..2899fa9

[pve-devel] [PATCH v2 container 0/2] Fix various typos (rebased on master)

2016-01-19 Thread Fabian Grünbichler
The first patch only fixes typos in comments, API descriptions, log and other messages. The second patch fixes a typo in the path given to lxc-checkpoint for container suspend and resume operations. Rebased on master. Fabian Grünbichler (2): Fix typos in comments, descriptions

[pve-devel] [PATCH v2 container 2/2] Fix typo in lxc-checkpoint dump directory

2016-01-19 Thread Fabian Grünbichler
Signed-off-by: Fabian Grünbichler <f.gruenbich...@proxmox.com> --- src/PVE/API2/LXC/Status.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/PVE/API2/LXC/Status.pm b/src/PVE/API2/LXC/Status.pm index e119211..6b468cf 100644 --- a/src/PVE/API2/LXC/Status.pm +++

[pve-devel] [PATCH v2 container 1/2] Fix typos in comments, descriptions and messages

2016-01-19 Thread Fabian Grünbichler
Signed-off-by: Fabian Grünbichler <f.gruenbich...@proxmox.com> --- src/PVE/LXC.pm| 24 src/PVE/VZDump/LXC.pm | 14 +++--- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index 035b3ab..2899fa9

[pve-devel] [PATCH zfsonlinux 4/4] update make upload target

2016-06-28 Thread Fabian Grünbichler
--- Makefile | 26 +- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/Makefile b/Makefile index ba23d7b..15bbbcf 100644 --- a/Makefile +++ b/Makefile @@ -78,28 +78,4 @@ distclean: clean .PHONY: upload upload: ${DEBS} - umount /pve/${RELEASE}; mount

[pve-devel] [PATCH zfsonlinux 3/4] bump versions, update changelogs

2016-06-28 Thread Fabian Grünbichler
--- spl-changelog.Debian | 8 zfs-changelog.Debian | 8 2 files changed, 16 insertions(+) diff --git a/spl-changelog.Debian b/spl-changelog.Debian index 0856608..8cb336b 100644 --- a/spl-changelog.Debian +++ b/spl-changelog.Debian @@ -1,3 +1,11 @@ +spl-linux

[pve-devel] [PATCH zfsonlinux 0/4] Update zfs/spl to 0.6.5.7

2016-06-28 Thread Fabian Grünbichler
Note that this patch series including the source archive update was already applied by me. Fabian Grünbichler (4): update to zfs/spl 0.6.5.7 update zfs/spl source archives bump versions, update changelogs update make upload target Makefile | 40

[pve-devel] [PATCH zfsonlinux 1/4] update to zfs/spl 0.6.5.7

2016-06-28 Thread Fabian Grünbichler
update versioning scheme for backwards compatibility / upgrade paths --- Makefile | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 240fe20..ba23d7b 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,9 @@ RELEASE=4.1 # source form

[pve-devel] [PATCH kernel 2/2] update changelog, bump version to 4.4.13-56

2016-06-28 Thread Fabian Grünbichler
--- Makefile | 2 +- changelog.Debian | 6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8f02ce8..5c3df76 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ RELEASE=4.2 # also update proxmox-ve/changelog if you change KERNEL_VER or

[pve-devel] [PATCH kernel 0/2] Update zfs/spl to 0.6.5.7

2016-06-28 Thread Fabian Grünbichler
Note that this series including a source archive update for pkg-zfs/pkg-spl was already applied by me. Fabian Grünbichler (2): drop zfs patch applied upstream update changelog, bump version to 4.4.13-56 Makefile | 3 +-- changelog.Debian | 6 ++ zfs-fix

[pve-devel] [PATCH kernel-3.10.0] update make upload target

2016-06-29 Thread Fabian Grünbichler
--- Note: already applied Makefile | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Makefile b/Makefile index d8fe8db..4db4ecd 100644 --- a/Makefile +++ b/Makefile @@ -376,16 +376,7 @@ ${FW_DEB} fw: control.firmware linux-firmware.git/WHENCE

[pve-devel] [PATCH kernel-3.10.0] update spl/zfs to 0.6.5.7, bump version

2016-06-29 Thread Fabian Grünbichler
--- Note: already applied, including source archive update Makefile | 2 +- changelog.Debian | 6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1fc80e5..d8fe8db 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ RELEASE=3.4

[pve-devel] [PATCH firewall] Don't leave empty FW config files behind

2016-02-08 Thread Fabian Grünbichler
Unlink FW config files instead of setting their content to nothing. --- Note: this is a followup to Wolfgang's fix for #885 src/PVE/Firewall.pm | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm index

[pve-devel] [PATCH v2 container] Improve error handling in snapshot_create

2016-02-08 Thread Fabian Grünbichler
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. Combine existing code from snapshot_commit with a call to snapshot_delete to create the new method snapshot_abort. This

Re: [pve-devel] [PATCH container] Only add actual volumes to volid_list

2016-02-04 Thread Fabian Grünbichler
> Wolfgang Bumiller <w.bumil...@proxmox.com> hat am 4. Februar 2016 um 11:21 > geschrieben: > > > On Thu, Feb 04, 2016 at 11:08:05AM +0100, Fabian Grünbichler wrote: > > skip /dev and bind mounts, otherwise stop backups will > > fail in parse_volume_id. >

[pve-devel] [PATCH container] Remove mknod call from pre-start hook

2016-02-04 Thread Fabian Grünbichler
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

[pve-devel] [PATCH container] Improve error handling in snapshot_create

2016-02-04 Thread Fabian Grünbichler
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. Add a call to snapshot_commit in its own eval block to the error handling code, because we want to cleanup and unlock

Re: [pve-devel] [PATCH v3 container] Improve error handling in snapshot_create

2016-02-10 Thread Fabian Grünbichler
> Dietmar Maurer hat am 11. Februar 2016 um 06:56 > geschrieben: > > > applied - but the logic in snapshot_delete looks still wrong to me. The > qemu-server > implementation locks more reasonable to me. I will further harmonize the code paths when implementing mountpoint

[pve-devel] [PATCH qemu-server] Refactor update_config_nolock -> write_config

2016-02-12 Thread Fabian Grünbichler
The method update_config wrapped update_config_nolock using lock_config, but to prevent update races the whole "read config", "do something", "write config" flow was always protected by lock_config anyway, and update_config was never called. Thus, we can safely drop update_config and rename

[pve-devel] [PATCH rebased container] Refactor lock_container into lock_config_[xx]

2016-02-11 Thread Fabian Grünbichler
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

[pve-devel] [PATCH v2 qemu-server 0/2] write_config harmonization

2016-02-12 Thread Fabian Grünbichler
Two patches that prepare for common config write code paths. The implementation of write_config for Qemu is now identical to that in LXC. Fabian Grünbichler (2): Refactor update_config_nolock -> write_config Drop skiplock from write_config PVE/API2/Qemu.pm |

[pve-devel] [PATCH v2 qemu-server 2/2] Drop skiplock from write_config

2016-02-12 Thread Fabian Grünbichler
Since write_config was always called with skiplock=1 except once, it makes sense to drop this parameter like in PVE::LXC::write_config . If needed in the future, the caller can use check_lock before write_config anyway. --- PVE/API2/Qemu.pm | 24 PVE/CLI/qm.pm | 2

[pve-devel] [PATCH container] VZDump lock update, drop lock_aquire/lock_release

2016-02-10 Thread Fabian Grünbichler
Since VZDump was the only user of lock_aquire and lock_release, and does not actually need this split, we can merge lock_aquire and lock_release into lock_container. --- This allows us to drop the locking code from lock_container altogether as soon as the refcounting patch for

[pve-devel] [RFC PATCH common] Implement refcounting for flocks

2016-02-09 Thread Fabian Grünbichler
This was already implemented in PVE::LXC::lock_aquire() and lock_release(). Enabling refcounting in the general PVE::Tools::lock_file() and lock_file_full() methods allows us to use one code base for flocking. Furthermore, we could get rid of various xx_no_lock methods that were required because

[pve-devel] [PATCH v3 container] Improve error handling in snapshot_create

2016-02-10 Thread Fabian Grünbichler
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

[pve-devel] [PATCH container] Refactor lock_container into lock_config_[xx]

2016-02-11 Thread Fabian Grünbichler
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

[pve-devel] [PATCH container] Add missing use statement

2016-02-11 Thread Fabian Grünbichler
--- Please apply and rebuild/publish packages! Sorry for the mishap! src/PVE/LXC.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index f7f468a..a2cb67d 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -14,7 +14,7 @@ use PVE::Storage; use

[pve-devel] [PATCH rebased container] Refactor lock_container into lock_config_[xx]

2016-02-11 Thread Fabian Grünbichler
, $conf); }; -PVE::LXC::lock_container($vmid, 10, $lockconfig, ($self, $vmid)); +PVE::LXC::lock_config($vmid, $lockconfig, ($self, $vmid)); } sub unlock_vm { @@ -202,7 +202,7 @@ sub unlock_vm { } }; -PVE::LXC::lock_container($vmid, 60, $unlockconfig, ($s

  1   2   3   4   5   6   7   8   9   10   >