[pve-devel] [PATCH v2 pve-common] added 'extra-args' CLI handling

2015-09-01 Thread Wolfgang Bumiller
added 'extra-args' standard option added 'extra-args' handling to PVE::JSONSchema::get_options untainting 'extra-args' separately in RESTHandler::handle --- src/PVE/JSONSchema.pm | 19 --- src/PVE/RESTHandler.pm | 2 ++ 2 files changed, 18 insertions(+), 3 deletions(-) diff

[pve-devel] [PATCH v2 pve-container] added pct exec

2015-09-01 Thread Wolfgang Bumiller
Using the new 'extra-args' options for command arguments. Examples: # pct exec 100 ls / # pct exec 100 -- ls -l / --- src/pct | 27 +++ 1 file changed, 27 insertions(+) diff --git a/src/pct b/src/pct index 6821ea3..62ca45b 100755 --- a/src/pct +++ b/src/pct @@ -86,6

[pve-devel] [PATCH pve-container] added pct exec

2015-09-01 Thread Wolfgang Bumiller
Using the new 'extra-args' options for command arguments. Examples: # pct exec 100 ls / # pct exec 100 -- ls -l / --- src/pct | 27 +++ 1 file changed, 27 insertions(+) diff --git a/src/pct b/src/pct index 6821ea3..9e0a843 100755 --- a/src/pct +++ b/src/pct @@ -86,6

[pve-devel] [PATCH] fix: this will prevent the undefined message if the config file dos not exist.

2015-09-01 Thread Wolfgang Link
e.g. datacenter.cfg is optional and produce at start of a Vm an error if it is missing. --- src/PVE/JSONSchema.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index 2837cf5..d40692f 100644 --- a/src/PVE/JSONSchema.pm +++

Re: [pve-devel] [PATCH] HA parse_sid changed to accept CT

2015-09-01 Thread Dietmar Maurer
On 08/31/2015 03:48 PM, Alen Grizonic wrote: --- @@ -69,8 +70,14 @@ sub parse_sid { if ($sid =~ m/^(\d+)$/) { $name = $1; - $type ='vm'; - $sid = "vm:$name"; + my $vmlist = PVE::Cluster::get_vmlist(); + my $type = $vmlist->{ids}->{$name}->{type};

Re: [pve-devel] [PATCH v2 pve-common] added 'extra-args' CLI handling

2015-09-01 Thread Dietmar Maurer
On 09/01/2015 09:16 AM, Wolfgang Bumiller wrote: foreach my $p (@$arg_param) { + if ($p eq 'extra-args') { + die 'internal error: extra-args must be the last argument' if $opts->{'extra_args'}; + $opts->{'extra-args'} = $args;

[pve-devel] [PATCH v3 pve-common] added 'extra-args' CLI handling

2015-09-01 Thread Wolfgang Bumiller
added 'extra-args' standard option added 'extra-args' handling to PVE::JSONSchema::get_options untainting 'extra-args' separately in RESTHandler::handle --- src/PVE/JSONSchema.pm | 25 - src/PVE/RESTHandler.pm | 2 ++ 2 files changed, 22 insertions(+), 5 deletions(-)

Re: [pve-devel] Bug? Resize is not possible

2015-09-01 Thread Wolfgang Bumiller
On Tue, Sep 01, 2015 at 11:45:11AM +0200, Detlef Bracker wrote: > Dear, > > I can doe what I will, the /vdb1 in qcow2 OR now in raw-Format has 61,4 GB > They use 512 Byte Blocks: > > root@localhost:~# fdisk -l > (...) > > Disk /dev/vdb: 64.4 GB, 64424509440 bytes > 4 heads, 32 sectors/track,

[pve-devel] [PATCH] Add CT service support and remove type parameter

2015-09-01 Thread Thomas Lamprecht
The type parameter is not needed anymore because the service type can be extracted by only using the unique vmid. Signed-off-by: Thomas Lamprecht --- www/manager/ha/ResourceEdit.js | 6 ++ www/manager/ha/Resources.js| 4 ++-- 2 files changed, 4 insertions(+), 6

[pve-devel] Bug? Resize is not possible

2015-09-01 Thread Detlef Bracker
Dear, I can doe what I will, the /vdb1 in qcow2 OR now in raw-Format has 61,4 GB They use 512 Byte Blocks: root@localhost:~# fdisk -l Disk /dev/vda: 21.5 GB, 21474836480 bytes 4 heads, 32 sectors/track, 327680 cylinders, total 41943040 sectors Units = sectors of 1 * 512 = 512 bytes Sector size

[pve-devel] [PATCH v3] HA parse_sid changed to accept CT

2015-09-01 Thread Alen Grizonic
[PATCH v3] changes: - fixed VM/CT exist check - added internal error exception --- src/PVE/HA/Tools.pm | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/PVE/HA/Tools.pm b/src/PVE/HA/Tools.pm index 94613de..f3f6110 100644 --- a/src/PVE/HA/Tools.pm +++

[pve-devel] [PATCH v4] HA parse_sid changed to accept CT

2015-09-01 Thread Alen Grizonic
[PATCH v4] changes: - fixed VM/CT exist check - added internal error exception - changed/fixed description message --- src/PVE/HA/Tools.pm | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/PVE/HA/Tools.pm b/src/PVE/HA/Tools.pm index 94613de..896b7ab

[pve-devel] [PATCH 2/2] fixed call for cfg file and error when CT is running and on local storage

2015-09-01 Thread Thomas Lamprecht
When trying to migrate only throw an error when the CT is on an non shared storage AND running. Also fixed an remaining PVE::OpenVZ call to LXC. Signed-off-by: Thomas Lamprecht --- src/PVE/LXC/Migrate.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[pve-devel] [PATCH 1/2] Removing dead code from CT stop call and fixing typo

2015-09-01 Thread Thomas Lamprecht
Signed-off-by: Thomas Lamprecht --- src/PVE/API2/LXC/Status.pm | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/PVE/API2/LXC/Status.pm b/src/PVE/API2/LXC/Status.pm index bfd851f..14a4415 100644 --- a/src/PVE/API2/LXC/Status.pm +++

[pve-devel] [PATCH pve-lxc] Enhange pct man page with DESCRIPTION, EXAMPLES, FILES, SEE ALSO

2015-09-01 Thread Emmanuel Kasper
--- src/pct | 53 +++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/src/pct b/src/pct index 6821ea3..155650d 100755 --- a/src/pct +++ b/src/pct @@ -159,7 +159,7 @@ __END__ =head1 NAME -pct - Tool to manage Linux Containers on

[pve-devel] [PATCH v2] HA parse_sid changed to accept CT

2015-09-01 Thread Alen Grizonic
[PATCH v2] changes -> VM/CT exist check added --- src/PVE/HA/Config.pm | 1 + src/PVE/HA/Tools.pm | 20 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/PVE/HA/Config.pm b/src/PVE/HA/Config.pm index 58f5b58..b860abc 100644 --- a/src/PVE/HA/Config.pm +++

Re: [pve-devel] [PATCH] HA parse_sid changed to accept CT

2015-09-01 Thread Dietmar Maurer
> Also note that "colon" (:) only has one "l"... Thanks for that hint - we just fixed it. ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

[pve-devel] [PATCH] improve pveupdate with random start time

2015-09-01 Thread Wolfgang Link
this is important to avoid that all PVE nodes start the update procedure at the same time --- bin/Makefile| 5 ++- bin/cron/Makefile | 6 --- bin/cron/daily/Makefile | 15 --- bin/cron/daily/pve | 101 bin/pveupdate

Re: [pve-devel] Bug? Resize is not possible

2015-09-01 Thread Wolfgang Bumiller
Please use the 'Reply-All' button in your mail-client or otherwise make sure you include the 'Cc: pve-devel@pve.proxmox.com' part. On Tue, Sep 01, 2015 at 12:13:28PM +0200, Detlef Bracker wrote: > Dear: > > root@localhost:~# fdisk -l /dev/vdb > > Disk /dev/vdb: 64.4 GB, 64424509440 bytes > 4

[pve-devel] [PATCH v2 pve-lxc] Enhance pct man page with DESCRIPTION, EXAMPLES, FILES, SEE ALSO sections

2015-09-01 Thread Emmanuel Kasper
--- src/pct | 50 -- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/src/pct b/src/pct index 6821ea3..f1a3d0a 100755 --- a/src/pct +++ b/src/pct @@ -159,7 +159,7 @@ __END__ =head1 NAME -pct - Tool to manage Linux Containers on

Re: [pve-devel] Bug? Resize is not possible

2015-09-01 Thread Detlef Bracker
Hallo Wolfgang, oh, I hope, that I use in feature everytime the "Answer to all" button instead of "answer"! Thanks for your perfekt information and this is a genial trick to toe this with fdisk - many thanks! I have search more as 2 working days for an other resultion before and this will help

[pve-devel] [RFC v2 1/3] Adding PVECT resource class so that CT can be HA managed

2015-09-01 Thread Thomas Lamprecht
Extend the PVEVM resource class and add a PVECT resource class so that service type specific operations (e.g.: start, migrate, ...) can be handled through an plugin and so independent of the service type. Signed-off-by: Thomas Lamprecht --- src/PVE/HA/Resources.pm | 124

[pve-devel] [RFC v2 3/3] Replacing hardcoded qemu commands with plugin calls

2015-09-01 Thread Thomas Lamprecht
Now a service specific plugin gets loaded and the calls to commands like 'migrate' or 'stop' will be handled by the plugin. Signed-off-by: Thomas Lamprecht --- src/PVE/HA/Env/PVE2.pm | 94 ++ 1 file changed, 41

[pve-devel] [RFC v2 2/3] Fixed hardcoded type 'vm' in check if vm is ha managed

2015-09-01 Thread Thomas Lamprecht
The new approach checks every registered resource type. Signed-off-by: Thomas Lamprecht --- src/PVE/HA/Config.pm | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/PVE/HA/Config.pm b/src/PVE/HA/Config.pm index 58f5b58..a9913da 100644

[pve-devel] [PATCH v2] Add CT service support and remove type parameter

2015-09-01 Thread Thomas Lamprecht
The type parameter is not needed anymore because the service type can be extracted by only using the unique vmid. Signed-off-by: Thomas Lamprecht --- Changes since v1: * fixed hardcoded 'vm' when editing service www/manager/ha/ResourceEdit.js | 8 +++-

[pve-devel] pve-qemu-kvm fixes

2015-09-01 Thread Alexandre Derumier
2 small fixes, details are in commits ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

[pve-devel] [PATCH 2/2] fix q35 pci passthrough

2015-09-01 Thread Alexandre Derumier
revert commit b8eb5512fd8a115f164edbbe897cdf8884920ccb bug report: http://forum.proxmox.com/threads/23346-Proxmox-4b1-q35-machines-failing-to-reboot-problems-with-PCI-passthrough https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg03281.html Signed-off-by: Alexandre Derumier

[pve-devel] [PATCH 1/2] add depend on libjpeg62-turbo

2015-09-01 Thread Alexandre Derumier
previously on wheezy, we build qemu with libjpeg8. (qemu depend on libsdl, which depend on libjpeg) But this package is missing is jessie (because of a last minute bug). But that mean that upgrading from wheezy to jessie, keep the old wheezy libjpeg8. (and libjpeg8-dev). So, it's better to add

[pve-devel] [RFC pve-container 1/2] add support to add mountpoints with pct set

2015-09-01 Thread Wolfgang Bumiller
made create_disk non-private made print_ct_mountpoint include 'mp=' unless 'nomp' is set added an mkdirs flag to mount_all added support to mount_all to have an array specified as $format_raw_images to limit formatting to new disks. create and format new disks simply by calling mount_all

[pve-devel] [RFC pve-container 2/2] destroy owned mountpoints on pct destroy

2015-09-01 Thread Wolfgang Bumiller
--- src/PVE/LXC.pm | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index bf2a964..5f23532 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -1263,11 +1263,12 @@ sub get_primary_ips { sub destroy_lxc_container { my

[pve-devel] [RFC pve-container 0/2] mountpoint handling with pct set/destroy

2015-09-01 Thread Wolfgang Bumiller
With qemu we can use 'qm set $ID -type$ID storage:size', so it makes sense to similarly support 'pct set $ID -mp$ID storage:size,mp=someplace' Here's at a functioning draft of a patch. There were a few issues to iron out (print_ct_mountpoint didn't include mp=, since it was only used for the

[pve-devel] [RFC pve-container] Do not abort a backup when detecting a mountpoint, but give a warning

2015-09-01 Thread Emmanuel Kasper
At the momment we abort the vzdump backup of a container which contain mount points. IIRC Currently mount points won't be backed up because: A) we call the tar command with --on-filesystem option ( this will exclude: mp0: /home,mp=/home bind mounts ) and B) PVE::LXC::attach_loops works with

Re: [pve-devel] [PATCH pve-container] skip lxc hooks on non-PVE containers

2015-09-01 Thread Dietmar Maurer
I now get warning during 'make dinstall' make[2]: Entering directory '/home/dietmar/pve4-devel/pve-container/build' perl -I. -T ./lxc-pve-prestart-hook printmanpod >lxc-pve-prestart-hook.1.pod Use of uninitialized value $ENV{"LXC_NAME"} in pattern match (m//) at ./lxc-pve-prestart-hook line 6,