From eb437abbda884d3393eb9dd18e7d7befde296517 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 15 May 2003 09:04:56 +0000 Subject: [PATCH] Use Jmsg() in write_block_to_dev() so that messages are not lost git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@511 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kernstodo | 51 ++++++++++++++++++++++----------------- bacula/src/dird/ua_run.c | 2 +- bacula/src/stored/block.c | 11 ++++----- 3 files changed, 35 insertions(+), 29 deletions(-) diff --git a/bacula/kernstodo b/bacula/kernstodo index f1327c1685..72f57bab49 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -19,21 +19,10 @@ Testing to do: (painful) - Figure out how to use ssh or stunnel to protect Bacula communications. For 1.31 release: -14-May-2003 14:41 undef-sd: RestoreFiles.2003-05-14_14.41.00 Warning: acquire.c:106 Volume name mismatch. Wanted TestVolume0005 got TestVolume0010 -14-May-2003 14:41 undef-sd: 3301 Issuing autochanger "loaded" command. -14-May-2003 14:41 undef-sd: 3302 Issuing autochanger "unload" command. -14-May-2003 14:42 undef-sd: 3303 Issuing autochanger "load slot 1" command. -14-May-2003 14:42 undef-sd: 3304 Autochanger "load slot 1" status is OK. -14-May-2003 14:42 undef-sd: RestoreFiles.2003-05-14_14.41.00 Warning: acquire.c:106 Volume name mismatch. Wanted TestVolume0005 got TestVolume0009 -14-May-2003 14:42 undef-sd: 3301 Issuing autochanger "loaded" command. -14-May-2003 14:42 undef-sd: RestoreFiles.2003-05-14_14.41.00 Warning: acquire.c:106 Volume name mismatch. Wanted TestVolume0005 got TestVolume0009 -14-May-2003 14:42 undef-sd: 3301 Issuing autochanger "loaded" command. -14-May-2003 14:42 undef-sd: RestoreFiles.2003-05-14_14.41.00 Warning: acquire.c:106 Volume name mismatch. Wanted TestVolume0005 got TestVolume0009 -14-May-2003 14:42 undef-sd: 3301 Issuing autochanger "loaded" command. -14-May-2003 14:42 undef-sd: RestoreFiles.2003-05-14_14.41.00 Warning: acquire.c:106 Volume name mismatch. Wanted TestVolume0005 got TestVolume0009 -14-May-2003 14:42 undef-sd: 3301 Issuing autochanger "loaded" command. -14-May-2003 14:42 undef-sd: RestoreFiles.2003-05-14_14.41.00 Fatal error: acquire.c:129 Too many errors trying to mount device "/dev/nrsa0". -14-May-2003 14:42 undef-dir: Bacula 1.31 (12May03): 14-May-2003 14:42 +- Volume names with spaces get jammed into the catalog with 0x1 + i.e. the SD bashes the Volume but they are not unbased by Dir. + +- ChangeServiceConfig2A does not exist on WinNT (ADVAPI32.DLL). - Implement MTIOCERRSTAT on FreeBSD to clear tape error conditions. @@ -42,9 +31,7 @@ For 1.31 release: - BSD defines a number of MT_xxx variables which conflict with those defined by Bacula. -- The following Re-read last block at EOT failed. ERR=block.c:523 Read zero bytes on device /dev/nrsa0. - undef-sd: block.c:523 Read zero bytes on device /dev/nrsa0. - apparently masks the standard EOM message. + - Add Progress command that periodically reports the progress of a job or all jobs. - Implement "Reschedule OnError=yes interval=nnn times=xxx" @@ -60,10 +47,6 @@ For 1.31 release: - Fix "access not allowed" for backup of files on WinXP. - Check for existence of all new Win32 API's. See LoadLibrary in winservice.cpp -- Fix problem reported by Christopher McCurdy - xeon-fd: Could not stat c:/Documents and Settings/All - Users/Application Data/Humc:\Documents and Settings\All User98_AIX.kbf: - ERR=No such file or directory - Examine Bare Metal restore problem (a FD crash exists somewhere ...). - Test multiple simultaneous Volumes - Document FInclude ... @@ -809,3 +792,27 @@ Done: (see kernsdone for more) - Shell character expansion is failing occassionally. - Add a section to the doc on Manual cycling of Volumes. - Check if Job/File retentions apply to multivolume jobs. +- Fix missing casette in autoloader during read: + 14-May-2003 14:41 undef-sd: RestoreFiles.2003-05-14_14.41.00 Warning: acquire.c:106 Volume name mismatch. Wanted TestVolume0005 got TestVolume0010 + 14-May-2003 14:41 undef-sd: 3301 Issuing autochanger "loaded" command. + 14-May-2003 14:41 undef-sd: 3302 Issuing autochanger "unload" command. + 14-May-2003 14:42 undef-sd: 3303 Issuing autochanger "load slot 1" command. + 14-May-2003 14:42 undef-sd: 3304 Autochanger "load slot 1" status is OK. + 14-May-2003 14:42 undef-sd: RestoreFiles.2003-05-14_14.41.00 Warning: acquire.c:106 Volume name mismatch. Wanted TestVolume0005 got TestVolume0009 + 14-May-2003 14:42 undef-sd: 3301 Issuing autochanger "loaded" command. + 14-May-2003 14:42 undef-sd: RestoreFiles.2003-05-14_14.41.00 Warning: acquire.c:106 Volume name mismatch. Wanted TestVolume0005 got TestVolume0009 + 14-May-2003 14:42 undef-sd: 3301 Issuing autochanger "loaded" command. + 14-May-2003 14:42 undef-sd: RestoreFiles.2003-05-14_14.41.00 Warning: acquire.c:106 Volume name mismatch. Wanted TestVolume0005 got TestVolume0009 + 14-May-2003 14:42 undef-sd: 3301 Issuing autochanger "loaded" command. + 14-May-2003 14:42 undef-sd: RestoreFiles.2003-05-14_14.41.00 Warning: acquire.c:106 Volume name mismatch. Wanted TestVolume0005 got TestVolume0009 + 14-May-2003 14:42 undef-sd: 3301 Issuing autochanger "loaded" command. + 14-May-2003 14:42 undef-sd: RestoreFiles.2003-05-14_14.41.00 Fatal error: acquire.c:129 Too many errors trying to mount device "/dev/nrsa0". + 14-May-2003 14:42 undef-dir: Bacula 1.31 (12May03): 14-May-2003 14:42 +- Fix problem reported by Christopher McCurdy + xeon-fd: Could not stat c:/Documents and Settings/All + Users/Application Data/Humc:\Documents and Settings\All User98_AIX.kbf: + ERR=No such file or directory + Cannot reproduce. +- The following Re-read last block at EOT failed. ERR=block.c:523 Read zero bytes on device /dev/nrsa0. + undef-sd: block.c:523 Read zero bytes on device /dev/nrsa0. + apparently masks the standard EOM message. diff --git a/bacula/src/dird/ua_run.c b/bacula/src/dird/ua_run.c index 1e21b3a235..957d6cc9d5 100644 --- a/bacula/src/dird/ua_run.c +++ b/bacula/src/dird/ua_run.c @@ -638,7 +638,7 @@ When: %s\n"), if (strncasecmp(ua->cmd, _("yes"), strlen(ua->cmd)) == 0) { Dmsg1(200, "Calling run_job job=%x\n", jcr->job); run_job(jcr); - bsendmsg(ua, _("Run Job command submitted.\n")); + bsendmsg(ua, _("Run command submitted.\n")); return 1; } diff --git a/bacula/src/stored/block.c b/bacula/src/stored/block.c index 762583b13a..e21533d2cb 100644 --- a/bacula/src/stored/block.c +++ b/bacula/src/stored/block.c @@ -276,7 +276,6 @@ int write_block_to_device(JCR *jcr, DEVICE *dev, DEV_BLOCK *block) int stat = 1; lock_device(dev); if (!write_block_to_dev(jcr, dev, block)) { - Jmsg(jcr, M_INFO, 0, "%s", dev->errmsg); stat = fixup_device_block_write_error(jcr, dev, block); } unlock_device(dev); @@ -305,7 +304,7 @@ int write_block_to_dev(JCR *jcr, DEVICE *dev, DEV_BLOCK *block) /* dump_block(block, "before write"); */ if (dev->state & ST_WEOT) { Dmsg0(100, "return write_block_to_dev with ST_WEOT\n"); - Mmsg0(&dev->errmsg, _("Cannot write block. Device at EOF.\n")); + Jmsg(&dev->errmsg, M_FATAL, 0, _("Cannot write block. Device at EOF.\n")); return 0; } wlen = block->binbuf; @@ -350,10 +349,10 @@ int write_block_to_dev(JCR *jcr, DEVICE *dev, DEV_BLOCK *block) dev->state |= ST_WEOT; Dmsg0(10, "==== Output bytes Triggered medium max capacity.\n"); if (hit_max1) { - Mmsg(&dev->errmsg, _("Max. Volume capacity %s exceeded on device %s.\n"), + Jmsg(&dev->errmsg, M_INFO, 0, _("Max. Volume capacity %s exceeded on device %s.\n"), edit_uint64(dev->max_volume_size, ed1), dev->dev_name); } else { - Mmsg(&dev->errmsg, _("Max. Volume capacity %s exceeded on device %s.\n"), + Jmsg(&dev->errmsg, M_INFO, 0, _("Max. Volume capacity %s exceeded on device %s.\n"), edit_uint64(dev->VolCatInfo.VolCatMaxBytes, ed1), dev->dev_name); } block->failed_write = TRUE; @@ -396,10 +395,10 @@ int write_block_to_dev(JCR *jcr, DEVICE *dev, DEV_BLOCK *block) wlen, stat, dev->dev_errno, strerror(dev->dev_errno)); if (stat == -1) { - Mmsg2(&dev->errmsg, _("Write error on device %s. ERR=%s.\n"), + Jmsg2(&dev->errmsg, M_ERROR, 0, _("Write error on device %s. ERR=%s.\n"), dev->dev_name, strerror(dev->dev_errno)); } else { - Mmsg3(&dev->errmsg, _("End of media on device %s. Write of %u bytes got %d.\n"), + Jmsg3(&dev->errmsg, M_INFO, 0, _("End of media on device %s. Write of %u bytes got %d.\n"), dev->dev_name, wlen, stat); } block->failed_write = TRUE; -- 2.39.5