amvault $config_overrides

2010-11-04 Thread Gunnarsson, Gunnar
Hi,

I a minor issue regarding  $config_overrides that are not beeing propagated to 
the call in amreport thus ignoring setting
such as tapettype mailto etc.

debug(invoking amreport..);
 system($sbindir/amreport, $self-{'config_name'}, --from-amdump\
);


Thanks Gunnar Gunnarsson



amanda 3.1.2 on Solaris 10x86

2010-11-04 Thread Brian Cuttler

client==server

# amdump ran perfectly otherwise. Periodically we see errors
like this, but we've had pretty good runs since the installation
of 3.1.2.

- Forwarded message from Amanda/Cascade ama...@wadsworth.org -

These dumps were to tape Cascade43.
The next 2 tapes Amanda expects to use are: Cascade44, Cascade45.
FAILURE DUMP SUMMARY:
  cascade /cascadep/nalm/alm2 lev 0  FAILED [too many dumper retry: [request 
failed: timeout waiting for ACK]]

STRANGE DUMP SUMMARY:
  cascade /cascadep/export/shain lev 1  STRANGE (see below)

STRANGE DUMP DETAILS:
  /-- cascade /cascadep/export/shain lev 1 STRANGE
  ? Script 'amzfs-snapshot' command 'PRE-DLE-BACKUP': Can't use string () as 
a symbol ref while strict refs in use at 
/usr/perl5/site_perl/5.8.4/Amanda/Script_App.pm line 120.
  ? Script 'amzfs-snapshot' command 'PRE-DLE-BACKUP' exited with status 9: see 
/tmp/amanda/client/cascade/sendbackup.20101103183611.debug
  sendbackup: info BACKUP=APPLICATION
  sendbackup: info APPLICATION=amstar
  sendbackup: info RECOVER_CMD=/usr/local/bin/gzip -dc 
|/usr/local/libexec/amanda/application/amstar restore [./file-to-restore]+
  sendbackup: info COMPRESS_SUFFIX=.gz
  sendbackup: info end
  | Type of this level 1  dump: full
  | Date of this level 1  dump: Wed Nov  3 18:36:12 2010
  | Date of last level 0  dump: Wed Oct  6 18:31:57 2010
  | /opt/schily/bin/star: 2110149 blocks + 0 bytes (total of 21607925760 bytes 
= 21101490.00k).
  | Dump record  level 1  dump: Wed Nov  3 18:36:12 2010 written
  sendbackup: size 21101490
  sendbackup: end
  \

(brought to you by Amanda version 3.1.2)

---
   Brian R Cuttler brian.cutt...@wadsworth.org
   Computer Systems Support(v) 518 486-1697
   Wadsworth Center(f) 518 473-6384
   NYS Department of HealthHelp Desk 518 473-0773



IMPORTANT NOTICE: This e-mail and any attachments may contain
confidential or sensitive information which is, or may be, legally
privileged or otherwise protected by law from further disclosure.  It
is intended only for the addressee.  If you received this in error or
from someone who was not authorized to send it to you, please do not
distribute, copy or use it or any attachments.  Please notify the
sender immediately by reply e-mail and delete this from your
system. Thank you for your cooperation.




Re: amvault $config_overrides

2010-11-04 Thread Jean-Louis Martineau

Same problem with amdump.

Try the attached patch.

Jean-Louis

Gunnarsson, Gunnar wrote:

Hi,
 
I a minor issue regarding  $config_overrides that are not beeing 
propagated to the call in amreport thus ignoring setting

such as tapettype mailto etc.
 
debug(invoking amreport..);

system($sbindir/amreport, $self-{'config_name'}, --from-amdump\
);
 
 
Thanks Gunnar Gunnarsson
 


diff --git a/server-src/amdump.pl b/server-src/amdump.pl
index 69fe151..4caf718 100644
--- a/server-src/amdump.pl
+++ b/server-src/amdump.pl
@@ -151,7 +151,7 @@ INFO amdump amdump pid $$
 START driver date $timestamp
 ERROR amdump $msg
 EOF
-run_subprocess($sbindir/amreport, $config_name, '--from-amdump', '-l', $fakelogfile);
+run_subprocess($sbindir/amreport, $config_name, '--from-amdump', '-l', $fakelogfile, @config_overrides_opts);
 unlink($fakelogfile);
 
 # and we're done here
@@ -164,7 +164,7 @@ sub do_amcleanup {
 # logfiles are still around.  First, try an amcleanup -p to see if
 # the actual processes are already dead
 debug(runing amcleanup -p);
-run_subprocess($sbindir/amcleanup, '-p', $config_name);
+run_subprocess($sbindir/amcleanup, '-p', $config_name, @config_overrides_opts);
 
 # and check again
 return unless -f $amdump_log_filename || -f $trace_log_filename;
@@ -262,7 +262,7 @@ sub planner_driver_pipeline {
 
 sub do_amreport {
 debug(running amreport);
-run_subprocess($sbindir/amreport, $config_name, '--from-amdump');
+run_subprocess($sbindir/amreport, $config_name, '--from-amdump', @config_overrides_opts);
 }
 
 sub roll_trace_logs {
@@ -273,12 +273,12 @@ sub roll_trace_logs {
 
 sub trim_trace_logs {
 debug(trimming old trace logs);
-run_subprocess($amlibexecdir/amtrmlog, $config_name);
+run_subprocess($amlibexecdir/amtrmlog, $config_name, @config_overrides_opts);
 }
 
 sub trim_indexes {
 debug(trimming old indexes);
-run_subprocess($amlibexecdir/amtrmidx, $config_name);
+run_subprocess($amlibexecdir/amtrmidx, $config_name, @config_overrides_opts);
 }
 
 sub roll_amdump_logs {
diff --git a/server-src/amvault.pl b/server-src/amvault.pl
index 2646a4d..c89a6fa 100644
--- a/server-src/amvault.pl
+++ b/server-src/amvault.pl
@@ -140,6 +140,7 @@ sub new {
 
 	exporting = 0, # is an export in progress?
 	call_after_export = undef, # call this when export complete
+	config_overrides_opts = $params{'config_overrides_opts'},
 
 	# called when the operation is complete, with the exit
 	# status
@@ -625,8 +626,10 @@ sub quit {
 	log_add_full($L_FINISH, driver, fake driver finish);
 	log_add($L_INFO, pid-done $$);
 
-	debug(invoking amreport..);
-	system($sbindir/amreport, $self-{'config_name'}, --from-amdump);
+	my @amreport_cmd = ($sbindir/amreport, $self-{'config_name'}, --from-amdump,
+ @{$self-{'config_overrides_opts'}});
+	debug(invoking amreport ( . join( , @amreport_cmd) . ));
+	system(@amreport_cmd);
 
 	debug(rolling logfile..);
 	log_rename($self-{'dst_write_timestamp'});
@@ -894,6 +897,7 @@ EOF
 Amanda::Util::setup_application(amvault, server, $CONTEXT_CMDLINE);
 
 my $config_overrides = new_config_overrides($#ARGV+1);
+my @config_overrides_opts;
 my $opt_quiet = 0;
 my $opt_dry_run = 0;
 my $opt_fulls_only = 0;
@@ -932,7 +936,10 @@ sub add_autolabel {
 
 Getopt::Long::Configure(qw{ bundling });
 GetOptions(
-'o=s' = sub { add_config_override_opt($config_overrides, $_[1]); },
+'o=s' = sub {
+	push @config_overrides_opts, -o . $_[1];
+	add_config_override_opt($config_overrides, $_[1]);
+},
 'q|quiet' = \$opt_quiet,
 'n|dry-run' = \$opt_dry_run,
 'fulls-only' = \$opt_fulls_only,
@@ -986,7 +993,8 @@ my $vault = Amvault-new(
 opt_dry_run = $opt_dry_run,
 quiet = $opt_quiet,
 fulls_only = $opt_fulls_only,
-opt_export = $opt_export);
+opt_export = $opt_export,
+config_overrides_opts = \...@config_overrides_opts);
 Amanda::MainLoop::call_later(sub { $vault-run($exit_cb) });
 Amanda::MainLoop::run();
 


Re: amanda 3.1.2 on Solaris 10x86

2010-11-04 Thread Jean-Louis Martineau
The amzfs-snapshot failed, you might find the reason in the 
amzfs-snapshot or sendbackup debug files.


With the attached patch, the error message will be in the report.

Jean-Louis

Brian Cuttler wrote:

client==server

# amdump ran perfectly otherwise. Periodically we see errors
like this, but we've had pretty good runs since the installation
of 3.1.2.

- Forwarded message from Amanda/Cascade ama...@wadsworth.org -

These dumps were to tape Cascade43.
The next 2 tapes Amanda expects to use are: Cascade44, Cascade45.
FAILURE DUMP SUMMARY:
  cascade /cascadep/nalm/alm2 lev 0  FAILED [too many dumper retry: [request 
failed: timeout waiting for ACK]]

STRANGE DUMP SUMMARY:
  cascade /cascadep/export/shain lev 1  STRANGE (see below)

STRANGE DUMP DETAILS:
  /-- cascade /cascadep/export/shain lev 1 STRANGE
  ? Script 'amzfs-snapshot' command 'PRE-DLE-BACKUP': Can't use string () as a symbol 
ref while strict refs in use at /usr/perl5/site_perl/5.8.4/Amanda/Script_App.pm line 
120.
  ? Script 'amzfs-snapshot' command 'PRE-DLE-BACKUP' exited with status 9: see 
/tmp/amanda/client/cascade/sendbackup.20101103183611.debug
  sendbackup: info BACKUP=APPLICATION
  sendbackup: info APPLICATION=amstar
  sendbackup: info RECOVER_CMD=/usr/local/bin/gzip -dc 
|/usr/local/libexec/amanda/application/amstar restore [./file-to-restore]+
  sendbackup: info COMPRESS_SUFFIX=.gz
  sendbackup: info end
  | Type of this level 1  dump: full
  | Date of this level 1  dump: Wed Nov  3 18:36:12 2010
  | Date of last level 0  dump: Wed Oct  6 18:31:57 2010
  | /opt/schily/bin/star: 2110149 blocks + 0 bytes (total of 21607925760 bytes 
= 21101490.00k).
  | Dump record  level 1  dump: Wed Nov  3 18:36:12 2010 written
  sendbackup: size 21101490
  sendbackup: end
  \

(brought to you by Amanda version 3.1.2)

---
   Brian R Cuttler brian.cutt...@wadsworth.org
   Computer Systems Support(v) 518 486-1697
   Wadsworth Center(f) 518 473-6384
   NYS Department of HealthHelp Desk 518 473-0773



IMPORTANT NOTICE: This e-mail and any attachments may contain
confidential or sensitive information which is, or may be, legally
privileged or otherwise protected by law from further disclosure.  It
is intended only for the addressee.  If you received this in error or
from someone who was not authorized to send it to you, please do not
distribute, copy or use it or any attachments.  Please notify the
sender immediately by reply e-mail and delete this from your
system. Thank you for your cooperation.


  


diff --git a/application-src/amzfs-snapshot.pl b/application-src/amzfs-snapshot.pl
index 3872dd4..11396b9 100644
--- a/application-src/amzfs-snapshot.pl
+++ b/application-src/amzfs-snapshot.pl
@@ -151,6 +151,10 @@ sub command_post_dle_estimate {
 sub command_pre_dle_backup {
 my $self = shift;
 
+my $mesgout_fd;
+open ($mesgout_fd, '=1') || die(Can't open mesgout_fd: $!);
+$self-{mesgout} = $mesgout_fd;
+
 $self-zfs_snapshot_set_value();
 if ($self-{error_status} == $Amanda::Script_App::GOOD) {
 	$self-zfs_create_snapshot(backup);


Re: amanda 3.1.2 on Solaris 10x86

2010-11-04 Thread Brian Cuttler

Jean-Louis,

On Thu, Nov 04, 2010 at 01:19:58PM -0400, Jean-Louis Martineau wrote:
 The amzfs-snapshot failed, you might find the reason in the 
 amzfs-snapshot or sendbackup debug files.
 
 With the attached patch, the error message will be in the report.
 
 Jean-Louis

The debug file is not terribly more informative.

Wait, this is a different file system and a different error, 
I will send this but will look again...no the error I expected
to find is not in any of the debug files from last night.

I'll apply the patch and see what turns up, we've been running
flawlessly since we installed 3.1.2 so I don't know what triggered
the error last night.

Amzfs_snapshot.20101103183611.debug
::
Wed Nov  3 18:36:11 2010: Amzfs_snapshot: pid 22913 ruid 110 euid 110 version 
3.1.2: start at Wed Nov  3 18:36:11 2010
Wed Nov  3 18:36:11 2010: Amzfs_snapshot: pid 22913 ruid 110 euid 110 version 
3.1.2: rename at Wed Nov  3 18:36:11 2010
Wed Nov  3 18:36:11 2010: Amzfs_snapshot: script: Amzfs_snapshot
Wed Nov  3 18:36:11 2010: Amzfs_snapshot: command: pre_dle_backup
Wed Nov  3 18:36:11 2010: Amzfs_snapshot: running: /usr/bin/pfexec 
/usr/sbin/zfs get -H -o value mountpoint /cascadep/export/shain
Wed Nov  3 18:36:11 2010: Amzfs_snapshot: running: /usr/sbin/df 
/cascadep/export/shain
Wed Nov  3 18:36:11 2010: Amzfs_snapshot: running: /usr/bin/pfexec 
/usr/sbin/zfs get -H -o value mountpoint cascadep/export/shain|
Wed Nov  3 18:36:11 2010: Amzfs_snapshot: running: /usr/bin/pfexec 
/usr/sbin/zfs snapshot 
cascadep/export/sh...@amanda-_cascadep_export_shain-current
Wed Nov  3 18:36:12 2010: Amzfs_snapshot: warning: Use of uninitialized value 
in ref-to-glob cast at /usr/perl5/site_perl/5.8.4/Amanda/Script_App.pm line 120.
thank you,

Brian

 
 Brian Cuttler wrote:
 client==server
 
 # amdump ran perfectly otherwise. Periodically we see errors
 like this, but we've had pretty good runs since the installation
 of 3.1.2.
 
 - Forwarded message from Amanda/Cascade ama...@wadsworth.org -
 
 These dumps were to tape Cascade43.
 The next 2 tapes Amanda expects to use are: Cascade44, Cascade45.
 FAILURE DUMP SUMMARY:
   cascade /cascadep/nalm/alm2 lev 0  FAILED [too many dumper retry: 
   [request failed: timeout waiting for ACK]]
 
 STRANGE DUMP SUMMARY:
   cascade /cascadep/export/shain lev 1  STRANGE (see below)
 
 STRANGE DUMP DETAILS:
   /-- cascade /cascadep/export/shain lev 1 STRANGE
   ? Script 'amzfs-snapshot' command 'PRE-DLE-BACKUP': Can't use string 
   () as a symbol ref while strict refs in use at 
   /usr/perl5/site_perl/5.8.4/Amanda/Script_App.pm line 120.
   ? Script 'amzfs-snapshot' command 'PRE-DLE-BACKUP' exited with status 9: 
   see /tmp/amanda/client/cascade/sendbackup.20101103183611.debug
   sendbackup: info BACKUP=APPLICATION
   sendbackup: info APPLICATION=amstar
   sendbackup: info RECOVER_CMD=/usr/local/bin/gzip -dc 
   |/usr/local/libexec/amanda/application/amstar restore 
   [./file-to-restore]+
   sendbackup: info COMPRESS_SUFFIX=.gz
   sendbackup: info end
   | Type of this level 1  dump: full
   | Date of this level 1  dump: Wed Nov  3 18:36:12 2010
   | Date of last level 0  dump: Wed Oct  6 18:31:57 2010
   | /opt/schily/bin/star: 2110149 blocks + 0 bytes (total of 21607925760 
   bytes = 21101490.00k).
   | Dump record  level 1  dump: Wed Nov  3 18:36:12 2010 written
   sendbackup: size 21101490
   sendbackup: end
   \
 
 (brought to you by Amanda version 3.1.2)
 
 ---
Brian R Cuttler brian.cutt...@wadsworth.org
Computer Systems Support(v) 518 486-1697
Wadsworth Center(f) 518 473-6384
NYS Department of HealthHelp Desk 518 473-0773
 
 
 
 IMPORTANT NOTICE: This e-mail and any attachments may contain
 confidential or sensitive information which is, or may be, legally
 privileged or otherwise protected by law from further disclosure.  It
 is intended only for the addressee.  If you received this in error or
 from someone who was not authorized to send it to you, please do not
 distribute, copy or use it or any attachments.  Please notify the
 sender immediately by reply e-mail and delete this from your
 system. Thank you for your cooperation.
 
 
   
 


---
   Brian R Cuttler brian.cutt...@wadsworth.org
   Computer Systems Support(v) 518 486-1697
   Wadsworth Center(f) 518 473-6384
   NYS Department of HealthHelp Desk 518 473-0773



IMPORTANT NOTICE: This e-mail and any attachments may contain
confidential or sensitive information which is, or may be, legally
privileged or otherwise protected by law from further disclosure.  It
is intended only for the addressee.  If you received this in error or
from someone who was not authorized to send it to you, please do not
distribute, copy or use it or any attachments.  Please notify the
sender immediately