Re: [pve-devel] [PATCH 1/4] code cleanup and man

2015-06-12 Thread Dietmar Maurer

I am confused now:

applying: code cleanup and man
/home/dietmar/pve2-devel/pve-zsync/.git/rebase-apply/patch:142: trailing 
whitespace.


error: patch failed: pve-zsync:362
error: pve-zsync: patch does not apply
Patch failed at 0001 code cleanup and man


On 06/12/2015 10:55 AM, Wolfgang Link wrote:

Signed-off-by: Wolfgang Link w.l...@proxmox.com
---
  pve-zsync | 54 +-
  1 file changed, 29 insertions(+), 25 deletions(-)

diff --git a/pve-zsync b/pve-zsync
index 3c134ce..cd2a228 100644
--- a/pve-zsync
+++ b/pve-zsync
@@ -362,7 +362,7 @@ sub format_job {
  my ($job, $line) = @_;
  my $text = ;
  
-if ($job-{state} eq stoped) {

+if ($job-{state} eq stopped) {
$text = #;
  }
  if ($line) {
@@ -508,7 +508,7 @@ sub sync {
my ($source, $dest, $job, $param, $date) = @_;
  
  	($source-{old_snap},$source-{last_snap}) = snapshot_get($source, $dest, $param-{maxsnap}, $param-{name});

-   print Dumper $source, $dest;
+
eval{
snapshot_add($source, $dest, $param-{name}, $date);
  
@@ -888,7 +888,7 @@ sub disable_job {

  my ($param) = @_;
  
  my $job = get_job($param);

-$job-{state} = stoped;
+$job-{state} = stopped;
  update_state($job);
  update_cron($job);
  }
@@ -1122,65 +1122,65 @@ pve-zsync help cmd [OPTIONS]
  
  pve-zsync create -dest string -source string [OPTIONS]
  
-  Create a sync Job

+Create a sync Job
  
-  -dest  string

+-dest  string
  
  		the destination target is like [IP]:Pool[/Path]
  
-  -limit integer

+-limit integer
  
  		max sync speed in kBytes/s, default unlimited
  
-  -maxsnap   string

+-maxsnap   string
  
  		how much snapshots will be kept before get erased, default 1
  
-  -name  string

+-name  string
  
  		name of the sync job, if not set it is default
  
-  -skip  boolean

+-skip  boolean
  
  		if this flag is set it will skip the first sync
  
-  -sourcestring

+-sourcestring
  
  		the source can be an VMID or [IP:]ZFSPool[/Path]
  
  pve-zsync destroy -source string [OPTIONS]
  
-  remove a sync Job from the scheduler

+remove a sync Job from the scheduler
  
-  -name  string

+-name  string
  
  		name of the sync job, if not set it is default
  
-  -sourcestring

+-sourcestring
  
  the source can be an  VMID or [IP:]ZFSPool[/Path]
  
  pve-zsync disable -source string [OPTIONS]
  
-  pause a sync job

+pause a sync job
  
-  -name  string

+-name  string
  
  		name of the sync job, if not set it is default
  
-  -sourcestring

+-sourcestring
  
  the source can be an  VMID or [IP:]ZFSPool[/Path]
  
  pve-zsync enable -source string [OPTIONS]
  
-  enable a syncjob and reset error

+enable a syncjob and reset error
  
-  -name  string

+-name  string
  
  		name of the sync job, if not set it is default
  
-  -sourcestring

+-sourcestring
  
  the source can be an  VMID or [IP:]ZFSPool[/Path]

  pve-zsync list
@@ -1203,16 +1203,16 @@ pve-zsync sync -dest string -source string [OPTIONS]
  
  		max sync speed in kBytes/s, default unlimited
  
- -maxsnap   integer

+-maxsnap   integer
  
  		how much snapshots will be kept before get erased, default 1
  
- -name  string

+-name  string
  
  		name of the sync job, if not set it is default.

It is only necessary if scheduler allready contains this source.
  
-  -sourcestring

+-sourcestring
  
  		the source can be an VMID or [IP:]ZFSPool[/Path]
  
@@ -1233,10 +1233,14 @@ add sync job from local VM to remote ZFS Server

  pve-zsync create -source=100 -dest=192.168.1.2:zfspool
  
  =head1 IMPORTANT FILES

+
+Cron jobs are stored at /etc/cron.d/pve-zsync
+
+The VM config get copied on the destination machine to  /var/pve-zsync/
+
+The config is stored at /var/pve-zsync/
  
-Where the cron jobs are stored/etc/cron.d/pve-zsync

-Where the VM config get copied on the destination machine /var/pve-zsync/
-Where the config is stored/var/pve-zsync/
+=head1 COPYRIGHT AND DISCLAIMER
  
  Copyright (C) 2007-2015 Proxmox Server Solutions GmbH
  



___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH 1/4] code cleanup and man

2015-06-12 Thread Wolfgang Link
Signed-off-by: Wolfgang Link w.l...@proxmox.com
---
 pve-zsync | 54 +-
 1 file changed, 29 insertions(+), 25 deletions(-)

diff --git a/pve-zsync b/pve-zsync
index 3c134ce..cd2a228 100644
--- a/pve-zsync
+++ b/pve-zsync
@@ -362,7 +362,7 @@ sub format_job {
 my ($job, $line) = @_;
 my $text = ;
 
-if ($job-{state} eq stoped) {
+if ($job-{state} eq stopped) {
$text = #;
 }
 if ($line) {
@@ -508,7 +508,7 @@ sub sync {
my ($source, $dest, $job, $param, $date) = @_;
 
($source-{old_snap},$source-{last_snap}) = snapshot_get($source, 
$dest, $param-{maxsnap}, $param-{name});
-   print Dumper $source, $dest;
+
eval{
snapshot_add($source, $dest, $param-{name}, $date);
 
@@ -888,7 +888,7 @@ sub disable_job {
 my ($param) = @_;
 
 my $job = get_job($param);
-$job-{state} = stoped;
+$job-{state} = stopped;
 update_state($job);
 update_cron($job);
 }
@@ -1122,65 +1122,65 @@ pve-zsync help cmd [OPTIONS]
 
 pve-zsync create -dest string -source string [OPTIONS]
 
-  Create a sync Job
+Create a sync Job
 
-  -dest  string
+-dest  string
 
the destination target is like [IP]:Pool[/Path]
 
-  -limit integer
+-limit integer
 
max sync speed in kBytes/s, default unlimited
 
-  -maxsnap   string
+-maxsnap   string
 
how much snapshots will be kept before get erased, default 1
 
-  -name  string
+-name  string
 
name of the sync job, if not set it is default
 
-  -skip  boolean
+-skip  boolean
 
if this flag is set it will skip the first sync
 
-  -sourcestring
+-sourcestring
 
the source can be an VMID or [IP:]ZFSPool[/Path]
 
 pve-zsync destroy -source string [OPTIONS]
 
-  remove a sync Job from the scheduler
+remove a sync Job from the scheduler
 
-  -name  string
+-name  string
 
name of the sync job, if not set it is default
 
-  -sourcestring
+-sourcestring
 
 the source can be an  VMID or [IP:]ZFSPool[/Path]
 
 pve-zsync disable -source string [OPTIONS]
 
-  pause a sync job
+pause a sync job
 
-  -name  string
+-name  string
 
name of the sync job, if not set it is default
 
-  -sourcestring
+-sourcestring
 
 the source can be an  VMID or [IP:]ZFSPool[/Path]
 
 pve-zsync enable -source string [OPTIONS]
 
-  enable a syncjob and reset error
+enable a syncjob and reset error
 
-  -name  string
+-name  string
 
name of the sync job, if not set it is default
 
-  -sourcestring
+-sourcestring
 
 the source can be an  VMID or [IP:]ZFSPool[/Path]
 pve-zsync list
@@ -1203,16 +1203,16 @@ pve-zsync sync -dest string -source string [OPTIONS]
 
max sync speed in kBytes/s, default unlimited
 
- -maxsnap   integer
+-maxsnap   integer
 
how much snapshots will be kept before get erased, default 1
 
- -name  string
+-name  string
 
name of the sync job, if not set it is default.
It is only necessary if scheduler allready contains this source.
 
-  -sourcestring
+-sourcestring
 
the source can be an VMID or [IP:]ZFSPool[/Path]
 
@@ -1233,10 +1233,14 @@ add sync job from local VM to remote ZFS Server
 pve-zsync create -source=100 -dest=192.168.1.2:zfspool
 
 =head1 IMPORTANT FILES
+ 
+Cron jobs are stored at /etc/cron.d/pve-zsync
+
+The VM config get copied on the destination machine to  /var/pve-zsync/
+
+The config is stored at /var/pve-zsync/
 
-Where the cron jobs are stored/etc/cron.d/pve-zsync
-Where the VM config get copied on the destination machine /var/pve-zsync/
-Where the config is stored/var/pve-zsync/
+=head1 COPYRIGHT AND DISCLAIMER
 
 Copyright (C) 2007-2015 Proxmox Server Solutions GmbH
 
-- 
2.1.4


___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH 2/4] fix incremental sync

2015-06-12 Thread Wolfgang Link
wrong snapshot where be used.

Signed-off-by: Wolfgang Link w.l...@proxmox.com
---
 pve-zsync | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pve-zsync b/pve-zsync
index cd2a228..0023aad 100644
--- a/pve-zsync
+++ b/pve-zsync
@@ -796,7 +796,7 @@ sub send_image {
 $cmd .= -v  if $param-{verbose};
 
 if($source-{last_snap}  snapshot_exist($source ,$dest, 
$param-{method})) {
-   $cmd .= -i $source-{all}\@$source-{old_snap} 
$source-{all}\@$source-{new_snap} ;
+   $cmd .= -i $source-{all}\@$source-{last_snap} 
$source-{all}\@$source-{new_snap} ;
 } else {
$cmd .= $source-{all}\@$source-{new_snap} ;
 }
-- 
2.1.4


___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH 4/4] bump version 1.5-2

2015-06-12 Thread Wolfgang Link
Signed-off-by: Wolfgang Link w.l...@proxmox.com
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 905deda..5c31a28 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ RELEASE=3.4
 
 VERSION=1.5
 PACKAGE=pve-zsync
-PKGREL=1
+PKGREL=2
 
 DESTDIR=
 PREFIX=/usr
-- 
2.1.4


___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] RFC: qemu-server : add cloudinit support

2015-06-12 Thread Wolfgang Bumiller
 On June 12, 2015 at 9:35 AM Alexandre DERUMIER aderum...@odiso.com wrote:
 dpkg-configure cloud-init , and choose configdrive as only datasource.
 
 I think at start, cloud-init ask to his datasources if they are a new config.

Right, if you can disable this behavior then that's fine. Just need to somewhere
document that it's recommended to disable all the other unused datasources.

 But if you change the uuid a new directory appears in 
 /var/lib/cloud/instances without the old ones disappearing. New files on 
 every applied update. 
 
 Maybe I'm missing something obvious...? 
 I need to check that, I thinked that only the the symlink
 /var/lib/cloud/instance --- /var/lib/cloud/instances/currentuuid/
 was applied.

Applied, yes, but the old directory still exists. The symlink is updated to the
new one.

 Maybe this is what about merge is doing ?
 http://cloudinit.readthedocs.org/en/latest/topics/merging.html

Perhaps. They only list «#include» as example though.

So,
basically, cloud-init does configuration instances which are applied
only once (but weirdly updated multiple times), and searches all of
the *guest*'s configured data sources.

Meaning much of the functionality depends on the guest system, and the
default configuration of most cloud-init packages is to just test all
data-sources.

This situation might need to be reflected in the GUI. If we simply
have an entry to type in a network configuration etc. there would be
no guarantee that it's even applied, because whether this will happen
is the guest's choice.

Here's a thought:
Maybe in order to reflect this situation the web UI could simply have
a (possibly even VM independent?) way of creating and manipulating a
config-drive (even if it's just network configuration and maybe a list
of ssh-keys), perhaps with a simple counter for an instance ID. And
you can attach a config drive from a list similarly to how you attach
an ISO image as cdrom (and from the CLI it would be a single option
like -configdisk ID, or -configdisk /path/ot/disk).
Because it's really more like a support-feature for a guest-feature
than providing a general feature on the PVE side.

Thoughts?

___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel