[pve-devel] Fwd: Re: [PATCH] Pass what storage ID is being used to vzdump hook scripts

Mark Casey markc at unifiedgroup.com
Thu Sep 12 01:29:11 CEST 2013


forgot cc :)

-------- Original Message --------
Subject: 	Re: [pve-devel] [PATCH] Pass what storage ID is being used to 
vzdump hook scripts
Date: 	Wed, 11 Sep 2013 18:22:04 -0500
From: 	Mark Casey <markc at unifiedgroup.com>
To: 	Dietmar Maurer <dietmar at proxmox.com>



I set some git config options and regenerated. Is this one OK?

Thanks

On 9/11/2013 12:09 AM, Dietmar Maurer wrote:
>> Signed-off-by: Local User <luser at proxdev.unifiedgroup.com>
> Please can you sign with your email address?
>
>> -----Original Message-----
>> From: pve-devel-bounces at pve.proxmox.com [mailto:pve-devel-
>> bounces at pve.proxmox.com] On Behalf Of Mark Casey
>> Sent: Dienstag, 10. September 2013 19:49
>> To: pve-devel at pve.proxmox.com
>> Subject: Re: [pve-devel] [PATCH] Pass what storage ID is being used to vzdump
>> hook scripts
>>
>> This version includes a mention in the sample hook script, which I forgot to
>> include in the first version.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20130911/4d1be2f5/attachment.htm>
-------------- next part --------------
>From 815cac359e0b41b55da7c1eaa8dc06c081f09b9c Mon Sep 17 00:00:00 2001
From: Local User <luser at proxdev.unifiedgroup.com>
Date: Tue, 10 Sep 2013 12:40:10 -0500
Subject: [PATCH] Pass what storage ID is being used to vzdump hook scripts


Signed-off-by: Mark Casey <markc at unifiedgroup.com>
---
 PVE/VZDump.pm         |    4 ++--
 vzdump-hook-script.pl |    2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index e749938..0bef3fd 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -646,7 +646,7 @@ sub run_hook_script {
 
     local %ENV;
 
-    foreach my $ek (qw(vmtype dumpdir hostname tarfile logfile)) {
+    foreach my $ek (qw(vmtype dumpdir hostname tarfile logfile storeid)) {
 	$ENV{uc($ek)} = $task->{$ek} if $task->{$ek};
     }
 
@@ -764,7 +764,7 @@ sub exec_backup_task {
 	    die "unable to create log file '$tmplog'";
 
 	$task->{dumpdir} = $opts->{dumpdir};
-
+	$task->{storeid} = $opts->{storage};
 	$task->{tmplog} = $tmplog;
 
 	unlink $logfile;
diff --git a/vzdump-hook-script.pl b/vzdump-hook-script.pl
index 27075dc..b345677 100755
--- a/vzdump-hook-script.pl
+++ b/vzdump-hook-script.pl
@@ -29,6 +29,8 @@ if ($phase eq 'job-start' ||
 
     my $dumpdir = $ENV{DUMPDIR};
 
+    my $storeid = $ENV{STOREID};
+
     my $hostname = $ENV{HOSTNAME};
 
     # tarfile is only available in phase 'backup-end'
-- 
1.5.4.3




More information about the pve-devel mailing list