]> git.sur5r.net Git - bacula/bacula/commitdiff
19July06
authorKern Sibbald <kern@sibbald.com>
Wed, 19 Jul 2006 11:03:20 +0000 (11:03 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 19 Jul 2006 11:03:20 +0000 (11:03 +0000)
- Add additional fields as specified by Arno to LocationLog.
- Add comment field to the Media record.
- Add Time field to the Log record.
- Correct migration SQL (thanks to Bill Moran) so that it
  runs with PostgreSQL also.
- Add spooling/despooling info in status output of SD.
17July06
- Spend a lot of time integrating mkcdrec with the rescue disk.
- Add VOLMGMT message class for volume management messages (none yet).
- Add CATALOG as a destination.  It goes into the LOG table.
- Implement the Log table in the DB.
- Implement the Location Log table in the DB (for user use).
- At Eric's request add a run_scripts() just after blast_data in
  src/filed/job.c

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3161 91ce42f0-d328-0410-95d8-f526ca767f89

18 files changed:
bacula/kernstodo
bacula/kes-1.39
bacula/src/cats/make_mysql_tables.in
bacula/src/cats/make_postgresql_tables.in
bacula/src/cats/make_sqlite3_tables.in
bacula/src/cats/make_sqlite_tables.in
bacula/src/cats/update_mysql_tables.in
bacula/src/cats/update_postgresql_tables.in
bacula/src/cats/update_sqlite3_tables.in
bacula/src/cats/update_sqlite_tables.in
bacula/src/dird/migrate.c
bacula/src/filed/job.c
bacula/src/lib/message.c
bacula/src/lib/parse_conf.c
bacula/src/stored/dev.h
bacula/src/stored/spool.c
bacula/src/stored/status.c
bacula/src/version.h

index adf57fb016ff12039e980dc387d67e9f88d2a4e4..9b6b693c7137a2b88b566566c661ca6dc97f3e70 100644 (file)
@@ -1,5 +1,5 @@
                     Kern's ToDo List
-                     20 June 2006
+                     16 July 2006
 
 Major development:      
 Project                     Developer
@@ -42,8 +42,23 @@ For 1.39:
   Volume marked as purged.
 - Print warning message if LANG environment variable does not specify
   UTF-8.
+- Add LocationId to update volume
+- Add LocationLog
+    LogId
+    Date
+    User text
+    MediaId
+    LocationId
+    NewState???
+- Add Comment to Media record
 - New dot commands from Arno.
   .update volume [enabled|disabled|*see below]
+    > However, I could easily imagine an option to "update slots" that says 
+    > "enable=yes|no" that would automatically enable or disable all the Volumes 
+    > found in the autochanger.  This will permit the user to optionally mark all 
+    > the Volumes in the magazine disabled prior to taking them offsite, and mark 
+    > them all enabled when bringing them back on site.   Coupled with the options 
+    > to the slots keyword, you can apply the enable/disable to any or all volumes.
   .show device=xxx lists information from one storage device, including 
      devices (I'm not even sure that information exists in the DIR...)
   .move eject device=xxx mostly the same as 'unmount xxx' but perhaps with 
@@ -52,6 +67,7 @@ For 1.39:
      target slot. The catalog should be updated accordingly.
   .move transfer device=xxx fromslot=yyy toslot=zzz
 
+
 - Given all the problems with FIFOs, I think the solution is to do something a
   little different, though I will look at the code and see if there is not some
   simple solution (i.e. some bug that was introduced).  What might be a better
index 06aa058c641a6836419937e6132f2fa5177193ca..07c415b40f7ff2f253e03dcbc480882e5e3e8f92 100644 (file)
@@ -2,6 +2,21 @@
                         Kern Sibbald
 
 General:
+19July06
+- Add additional fields as specified by Arno to LocationLog.
+- Add comment field to the Media record.
+- Add Time field to the Log record.
+- Correct migration SQL (thanks to Bill Moran) so that it
+  runs with PostgreSQL also.
+- Add spooling/despooling info in status output of SD.
+17July06
+- Spend a lot of time integrating mkcdrec with the rescue disk.
+- Add VOLMGMT message class for volume management messages (none yet).
+- Add CATALOG as a destination.  It goes into the LOG table.
+- Implement the Log table in the DB.
+- Implement the Location Log table in the DB (for user use).
+- At Eric's request add a run_scripts() just after blast_data in
+  src/filed/job.c
 10Jul06
 - Add Enabled column to Location, correct some typos in DB schemas.
 - Correct bug I introduced into RunScripts enum.
index 63e074fe17fd5cecbfced1bc3d50d20e33302641..b9899fff6d3d876177140673f95a3bbf0a100947 100644 (file)
@@ -123,6 +123,19 @@ CREATE TABLE Location (
    PRIMARY KEY(LocationId)
    );
 
+CREATE TABLE LocationLog (
+   LocLogId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
+   Date DATETIME DEFAULT 0,
+   Comment BLOB NOT NULL,
+   MediaId INTEGER UNSIGNED DEFAULT 0 REFERENCES Media;
+   LocationId INTEGER UNSIGNED DEFAULT 0 REFERENCES LocationId;
+   NewVolStatus ENUM('Full', 'Archive', 'Append', 'Recycle', 'Purged',
+    'Read-Only', 'Disabled', 'Error', 'Busy', 'Used', 'Cleaning') NOT NULL,
+   NewEnabled TINYINT,
+   PRIMARY KEY(LocLogId)
+);
+
+
 # 
 CREATE TABLE FileSet (
    FileSetId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
@@ -192,6 +205,7 @@ CREATE TABLE Media (
    InitialWrite DATETIME DEFAULT 0,
    ScratchPoolId INTEGER UNSIGNED DEFAULT 0 REFERENCES Pool,
    RecyclePoolId INTEGER UNSIGNED DEFAULT 0 REFERENCES Pool,
+   Comment BLOB,
    PRIMARY KEY(MediaId),
    INDEX (PoolId)
    );
@@ -242,8 +256,11 @@ CREATE TABLE Client (
    );
 
 CREATE TABLE Log (
-   JobId INTEGER UNSIGNED DEFAULT 0 REFERENCES JobId,
+   LogId INTEGER UNSIGNED AUTO_INCREMENT,
+   JobId INTEGER INTEGER UNSIGNED DEFAULT 0 REFERENCES JobId,
+   Time DATETIME DEFAULT 0,
    LogText BLOB NOT NULL,
+   PRIMARY KEY(LogId),
    INDEX (JobId)
    );
 
index 261227bd26fe344e2efaee33ae403946f83261ae..a10925554d3b23a3a623ab5fde44e8d32dd0179e 100644 (file)
@@ -161,6 +161,7 @@ CREATE TABLE media
     initialwrite      timestamp   without time zone,
     scratchpoolid     integer    default 0,
     recyclepoolid     integer    default 0,
+    comment          text,
     primary key (mediaid)
 );
 
@@ -248,12 +249,28 @@ create unique index client_name_idx on client (name);
 
 CREATE TABLE Log
 (
-    JobId            serial      not null,
+    LogId            serial      not null,
+    JobId            integer     not null,
+    Time             timestamp   without time zone,
     LogText          text        not null,
+    primary key (LogId)
 );
-
 create index log_name_idx on Log (JobId);
 
+CREATE TABLE LocationLog (
+   LocLogId SERIAL NOT NULL,
+   Date timestamp   without time zone,
+   Comment TEXT NOT NULL,
+   MediaId INTEGER DEFAULT 0,
+   LocationId INTEGER DEFAULT 0,
+   newvolstatus text not null
+       check (volstatus in ('Full','Archive','Append',
+             'Recycle','Purged','Read-Only','Disabled',
+             'Error','Busy','Used','Cleaning','Scratch')),
+   newenabled smallint,
+   PRIMARY KEY(LocLogId)
+);
+
 
 
 CREATE TABLE counters
index 7e49d713a2054f8ac0a54f38c7054359f4de07ce..4583b85557b1ade1354fbfcd196073642ce36317 100644 (file)
@@ -72,7 +72,6 @@ CREATE TABLE Job (
    HasBase TINYINT DEFAULT 0,
    PRIMARY KEY(JobId) 
    );
-
 CREATE INDEX inx6 ON Job (Name);
 
 CREATE TABLE Location (
@@ -83,6 +82,27 @@ CREATE TABLE Location (
    PRIMARY KEY(LocationId)
    );
 
+CREATE TABLE LocationLog (
+   LocLogId INTEGER,
+   Date DATETIME NOT NULL,
+   Comment TEXT NOT NULL,
+   MediaId INTEGER UNSIGNED REFERENCES Media DEFAULT 0,
+   LocationId INTEGER UNSIGNED REFERENCES LocationId DEFAULT 0,
+   NewVolStatus VARCHAR(20) NOT NULL,
+   NewEnabled TINYINT NOT NULL,
+   PRIMARY KEY(LocLogId)
+);
+
+
+CREATE TABLE Log (
+   LogId INTEGER,
+   JobId INTEGER UNSIGNED REFERENCES Job NOT NULL,
+   Time DATETIME NOT NULL,
+   LogText TEXT NOT NULL,
+   PRIMARY KEY(LogId) 
+   );
+CREATE INDEX LogInx1 ON File (JobId);
+
 
 CREATE TABLE FileSet (
    FileSetId INTEGER,
@@ -151,6 +171,7 @@ CREATE TABLE Media (
    InitialWrite DATETIME DEFAULT 0,
    ScratchPoolId INTEGER UNSIGNED REFERENCES Pool DEFAULT 0,
    RecyclePoolId INTEGER UNSIGNED REFERENCES Pool DEFAULT 0,
+   Comment TEXT,
    PRIMARY KEY(MediaId)
    );
 
@@ -255,11 +276,6 @@ CREATE TABLE NextId (
    PRIMARY KEY (TableName)
    );
 
-CREATE TABLE Log  
-   JobId INTEGER UNSIGNED REFERENCES Job NOT NULL,
-   LogText TEXT NOT NULL,
-   KEY (JobId)
-   );
  
 
 -- Initialize JobId to start at 1
index 7e49d713a2054f8ac0a54f38c7054359f4de07ce..4583b85557b1ade1354fbfcd196073642ce36317 100644 (file)
@@ -72,7 +72,6 @@ CREATE TABLE Job (
    HasBase TINYINT DEFAULT 0,
    PRIMARY KEY(JobId) 
    );
-
 CREATE INDEX inx6 ON Job (Name);
 
 CREATE TABLE Location (
@@ -83,6 +82,27 @@ CREATE TABLE Location (
    PRIMARY KEY(LocationId)
    );
 
+CREATE TABLE LocationLog (
+   LocLogId INTEGER,
+   Date DATETIME NOT NULL,
+   Comment TEXT NOT NULL,
+   MediaId INTEGER UNSIGNED REFERENCES Media DEFAULT 0,
+   LocationId INTEGER UNSIGNED REFERENCES LocationId DEFAULT 0,
+   NewVolStatus VARCHAR(20) NOT NULL,
+   NewEnabled TINYINT NOT NULL,
+   PRIMARY KEY(LocLogId)
+);
+
+
+CREATE TABLE Log (
+   LogId INTEGER,
+   JobId INTEGER UNSIGNED REFERENCES Job NOT NULL,
+   Time DATETIME NOT NULL,
+   LogText TEXT NOT NULL,
+   PRIMARY KEY(LogId) 
+   );
+CREATE INDEX LogInx1 ON File (JobId);
+
 
 CREATE TABLE FileSet (
    FileSetId INTEGER,
@@ -151,6 +171,7 @@ CREATE TABLE Media (
    InitialWrite DATETIME DEFAULT 0,
    ScratchPoolId INTEGER UNSIGNED REFERENCES Pool DEFAULT 0,
    RecyclePoolId INTEGER UNSIGNED REFERENCES Pool DEFAULT 0,
+   Comment TEXT,
    PRIMARY KEY(MediaId)
    );
 
@@ -255,11 +276,6 @@ CREATE TABLE NextId (
    PRIMARY KEY (TableName)
    );
 
-CREATE TABLE Log  
-   JobId INTEGER UNSIGNED REFERENCES Job NOT NULL,
-   LogText TEXT NOT NULL,
-   KEY (JobId)
-   );
  
 
 -- Initialize JobId to start at 1
index c59e46f86edcecf8a8ee81127b10f16cf3f35f06..52271b92d8d4c3d9b9a71e7235ca96af4513e542 100755 (executable)
@@ -20,6 +20,7 @@ ALTER TABLE Media ADD COLUMN InitialWrite DATETIME DEFAULT 0;
 ALTER TABLE Media ADD COLUMN ScratchPoolId INTEGER UNSIGNED DEFAULT 0 REFERENCES Pool;
 ALTER TABLE Media ADD COLUMN RecyclePoolId INTEGER UNSIGNED DEFAULT 0 REFERENCES Pool;
 ALTER TABLE Media ADD COLUMN Enabled TINYINT DEFAULT 1;
+ALTER TABLE Media ADD COLUMN Comment BLOB;
 
 ALTER TABLE JobMedia DROP ADD COLUMN Stripe;
 
@@ -27,14 +28,30 @@ ALTER TABLE Job ADD COLUMN PriorJobId INTEGER UNSIGNED DEFAULT 0 REFERENCES Job;
 ALTER TABLE Job ADD COLUMN RealEndTime DATETIME DEFAULT 0;
 
 CREATE TABLE Log (
+   LogId INTEGER UNSIGNED AUTO_INCREMENT,
    JobId INTEGER INTEGER UNSIGNED DEFAULT 0 REFERENCES JobId,
+   Time DATETIME DEFAULT 0,
    LogText BLOB NOT NULL,
+   PRIMARY KEY(LogId),
    INDEX (JobId)
    );
 
+CREATE TABLE LocationLog (
+   LocLogId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
+   Date DATETIME DEFAULT 0,
+   Comment BLOB NOT NULL,
+   MediaId INTEGER UNSIGNED DEFAULT 0 REFERENCES Media;
+   LocationId INTEGER UNSIGNED DEFAULT 0 REFERENCES LocationId;
+   NewVolStatus ENUM('Full', 'Archive', 'Append', 'Recycle', 'Purged',
+    'Read-Only', 'Disabled', 'Error', 'Busy', 'Used', 'Cleaning') NOT NULL,
+   NewEnabled TINYINT,
+   PRIMARY KEY(LocLogId)
+);
+
+
 CREATE TABLE Location (
    LocationId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
-   Location TINYBLOB NOT NULL,
+   Location BLOB NOT NULL,
    Cost INTEGER DEFAULT 0,
    Enabled TINYINT,
    PRIMARY KEY(LocationId)
index afb05793e61a04218281efe733e268b5f709c604..7c3cebbcbd3d01470d7c8e9ce66b0b61bb945d74 100755 (executable)
@@ -27,6 +27,7 @@ ALTER TABLE media ADD COLUMN recyclepoolid integer;
 UPDATE media SET recyclepoolid=0;
 ALTER TABLE media ADD COLUMN enabled integer;
 UPDATE media SET enabled=1;
+ALTER TABLE media ADD COLUMN Comment TEXT;
 
 ALTER TABLE job ADD COLUMN RealEndTime timestamp without time zone;
 UPDATE job SET RealEndTime=0;
@@ -43,12 +44,29 @@ CREATE TABLE Location (
    PRIMARY KEY (LocationId)
 );
 
+CREATE TABLE LocationLog (
+   LocLogId SERIAL NOT NULL,
+   Date timestamp   without time zone,
+   Comment TEXT NOT NULL,
+   MediaId INTEGER DEFAULT 0,
+   LocationId INTEGER DEFAULT 0,
+   newvolstatus text not null
+       check (volstatus in ('Full','Archive','Append',
+             'Recycle','Purged','Read-Only','Disabled',
+             'Error','Busy','Used','Cleaning','Scratch')),
+   newenabled smallint,
+   PRIMARY KEY(LocLogId)
+);
+
+
 CREATE TABLE Log
 (
-    JobId            serial      not null,
+    LogId            serial      not null,
+    JobId            integer     not null,
+    Time             timestamp   without time zone,
     LogText          text        not null,
+    primary key (LogId)
 );
-
 create index log_name_idx on Log (JobId);
 
 
index 399497bae06918a4c90824bfa251f5815c5119b0..c2d427ab61e8223c2aeb98129d27ba1ef6dcc953 100755 (executable)
@@ -115,6 +115,7 @@ CREATE TABLE Media (
    InitialWrite DATETIME DEFAULT 0,
    ScratchPoolId INTEGER UNSIGNED REFERENCES Pool DEFAULT 0,
    RecyclePoolId INTEGER UNSIGNED REFERENCES Pool DEFAULT 0,
+   Comment TEXT,   
    PRIMARY KEY(MediaId)
    );
 
@@ -213,11 +214,25 @@ INSERT INTO Job SELECT
 
 DROP TABLE Job_backup;
 
-CREATE TABLE Log  
+CREATE TABLE LocationLog (
+   LocLogId INTEGER,
+   Date DATETIME NOT NULL,
+   Comment TEXT NOT NULL,
+   MediaId INTEGER UNSIGNED REFERENCES Media DEFAULT 0,
+   LocationId INTEGER UNSIGNED REFERENCES LocationId DEFAULT 0,
+   NewVolStatus VARCHAR(20) NOT NULL,
+   NewEnabled TINYINT NOT NULL,
+   PRIMARY KEY(LocLogId)
+);
+
+CREATE TABLE Log (
+   LogId INTEGER,
    JobId INTEGER UNSIGNED REFERENCES Job NOT NULL,
+   Time DATETIME NOT NULL,
    LogText TEXT NOT NULL,
-   KEY (JobId)
+   PRIMARY KEY(LogId) 
    );
+CREATE INDEX LogInx1 ON File (JobId);
 
 CREATE TABLE Location (
    LocationId INTEGER,
index 399497bae06918a4c90824bfa251f5815c5119b0..c2d427ab61e8223c2aeb98129d27ba1ef6dcc953 100755 (executable)
@@ -115,6 +115,7 @@ CREATE TABLE Media (
    InitialWrite DATETIME DEFAULT 0,
    ScratchPoolId INTEGER UNSIGNED REFERENCES Pool DEFAULT 0,
    RecyclePoolId INTEGER UNSIGNED REFERENCES Pool DEFAULT 0,
+   Comment TEXT,   
    PRIMARY KEY(MediaId)
    );
 
@@ -213,11 +214,25 @@ INSERT INTO Job SELECT
 
 DROP TABLE Job_backup;
 
-CREATE TABLE Log  
+CREATE TABLE LocationLog (
+   LocLogId INTEGER,
+   Date DATETIME NOT NULL,
+   Comment TEXT NOT NULL,
+   MediaId INTEGER UNSIGNED REFERENCES Media DEFAULT 0,
+   LocationId INTEGER UNSIGNED REFERENCES LocationId DEFAULT 0,
+   NewVolStatus VARCHAR(20) NOT NULL,
+   NewEnabled TINYINT NOT NULL,
+   PRIMARY KEY(LocLogId)
+);
+
+CREATE TABLE Log (
+   LogId INTEGER,
    JobId INTEGER UNSIGNED REFERENCES Job NOT NULL,
+   Time DATETIME NOT NULL,
    LogText TEXT NOT NULL,
-   KEY (JobId)
+   PRIMARY KEY(LogId) 
    );
+CREATE INDEX LogInx1 ON File (JobId);
 
 CREATE TABLE Location (
    LocationId INTEGER,
index 24e8b113254474c0b4acbd07b81b67d595e00aa9..e30fb296500ac96563c7649db67defb940ff1a22 100644 (file)
@@ -345,7 +345,7 @@ const char *sql_job =
 
 /* Get JobIds from regex'ed Job names */
 const char *sql_jobids_from_job =
-   "SELECT DISTINCT Job.JobId FROM Job,Pool"
+   "SELECT DISTINCT Job.JobId,Job.StartTime FROM Job,Pool"
    " WHERE Job.Name='%s' AND Pool.Name='%s' AND Job.PoolId=Pool.PoolId"
    " ORDER by Job.StartTime";
 
@@ -357,7 +357,7 @@ const char *sql_client =
 
 /* Get JobIds from regex'ed Client names */
 const char *sql_jobids_from_client =
-   "SELECT DISTINCT Job.JobId FROM Job,Pool"
+   "SELECT DISTINCT Job.JobId,Job.StartTime FROM Job,Pool"
    " WHERE Client.Name='%s' AND Pool.Name='%s' AND Job.PoolId=Pool.PoolId"
    " AND Job.ClientId=Client.ClientId "
    " ORDER by Job.StartTime";
@@ -370,7 +370,7 @@ const char *sql_vol =
 
 /* Get JobIds from regex'ed Volume names */
 const char *sql_jobids_from_vol =
-   "SELECT DISTINCT Job.JobId FROM Media,JobMedia,Job"
+   "SELECT DISTINCT Job.JobId,Job.StartTime FROM Media,JobMedia,Job"
    " WHERE Media.VolumeName='%s' AND Media.MediaId=JobMedia.MediaId"
    " AND JobMedia.JobId=Job.JobId" 
    " ORDER by Job.StartTime";
@@ -392,7 +392,7 @@ const char *sql_oldest_vol =
    " ORDER BY LastWritten ASC LIMIT 1";
 
 const char *sql_jobids_from_mediaid =
-   "SELECT DISTINCT Job.JobId FROM JobMedia,Job"
+   "SELECT DISTINCT Job.JobId,Job.StartTime FROM JobMedia,Job"
    " WHERE JobMedia.JobId=Job.JobId AND JobMedia.MediaId=%s"
    " ORDER by Job.StartTime";
 
index 367a3ca8cb98638a9b57b49c5d40081204225df9..3d3828e3b5f15c1bdfa8f1c9528a1e2e0e61610c 100644 (file)
@@ -1329,11 +1329,11 @@ static int backup_cmd(JCR *jcr)
       bnet_suppress_error_messages(sd, 1);
       bget_msg(sd);                   /* Read final response from append_data */
       Dmsg0(110, "Error in blast_data.\n");
+      /* run shortly after end of data transmission */ 
+      run_scripts(jcr, jcr->RunScripts, "ClientAfterJobShort");
    } else {
       set_jcr_job_status(jcr, JS_Terminated);
 
-      /* run shortly after end of data transmission */ 
-      run_scripts(jcr, jcr->RunScripts, "ClientAfterJobShort");
 
       if (jcr->JobStatus != JS_Terminated) {
          bnet_suppress_error_messages(sd, 1);
index 18ae8aab8be8826d86b6221e1146a6d68fc99381..1bd6f8eb90e438adebcb653904a94d82a3c2e097 100755 (executable)
@@ -602,8 +602,9 @@ void dispatch_message(JCR *jcr, int type, time_t mtime, char *msg)
                 }
                 if (p_sql_query) {
                    POOL_MEM cmd(PM_MESSAGE);
-                   Mmsg(cmd, "INSERT INTO Log (JobId, LogText) VALUES (%s, '%s')",
-                         edit_int64(jcr->JobId, ed1), msg);
+                   bstrftimes(dt, sizeof(dt), mtime);
+                   Mmsg(cmd, "INSERT INTO Log (JobId, Time, LogText) VALUES (%s,'%s','%s')",
+                         edit_int64(jcr->JobId, ed1), dt, msg);
                    p_sql_query(jcr, cmd.c_str());
                 }
                 break;
index 1ad44371e6f8b78f093c3c2b30fb06f8bfeacfd1..d5a0ceafdaf23a1176312376a7600da13ca2f07f 100755 (executable)
@@ -95,6 +95,7 @@ RES_ITEM msgs_items[] = {
    {"director",    store_msgs, ITEM(res_msgs), MD_DIRECTOR, 0, 0},
    {"console",     store_msgs, ITEM(res_msgs), MD_CONSOLE,  0, 0},
    {"operator",    store_msgs, ITEM(res_msgs), MD_OPERATOR, 0, 0},
+   {"catalog",     store_msgs, ITEM(res_msgs), MD_CATALOG,  0, 0},
    {NULL,          NULL,       {0},       0, 0, 0}
 };
 
@@ -118,6 +119,7 @@ static struct s_mtypes msg_types[] = {
    {"restored",      M_RESTORED},
    {"security",      M_SECURITY},
    {"alert",         M_ALERT},
+   {"volmgmt",       M_VOLMGMT},
    {"all",           M_MAX+1},
    {NULL,            0}
 };
@@ -228,6 +230,7 @@ void store_msgs(LEX *lc, RES_ITEM *item, int index, int pass)
       case MD_STDERR:
       case MD_SYSLOG:              /* syslog */
       case MD_CONSOLE:
+      case MD_CATALOG:
          scan_types(lc, (MSGS *)(item->value), item->code, NULL, NULL);
          break;
       case MD_OPERATOR:            /* send to operator */
index e52f19e0c0b1c1448330636097b65862c5b537c8..f7c26c9180d26bf7d80225a53c41c003e493dab4 100644 (file)
@@ -399,6 +399,7 @@ public:
    int spool_fd;                      /* fd if spooling */
    bool spool_data;                   /* set to spool data */
    bool spooling;                     /* set when actually spooling */
+   bool despooling;                   /* set when despooling */
    bool dev_locked;                   /* set if dev already locked */
    bool NewVol;                       /* set if new Volume mounted */
    bool WroteVol;                     /* set if Volume written */
index e57326ccc119848ba77ad4432a2ed6d97970e9e6..dd22f26bb1436489807b597538e784bea1a8911a 100644 (file)
@@ -6,7 +6,7 @@
  *  Version $Id$
  */
 /*
-   Copyright (C) 2004-2005 Kern Sibbald
+   Copyright (C) 2004-2006 Kern Sibbald
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
@@ -195,16 +195,20 @@ static bool despool_data(DCR *dcr, bool commit)
    char ec1[50];
 
    Dmsg0(100, "Despooling data\n");
+   /* Commit means that the job is done, so we commit, otherwise, we
+    *  are despooling because of user spool size max or some error  
+    *  (e.g. filesystem full).
+    */
    if (commit) {
       Jmsg(jcr, M_INFO, 0, _("Committing spooled data to Volume \"%s\". Despooling %s bytes ...\n"),
          jcr->dcr->VolumeName,
          edit_uint64_with_commas(jcr->dcr->job_spool_size, ec1));
-   }
-   else {
+   } else {
       Jmsg(jcr, M_INFO, 0, _("Writing spooled data to Volume. Despooling %s bytes ...\n"),
          edit_uint64_with_commas(jcr->dcr->job_spool_size, ec1));
    }
    dcr->spooling = false;
+   dcr->despooling = true;
    lock_device(dcr->dev);
    dcr->dev_locked = true;
 
@@ -281,6 +285,7 @@ static bool despool_data(DCR *dcr, bool commit)
    unlock_device(dcr->dev);
    dcr->dev_locked = false;
    dcr->spooling = true;           /* turn on spooling again */
+   dcr->despooling = false;
    return ok;
 }
 
index 5edd913ac1484bdb473de33457ae6df1e6c693af..2a951e6cbb67e1a4c46934d63f51fa34c39ca36a 100644 (file)
@@ -307,6 +307,8 @@ static void list_running_jobs(BSOCK *user)
                    dcr->pool_name,
                    dcr->dev?dcr->dev->print_name(): 
                             dcr->device->device_name);
+            bnet_fsend(user, _("    spooling=%d despooling=%d devblocked=%d\n"),
+                   dcr->spooling, dcr->despooling, dcr->dev->dev_blocked); 
          }
          sec = time(NULL) - jcr->run_time;
          if (sec <= 0) {
index 98f0106858c73be80fe16ebcf4e9900f98fb3efd..ff7aca9b559fc489478cc244d5624ae2469c03b7 100644 (file)
@@ -4,8 +4,8 @@
 
 #undef  VERSION
 #define VERSION "1.39.16"
-#define BDATE   "9 July 2006"
-#define LSMDATE "09Jul06"
+#define BDATE   "19 July 2006"
+#define LSMDATE "19Jul06"
 
 /* Debug flags */
 #undef  DEBUG